mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-21 13:12:13 -03:00
Raise an error with model name if lora model loading fails (#148)
This commit is contained in:
20
tsc_utils.py
20
tsc_utils.py
@@ -360,7 +360,16 @@ def load_lora(lora_params, ckpt_name, id, cache=None, ckpt_cache=None, cache_ove
|
||||
else:
|
||||
lora_path = folder_paths.get_full_path("loras", lora_name)
|
||||
|
||||
lora_model, lora_clip = comfy.sd.load_lora_for_models(ckpt, clip, comfy.utils.load_torch_file(lora_path), strength_model, strength_clip)
|
||||
try:
|
||||
lora_model, lora_clip = comfy.sd.load_lora_for_models(
|
||||
ckpt,
|
||||
clip,
|
||||
comfy.utils.load_torch_file(lora_path),
|
||||
strength_model,
|
||||
strength_clip,
|
||||
)
|
||||
except Exception as e:
|
||||
raise ValueError("Error loading Lora file: {} \n{}".format(lora_name, e))
|
||||
|
||||
# Call the function again with the new lora_model and lora_clip and the remaining tuples
|
||||
return recursive_load_lora(lora_params[1:], lora_model, lora_clip, id, ckpt_cache, cache_overwrite, folder_paths)
|
||||
@@ -544,12 +553,3 @@ class XY_Capsule:
|
||||
|
||||
def getLabel(self):
|
||||
return "Unknown"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user