You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Preserve IC-LoRA metadata when composing multiple LoRAs #16834
Composing multiple metadata-bearing LoRAs retains their patches but only retains the last nonempty lora_metadata attachment. If an IC-LoRA is followed by another LoRA with unrelated metadata, GetICLoRAParameters can no longer find the earlier reference_downscale_factor and falls back to 1.
This is a shared loader behavior, not specific to DynamicGroup: sequential existing LoraLoader nodes and the proposed native stack both call comfy.sd.load_lora_for_models.
Reproduction path
Apply an IC-LoRA whose metadata contains a reference_downscale_factor greater than 1.
Apply another LoRA with nonempty metadata that does not contain that parameter to the resulting model.
Pass the final model to GetICLoRAParameters.
The shared loader clones the patched model and replaces its single lora_metadata attachment. GetICLoRAParameters reads that attachment, so the earlier IC-LoRA's parameter is no longer available even though its patches remain active. This report is based on the code path, not a full image-generation reproduction.
Follow-up scope
Define how metadata from multiple applied LoRAs is retained and how a consumer selects the intended LoRA's parameters. Do not assume blindly merging dictionaries is correct when multiple IC-LoRAs provide conflicting values.
Keep the single-LoRA behavior compatible and apply the chosen contract consistently to sequential loaders and native stacks. The shared helper also has a CLIP attachment path that should follow the chosen policy where applicable.
Add regressions for IC-LoRA followed by unrelated metadata, a later LoRA without metadata, and conflicting IC-LoRA parameters. Verify that patch composition remains unchanged.
Activity