From 6f6c500c1596b452e5b3c391c16dc7613b7ca8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jukka=20Sepp=C3=A4nen?= <40791699+kijai@users.noreply.github.com> Date: Sat, 25 Jul 2026 14:30:37 +0300 Subject: [PATCH] Improve LTXV IC-lora detection (#15073) --- comfy_extras/nodes_lt.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comfy_extras/nodes_lt.py b/comfy_extras/nodes_lt.py index 85d76ecef..044d82cc8 100644 --- a/comfy_extras/nodes_lt.py +++ b/comfy_extras/nodes_lt.py @@ -50,8 +50,8 @@ class GetICLoRAParameters(io.ComfyNode): factor = 1 if metadata: try: - factor = max(1, round(float(metadata.get("reference_downscale_factor", 1)))) - except (TypeError, ValueError): + factor = max(1, round(float(next(v for k, v in metadata.items() if k.endswith("reference_downscale_factor"))))) + except (StopIteration, TypeError, ValueError): factor = 1 parameters = {"reference_downscale_factor": factor} return io.NodeOutput(parameters)