Select Scheduled WAN Model From Conditioning
Pick the right WAN model per loop iteration without patching LoRAs mid-loop
- model_bank
- positive
- negative
- model
- positive
- negative
- generation_index
- report
This is the selector half of the pack's "build all your WAN model variants once, then pick per iteration" pattern. If you've ever run a long WAN generation loop where different generations need different LoRA stacks - some always-on, some scheduled for specific indices - you know the usual approach is to re-apply LoRAs inside the loop, which means the same model patching work happens over and over and can even fight ComfyUI's caching.
IAMCCS_SelectScheduledWanModelFromConditioning inverts that. A model bank (built once, outside the loop, by IAMCCS_BuildScheduledWanModelBank) contains prebuilt model variants for every generation index. This node reads the current generation index out of your conditioning's metadata, looks up the right prebuilt model in the bank, and hands it over. The loop never touches LoRA patching at all.
How it works
The trick is where the generation index comes from: it's not a widget, it's extracted from the conditioning metadata itself. The node scans positive/negative for keys like _iamccs_generation_index, _iamccs_segment_index, generation_index, or segment_index - values that other IAMCCS scheduling nodes stamp into the conditioning - and falls back to 0 if none are found. So whatever node upstream is advancing the generation also implicitly tells this selector which model to use. It then looks up that index in the model bank's generation_to_fingerprint map and returns the matching model. Missing fingerprint or missing model for an index is a hard error, not a silent fallback, which is deliberate: a wrong model mid-loop is worse than a loud crash.
Inputs and outputs
Inputs: model_bank (IAMCCS_WAN_MODEL_BANK - the bank from BuildScheduledWanModelBank), plus positive and negative conditioning (lazy-loaded, only read to extract the index).
Outputs:
model- the selected prebuilt MODEL, straight into your samplerpositive/negative- passed through untouchedgeneration_index- the index it actually used, so you can log or verifyreport- a summary of which always-on and scheduled entries were active
Because both conditionings are just pass-through here, this slots into the model branch of your graph without touching the conditioning branch at all.
Installing
ComfyUI Manager → search "IAMCCS", or
cd ComfyUI/custom_nodes
git clone https://github.com/IAMCCS/IAMCCS-nodes.git
then restart. No extra downloads for the node itself - the WAN models and LoRAs in your bank are the real disk footprint.
Gotchas
The model bank is built with IS_CHANGED returning nan, so it regenerates every run and the prebuilt variants are fresh - but if the LoRA files themselves change on disk, ComfyUI might not notice unless you force a refresh. More importantly, if the upstream node that should stamp generation_index into the conditioning isn't running (or isn't an IAMCCS scheduler), the selector silently reads 0 and every iteration gets the same model. The report output and the node's console logs will tell you the truth about which index it saw - worth a glance the first time you wire it up.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_bank | IAMCCS_WAN_MODEL_BANK | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| generation_index | INT | — |
| report | STRING | — |