Normalize Qwen reference image inputs
This commit is contained in:
@@ -27,8 +27,8 @@ class QwenImageWorkerTests(unittest.TestCase):
|
|||||||
encode = workflow["4"]["inputs"]
|
encode = workflow["4"]["inputs"]
|
||||||
self.assertEqual(workflow["6"]["inputs"]["latent_image"], ["4", 2])
|
self.assertEqual(workflow["6"]["inputs"]["latent_image"], ["4", 2])
|
||||||
self.assertEqual(encode["vae"], ["3", 0])
|
self.assertEqual(encode["vae"], ["3", 0])
|
||||||
self.assertEqual(encode["image_1"], ["9", 0])
|
self.assertEqual(encode["images.image_1"], ["9", 0])
|
||||||
self.assertEqual(encode["image_2"], ["10", 0])
|
self.assertEqual(encode["images.image_2"], ["10", 0])
|
||||||
self.assertNotIn("5", workflow)
|
self.assertNotIn("5", workflow)
|
||||||
|
|
||||||
def test_router_contract_is_fixed_to_production_parameters(self):
|
def test_router_contract_is_fixed_to_production_parameters(self):
|
||||||
|
|||||||
@@ -135,7 +135,9 @@ def make_workflow(prompt: str, seed: int, steps: int, width: int, height: int,
|
|||||||
for index, name in enumerate(references, 1):
|
for index, name in enumerate(references, 1):
|
||||||
node = str(8 + index)
|
node = str(8 + index)
|
||||||
workflow[node] = {"class_type": "LoadImage", "inputs": {"image": name}}
|
workflow[node] = {"class_type": "LoadImage", "inputs": {"image": name}}
|
||||||
encode_inputs[f"image_{index}"] = [node, 0]
|
# ComfyUI V3 dynamic inputs use the parent path as a prefix. The
|
||||||
|
# normalizer turns images.image_N back into the execute() dict.
|
||||||
|
encode_inputs[f"images.image_{index}"] = [node, 0]
|
||||||
else:
|
else:
|
||||||
workflow["5"] = {"class_type": "EmptyLatentImage", "inputs": {
|
workflow["5"] = {"class_type": "EmptyLatentImage", "inputs": {
|
||||||
"width": width, "height": height, "batch_size": 1}}
|
"width": width, "height": height, "batch_size": 1}}
|
||||||
|
|||||||
Reference in New Issue
Block a user