Lazy-subject-and-scene-automation
The one node that replaces a wall of selectors, LoRA loaders and text nodes
- model_high
- clip_high
- model_low
- clip_low
- minimax_model
- image_model
- video_model
- prompt
- model_high
- model_low
- keywords
- clip_high
- clip_low
- subject_description
- prompt_override
- selector
- minimax_model
- image_model
- video_model
- refmod
This is the flagship node of the pack, and the one worth building a workflow around. It takes one subject file, one or two scenario files, and a pile of LoRA slots, and assembles everything into a ready-to-encode prompt plus properly LoRA-stacked model/CLIP outputs. Where most people wire up a chain of subject selector → scenario selector → several LoRA loaders → text concat nodes, this node does the whole middle of the graph in one box.
The context that makes it click: Wan-style video graphs run two model branches - a high-noise and a low-noise stack - and every LoRA has to be applied to both, usually with different strengths. That's why a single Wan workflow ends up covered in LoRA loaders. This node models that directly: wire model_high and clip_high (required), and for a dual-stack Wan graph also wire model_low and clip_low. Running single-model (Z-Image, Krea2, one Flux/SDXL branch)? Just leave the low inputs unwired and use the high outputs - the low branch is skipped.
How it works
Your subject and scenario definitions live in plain .txt files under the node's own folders:
custom_nodes/vsaan212_workflow_utilities/lazy_subject_scene_automation/
├─ SubjectFiles/
└─ ScenarioFiles/
The files use a simple tagged format. A line like [LoraHighA][1.0][0.7] opens a LoRA slot with model and clip strengths; the next lines are the LoRA path (or the word bypass). [desciption] holds the text that goes into your prompt, [KeywordA] feeds the keywords output, and [Prompt] is special - it's routed out on prompt_override for an LLM to expand, not dumped into the prompt. Subject files get slots A/B/C; each scenario file gets another A/B/C, so with scenario_2 you can stack up to six scenario LoRA sets. {left|right} inside scenario text picks a random option on every queue - nice for batch variety without an external random-prompt node.
LoRAs apply in order: subject slots, then scenario 1, then scenario 2, using ComfyUI's stock LoraLoader. A missing or bypass slot is skipped. And there's a Wan 2.1-style fallback: if a low slot is bypassed but its high twin has a real path, the same LoRA gets applied to both branches with clip strength forced to 1.0 on the low side.
Inputs and outputs that matter
The dropdowns - subject, scenario, scenario_2 - are where you pick your .txt files (relative paths, no extension). scenario_2 defaults to none; when it's set, the scenario_2_high_strength / scenario_2_low_strength sliders let you override that file's [LoraHighA] / [LoraLowA] model strength live. prepend_text and post_text are STRING sockets for framing text, and pass_subject_to_main_prompt controls whether the subject description lands in the main prompt.
The best part is the live editor. The pack ships a browser extension that adds editable text panes right on the node - subject, scenario, scenario 2. Queue uses the pane text, not the file on disk, and a Save edits button writes your changes back to .txt. Edit in the graph, persist when it's good.
Outputs: prompt (the assembled text for CLIP/preview), model_high / model_low and clip_high / clip_low (after the LoRA stacks - these feed your sampler), keywords, subject_description (wire it to LazyPrompt's character), and prompt_override (wire to LazyPrompt's prompt_override_input when a scenario file uses [Prompt]).
Install and gotchas
Same pack as everything else: ComfyUI Manager → search vsaan212/Vsaan212-workflow-utilities, or clone into custom_nodes and restart. Note the folder: this node reads its own lazy_subject_scene_automation/SubjectFiles, not the folders the standalone Subject/Scenario Selectors use - copy or symlink if you want the same files in both.
New .txt not in the dropdown? Press R in ComfyUI or recreate the node. Same filename in two folders? Use the full relative path in the dropdown. For a no-LoRA run, pick none (or set slots to bypass) - the pack seeds none.txt and a Bypass and format example.txt on first load so you always have working examples.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| subject | COMBO | 3 options: Bypass and format example, none, Refmod example | |
| multisubject_refmod | INT | 00–3 | 0: one subject, always load file LoRAs (current behavior). 1: one subject; skip that subject's LoRAs when the file has [Refmod]. 2 or 3: extra subject dropdowns (up to 3 characters). Randomize also applies [Refmod] LoRA skipping. Wire refmod → Lazy-refmod-split → Load H3 RefMods. |
| min_subjects | INT | 11–3 | When randomize is ON and multisubject_refmod is 2 or 3: pick at least this many characters from the selected subject's folder (up to the refmod count). 2 with refmod 3 randomly picks 2 or 3. Ignored when randomize is OFF or refmod is 0–1. |
| subject_2 | COMBO | none | Second subject .txt (same folder/format as subject). Used when multisubject_refmod is 2 or 3. Ignored while randomize is ON. |
| subject_3 | COMBO | none | Third subject .txt. Used when multisubject_refmod is 3. Ignored while randomize is ON. |
| scenario | COMBO | 3 options: Bypass and format example, none, Prompt dynamic Lora example | |
| scenario_2 | COMBO | none | Second scenario .txt (same format as scenario). Adds up to three more LoRA slots (A/B/C) after scenario 1 on each branch. Use none to disable. |
| scenario_2_high_strength | FLOAT | 1.000–10 | Overrides [LoraHighA] model strength in scenario 2 live text (clip strength unchanged). |
| scenario_2_low_strength | FLOAT | 1.000–10 | Overrides [LoraLowA] model strength in scenario 2 live text (clip strength unchanged). |
| pass_subject_to_main_prompt | BOOLEAN | true | ON: main prompt includes subject file description; subject_description pin is description text only (no prepend/post). OFF: main prompt omits subject file text; subject_description pin is still the raw subject description only. |
| randomize_subject_in_directory | BOOLEAN | false | ON: each queue picks random subject .txt file(s) from the same folder as the selected subject (SubjectFiles subfolder). Live subject panes are ignored while this is on. With multisubject_refmod 2–3, count is min_subjects through the refmod slot count. [Refmod] LoRA skipping still applies. OFF: always use the selected subject dropdown(s). |
| video_length | FLOAT | 0.000–300 | Clip duration in seconds. Replaces [video_length] in prompt / prompt_override, or appends a [video_length] block. Prompt Engineer keeps that block in the LLM user message. 0 skips (still-image graphs). Does not touch [Time] (time of day). |
| model_highopt | MODEL | Wan high-noise branch. Receives LoraHighA–C. Not MiniMax / Krea2 / LTX — use those singular sockets instead. | |
| clip_highopt | CLIP | CLIP for the Wan high-noise branch, and LoRA companion for MiniMax / image / video models when those sockets have no CLIP. | |
| model_lowopt | MODEL | Wan low-noise branch only. Receives LoraLowA–C. Leave unwired for single-model graphs. MiniMax R2V belongs on minimax_model. | |
| clip_lowopt | CLIP | CLIP for the Wan low-noise branch. Omit for single-CLIP graphs. | |
| minimax_modelopt | MODEL | Singular video UNET: MiniMax H3. Wire Lazy Model Switcher here (TxtImg2Vid vs reference). Receives VideoModelLoraA–D. | |
| image_modelopt | MODEL | Singular image model: Krea2, Z-Image, Flux, SDXL. Receives ImageModelLoraA–D. | |
| video_modelopt | MODEL | Singular video UNET: LTX 2.x (and similar). Receives VideoModelLoraA–D. | |
| prepend_textopt | STRING | Optional: wired prepend for main prompt and for prompt_override (scenario [Prompt] or [description]/[desciption]). | |
| post_textopt | STRING | Optional: wired post text after the subject block on main prompt, and before scenario [Prompt] body on prompt_override. | |
| global_selector_inputopt | STRING | From Lazy Global Selector. Used as [Workflow] in the selector blob when subject/scenario files do not set [Workflow]. Does not switch model_high / model_low / minimax_model. | |
| subject_liveopt | STRING | Synced by live editor extension (not shown on node). | |
| subject_2_liveopt | STRING | Synced by live editor extension (not shown on node). | |
| subject_3_liveopt | STRING | Synced by live editor extension (not shown on node). | |
| scenario_liveopt | STRING | Synced by live editor extension (not shown on node). | |
| scenario_2_liveopt | STRING | Synced by live editor extension (not shown on node). | |
| subject_use_liveopt | BOOLEAN | false | When true, queue uses subject_live instead of disk. |
| subject_2_use_liveopt | BOOLEAN | false | When true, queue uses subject_2_live instead of disk. |
| subject_3_use_liveopt | BOOLEAN | false | When true, queue uses subject_3_live instead of disk. |
| scenario_use_liveopt | BOOLEAN | false | When true, queue uses scenario_live. |
| scenario_2_use_liveopt | BOOLEAN | false | When true, queue uses scenario_2_live. |
Outputs (13)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| model_high | MODEL | — |
| model_low | MODEL | — |
| keywords | STRING | — |
| clip_high | CLIP | — |
| clip_low | CLIP | — |
| subject_description | STRING | — |
| prompt_override | STRING | — |
| selector | STRING | — |
| minimax_model | MODEL | — |
| image_model | MODEL | — |
| video_model | MODEL | — |
| refmod | STRING | — |