ComfyUI/comfy_api
Jedrzej Kosinski d91c1d8d48 DynamicSlot: typed option dispatch driven by TypeResolver
Replaces the old connected/unconnected fixed-child DynamicSlot with a
type-keyed option list. Each Option declares a 'when' condition (None,
io.AnyType, a single ComfyType, a list, or a MultiType.Input) and the
child inputs revealed when that condition matches the slot's resolved
upstream type.

Selection happens at schema-finalization time using live_input_types
computed by TypeResolver, so API-only workflows (no frontend) get the
same expansion the UI would.

- _io.py: redesign DynamicSlot.Input / Option; auto-derive slotType as
  the union of all non-None when sets; expose it via as_dict so the
  frontend knows what types are accepted; the class io_type stays
  COMFY_DYNAMICSLOT_V3 as the parse-time dispatch tag.
- type_resolver.py: return the auto-derived _slot_io_type for
  DynamicSlot.Input; document the AnyType (*) limitation.
- execution.py: validate links into a DynamicSlot against slotType,
  not the dispatch tag COMFY_DYNAMICSLOT_V3.
- tests: new test_dynamic_slot.py + regression coverage in
  test_type_resolver.py.

Amp-Thread-ID: https://ampcode.com/threads/T-019e8568-f382-743d-a97f-0de3ff29d501
Co-authored-by: Amp <amp@ampcode.com>
2026-06-01 17:56:32 -07:00
..
input range type (#13322) 2026-04-23 20:51:34 -07:00
input_impl ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
internal comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00
latest DynamicSlot: typed option dispatch driven by TypeResolver 2026-06-01 17:56:32 -07:00
torch_helpers Make torch.compile LoRA/key-compatible (#8213) 2025-05-21 04:56:56 -04:00
util ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
v0_0_1 ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
v0_0_2 Add MatchType, DynamicCombo, and Autogrow support to V3 Schema (#10832) 2025-12-03 00:17:13 -05:00
feature_flags.py feat: add generic --feature-flag CLI arg and --list-feature-flags registry (#13685) 2026-05-04 19:50:26 -07:00
generate_api_stubs.py ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
util.py ComfyAPI Core v0.0.2 (#8962) 2025-07-29 22:17:22 -04:00
version_list.py comfy_api: remove usage of "Type","List" and "Dict" types (#11238) 2025-12-15 16:01:10 -08:00