Nodes/Vsaan212-workflow-utilities/Lazy-subject-and-scene-automation
ComfyUI Node

Lazy-subject-and-scene-automation

The one node that replaces a wall of selectors, LoRA loaders and text nodes

By vsaan212·Created 10 months ago·Updated 9 days ago· 1
Lazy-subject-and-scene-automation
  • 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
subject
multisubject_refmod0
min_subjects1
subject_2none
subject_3none
scenario
scenario_2none
scenario_2_high_strength1.00
scenario_2_low_strength1.00
pass_subject_to_main_prompttrue
randomize_subject_in_directoryfalse
video_length0.00
prepend_text
post_text
global_selector_input
subject_live
subject_2_live
subject_3_live
scenario_live
scenario_2_live
subject_use_livefalse
subject_2_use_livefalse
subject_3_use_livefalse
scenario_use_livefalse
scenario_2_use_livefalse

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.

Categoryvsaan212/automation

Inputs (32)

NameTypeDefaultDescription
subjectCOMBO3 options: Bypass and format example, none, Refmod example
multisubject_refmodINT00–30: 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_subjectsINT11–3When 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_2COMBOnoneSecond subject .txt (same folder/format as subject). Used when multisubject_refmod is 2 or 3. Ignored while randomize is ON.
subject_3COMBOnoneThird subject .txt. Used when multisubject_refmod is 3. Ignored while randomize is ON.
scenarioCOMBO3 options: Bypass and format example, none, Prompt dynamic Lora example
scenario_2COMBOnoneSecond 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_strengthFLOAT1.000–10Overrides [LoraHighA] model strength in scenario 2 live text (clip strength unchanged).
scenario_2_low_strengthFLOAT1.000–10Overrides [LoraLowA] model strength in scenario 2 live text (clip strength unchanged).
pass_subject_to_main_promptBOOLEANtrueON: 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_directoryBOOLEANfalseON: 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_lengthFLOAT0.000–300Clip 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_highoptMODELWan high-noise branch. Receives LoraHighA–C. Not MiniMax / Krea2 / LTX — use those singular sockets instead.
clip_highoptCLIPCLIP for the Wan high-noise branch, and LoRA companion for MiniMax / image / video models when those sockets have no CLIP.
model_lowoptMODELWan low-noise branch only. Receives LoraLowA–C. Leave unwired for single-model graphs. MiniMax R2V belongs on minimax_model.
clip_lowoptCLIPCLIP for the Wan low-noise branch. Omit for single-CLIP graphs.
minimax_modeloptMODELSingular video UNET: MiniMax H3. Wire Lazy Model Switcher here (TxtImg2Vid vs reference). Receives VideoModelLoraA–D.
image_modeloptMODELSingular image model: Krea2, Z-Image, Flux, SDXL. Receives ImageModelLoraA–D.
video_modeloptMODELSingular video UNET: LTX 2.x (and similar). Receives VideoModelLoraA–D.
prepend_textoptSTRINGOptional: wired prepend for main prompt and for prompt_override (scenario [Prompt] or [description]/[desciption]).
post_textoptSTRINGOptional: wired post text after the subject block on main prompt, and before scenario [Prompt] body on prompt_override.
global_selector_inputoptSTRINGFrom 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_liveoptSTRINGSynced by live editor extension (not shown on node).
subject_2_liveoptSTRINGSynced by live editor extension (not shown on node).
subject_3_liveoptSTRINGSynced by live editor extension (not shown on node).
scenario_liveoptSTRINGSynced by live editor extension (not shown on node).
scenario_2_liveoptSTRINGSynced by live editor extension (not shown on node).
subject_use_liveoptBOOLEANfalseWhen true, queue uses subject_live instead of disk.
subject_2_use_liveoptBOOLEANfalseWhen true, queue uses subject_2_live instead of disk.
subject_3_use_liveoptBOOLEANfalseWhen true, queue uses subject_3_live instead of disk.
scenario_use_liveoptBOOLEANfalseWhen true, queue uses scenario_live.
scenario_2_use_liveoptBOOLEANfalseWhen true, queue uses scenario_2_live.

Outputs (13)

NameTypeDescription
promptSTRING
model_highMODEL
model_lowMODEL
keywordsSTRING
clip_highCLIP
clip_lowCLIP
subject_descriptionSTRING
prompt_overrideSTRING
selectorSTRING
minimax_modelMODEL
image_modelMODEL
video_modelMODEL
refmodSTRING