FilterSchedule
Pulling one tagged slice out of a Prompt Control schedule
- prompt_schedule
- PROMPT_SCHEDULE
Once you've got a PROMPT_SCHEDULE - the object PromptToSchedule builds from your scheduling syntax - FilterSchedule lets you cut it down to just the part you actually want right now. Feed it a schedule, optionally a tag and/or a time window, and it hands back a new PROMPT_SCHEDULE containing only what matched. Everything else is dropped.
Why you'd want this
The README mentions this capability in passing: Prompt Control's "advanced" lazy nodes support "filtering the prompt for multi-pass workflows." That's the real use case for FilterSchedule too. Say you're doing a base pass and a hires-fix/refiner pass, and you'd rather write one prompt with tagged segments for each pass than maintain two prompt strings by hand that inevitably drift apart. You tag the parts of your schedule meant for the refiner, and use FilterSchedule twice - once per pass, each pulling only its own tag - instead of copy-pasting text and hoping you remember to update both copies next time you tweak the prompt.
It also works purely on time: even without tags, you can slice a schedule down to just the 0.5–1.0 window, for example, if some later stage of your pipeline should only see the back half of the schedule.
The inputs and outputs that matter
One required input, three optional ones:
prompt_schedule(required) - the schedule to filter, from PromptToSchedule or another schedule-producing node.tags(default empty) - a tag string to match. Leave it blank and tag filtering is a no-op; only segments you've actually tagged in your prompt text get pulled by a non-empty value.start/end(both 0–1, defaults 0 and 1) - the time window to keep, using the same 0-to-1 convention the rest of the pack uses for "how far through the schedule." Leave them at the defaults and the whole timeline passes through untouched.
Output is a filtered PROMPT_SCHEDULE, wired onward exactly like the one you fed in.
How to install it
- ComfyUI Manager - search "ComfyUI Prompt Control", install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/asagi4/comfyui-prompt-control, restart ComfyUI.
Requires ComfyUI v0.8.0+ for the v3 line this node ships in.
Common issues & troubleshooting
Nothing gets filtered out. Check that tags isn't empty if you meant to filter by tag - an empty string matches everything, it doesn't match nothing. And double check the segments you expect to be excluded were actually tagged in your source text; FilterSchedule can only remove what it can identify.
You're mixing up fractions and steps. start/end here are 0–1 fractions of the whole schedule, the same convention PCPromptFromSchedule's at uses - not literal step numbers. If you've attached a step count via PCScheduleSettings/PCApplySettings, keep in your head that 0.5 means "halfway through however many steps you configured," not "step 0.5."
Downstream nodes recompute more than expected after filtering. This is a documented, accepted limitation, not something you did wrong: the README's own "Known issues" section calls out that filtering specifically is one of the cases where ComfyUI's caching invalidates more than it needs to. You still benefit from the lazy graph generation elsewhere in the pack; filtered branches just won't cache as cleanly.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_schedule | PROMPT_SCHEDULE | — | |
| tagsopt | STRING | — | |
| startopt | FLOAT | 0.000–1 | — |
| endopt | FLOAT | 1.000–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| PROMPT_SCHEDULE | PROMPT_SCHEDULE | — |