mirror of
https://github.com/jags111/efficiency-nodes-comfyui.git
synced 2026-03-25 15:15:45 -03:00
Merge pull request #55 from Mijago/feature/load_lora_stack_without_lora_name
Allow the loading of lora_stack without lora_name
This commit is contained in:
@@ -88,11 +88,21 @@ class TSC_EfficientLoader:
|
|||||||
# Retrieve cache numbers
|
# Retrieve cache numbers
|
||||||
vae_cache, ckpt_cache, lora_cache = get_cache_numbers("Efficient Loader")
|
vae_cache, ckpt_cache, lora_cache = get_cache_numbers("Efficient Loader")
|
||||||
|
|
||||||
if lora_name != "None":
|
if lora_name != "None" or lora_stack:
|
||||||
lora_params = [(lora_name, lora_model_strength, lora_clip_strength)]
|
# Initialize an empty list to store LoRa parameters.
|
||||||
if lora_stack is not None:
|
lora_params = []
|
||||||
|
|
||||||
|
# Check if lora_name is not the string "None" and if so, add its parameters.
|
||||||
|
if lora_name != "None":
|
||||||
|
lora_params.append((lora_name, lora_model_strength, lora_clip_strength))
|
||||||
|
|
||||||
|
# If lora_stack is not None or an empty list, extend lora_params with its items.
|
||||||
|
if lora_stack:
|
||||||
lora_params.extend(lora_stack)
|
lora_params.extend(lora_stack)
|
||||||
|
|
||||||
|
# Load LoRa(s)
|
||||||
model, clip = load_lora(lora_params, ckpt_name, my_unique_id, cache=lora_cache, ckpt_cache=ckpt_cache, cache_overwrite=True)
|
model, clip = load_lora(lora_params, ckpt_name, my_unique_id, cache=lora_cache, ckpt_cache=ckpt_cache, cache_overwrite=True)
|
||||||
|
|
||||||
if vae_name == "Baked VAE":
|
if vae_name == "Baked VAE":
|
||||||
vae = get_bvae_by_ckpt_name(ckpt_name)
|
vae = get_bvae_by_ckpt_name(ckpt_name)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user