Fix typegen issue

Fix typegen issue
This commit is contained in:
skunkworxdark
2025-01-20 22:42:59 +00:00
committed by psychedelicious
parent 98b8ab0147
commit 5f0bd2e1db
2 changed files with 12 additions and 6 deletions

View File

@@ -117,7 +117,7 @@ class FLUXLoRACollectionLoader(BaseInvocation):
"""Applies a collection of LoRAs to a FLUX transformer."""
loras: Optional[LoRAField | list[LoRAField]] = InputField(
default=[], description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
default=None, description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
)
transformer: Optional[TransformerField] = InputField(
@@ -151,7 +151,9 @@ class FLUXLoRACollectionLoader(BaseInvocation):
output.clip = self.clip.model_copy(deep=True)
for lora in loras:
assert lora is LoRAField
if lora is None:
continue
assert type(lora) is LoRAField
if lora.lora.key in added_loras:
continue

View File

@@ -262,7 +262,7 @@ class LoRACollectionLoader(BaseInvocation):
"""Applies a collection of LoRAs to the provided UNet and CLIP models."""
loras: Optional[LoRAField | list[LoRAField]] = InputField(
default=[], description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
default=None, description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
)
unet: Optional[UNetField] = InputField(
default=None,
@@ -288,7 +288,9 @@ class LoRACollectionLoader(BaseInvocation):
output.clip = self.clip.model_copy(deep=True)
for lora in loras:
assert lora is LoRAField
if lora is None:
continue
assert type(lora) is LoRAField
if lora.lora.key in added_loras:
continue
@@ -408,7 +410,7 @@ class SDXLLoRACollectionLoader(BaseInvocation):
"""Applies a collection of SDXL LoRAs to the provided UNet and CLIP models."""
loras: Optional[LoRAField | list[LoRAField]] = InputField(
default=[], description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
default=None, description="LoRA models and weights. May be a single LoRA or collection.", title="LoRAs"
)
unet: Optional[UNetField] = InputField(
default=None,
@@ -444,7 +446,9 @@ class SDXLLoRACollectionLoader(BaseInvocation):
output.clip2 = self.clip2.model_copy(deep=True)
for lora in loras:
assert lora is LoRAField
if lora is None:
continue
assert type(lora) is LoRAField
if lora.lora.key in added_loras:
continue