One function

_find_media_references in robertvoy/ComfyUI-Distributed

The author described this change as fix: sync LoadVideo 'file' media refs for remote workers. It counts as a record because the check below fails on the code as it stood at 9058cf061 and passes on df606af80, with nothing else changed between the two runs.

Fix saved2026-02-28
Sharing licenceApache-2.0 · LICENSE
Change size+2 2

What the code was meant to do, written into the code itself as a docstring

Find media file references in image/video/audio inputs used by worker prompts.

The change

11 def _find_media_references(prompt_obj):
2- """Find media file references in image/video/audio inputs used by worker prompts."""
2+ """Find media file references in image/video/audio/file inputs used by worker prompts."""
33 media_refs = set()
44 for node in prompt_obj.values():
55 if not isinstance(node, dict):
66 continue
77 inputs = node.get("inputs", {})
8- for key in ("image", "video", "audio"):
8+ for key in ("image", "video", "audio", "file"):
99 value = inputs.get(key)
1010 if isinstance(value, str):
1111 cleaned = re.sub(r"\s*\[\w+\]$", "", value).strip().replace("\\", "/")

The check that tells the two apart

failpass·tests/api/test_media_sync.py::FindMediaReferencesTests::test_finds_file_input_for_load_video

Check file tests/api/test_media_sync.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it9058cf061d481fb0ca9678c3777555d495115597
Broken version dated2026-02-28
Moduleapi.orchestration.media_sync
Units changed_find_media_references
Fingerprint0c169524d83c9fa7
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.