Fix loading diffusers ti

This commit is contained in:
Sergey Borisov
2023-07-05 19:46:00 +03:00
parent 818616a0c5
commit 0ac9dca926
6 changed files with 22 additions and 7 deletions

View File

@ -9,6 +9,7 @@ from compel.prompt_parser import (Blend, Conjunction,
FlattenedPrompt, Fragment)
from pydantic import BaseModel, Field
from ...backend.model_management.models import ModelNotFoundException
from ...backend.model_management import BaseModelType, ModelType, SubModelType
from ...backend.model_management.lora import ModelPatcher
from ...backend.stable_diffusion.diffusion import InvokeAIDiffuserComponent
@ -86,10 +87,10 @@ class CompelInvocation(BaseInvocation):
model_type=ModelType.TextualInversion,
).context.model
)
except Exception:
except ModelNotFoundException:
# print(e)
#import traceback
# print(traceback.format_exc())
#print(traceback.format_exc())
print(f"Warn: trigger: \"{trigger}\" not found")
with ModelPatcher.apply_lora_text_encoder(text_encoder_info.context.model, _lora_loader()),\