mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-09-29 15:04:09 -03:00
fix(nodes): let Load Image Metadata value outputs drive dropdown widgets
model_name, sampler_name and scheduler were declared as COMBO outputs, so the
documented wiring failed at queue time with "Return type mismatch between linked
nodes". ComfyUI only accepts a COMBO output into a node that declares its
dropdown as COMBO/IO.Combo, while Load Checkpoint, KSampler and the LoRA Manager
loaders expose their options as a plain list; comfy_execution.validation rejects
any non-string input type there, and a STRING output is rejected the same way.
Declare the three sockets untyped ("*"), the type ComfyUI's own Primitive node
uses to feed widget inputs. Verified with execution.validate_inputs that they now
link into both classic list dropdowns and IO.Combo inputs.
Also corrects the wiring guide, which claimed COMBO was the supported type.
This commit is contained in:
@@ -61,6 +61,22 @@ def test_full_node_contract_with_real_png_metadata(runtime):
|
||||
assert LoadImageMetadataLM.INPUT_TYPES()["required"]["image"][1]["image_upload"]
|
||||
|
||||
|
||||
def test_value_selector_outputs_stay_untyped():
|
||||
"""These sockets must not be typed COMBO/STRING.
|
||||
|
||||
Load Checkpoint, KSampler and the LoRA Manager loaders declare their name
|
||||
dropdowns as plain option lists ("classic" combos). ComfyUI's
|
||||
comfy_execution.validation rejects any non-string input type for those, so a
|
||||
COMBO (or STRING) output linked into them fails at queue time with
|
||||
"Return type mismatch between linked nodes". Only an untyped ("*") output
|
||||
works, which is also what ComfyUI's own Primitive node uses for widgets.
|
||||
"""
|
||||
types = LoadImageMetadataLM.RETURN_TYPES
|
||||
names = LoadImageMetadataLM.RETURN_NAMES
|
||||
for output in ("model_name", "sampler_name", "scheduler"):
|
||||
assert types[names.index(output)] == "*", output
|
||||
|
||||
|
||||
@pytest.mark.parametrize("extension", ["webp", "jpg"])
|
||||
def test_exif_parameters_from_real_image(runtime, extension):
|
||||
image_path, *_ = runtime
|
||||
|
||||
Reference in New Issue
Block a user