remove reference to globals in compel.py

This commit is contained in:
Lincoln Stein 2023-05-06 22:49:35 -04:00
parent afd2e32092
commit 25ce47c44f

View File

@ -16,8 +16,6 @@ from compel.prompt_parser import (
Fragment,
)
from invokeai.backend.globals import Globals
class ConditioningField(BaseModel):
conditioning_name: Optional[str] = Field(default=None, description="The name of conditioning data")
@ -102,7 +100,8 @@ class CompelInvocation(BaseInvocation):
prompt: Union[FlattenedPrompt, Blend] = Compel.parse_prompt_string(prompt_str)
if getattr(Globals, "log_tokenization", False):
print('here i am')
if context.services.configuration.log_tokenization:
log_tokenization_for_prompt_object(prompt, tokenizer)
c, options = compel.build_conditioning_tensor_for_prompt_object(prompt)