abyz22_AddPrompt
Roll dice on the lighting without touching the sampler
- conditioning
- clip
- opt
- conditioning
- selected_prompt
Lighting is the difference between "same prompt, boring" and "same prompt, mood." Most people handle it by hand-editing the prompt between runs. abyz22_AddPrompt is the lazier version: it picks a random lighting phrase from a list you give it, bakes in a strength weight, and appends it to your existing conditioning. Feed it a seed, hit queue, and the same scene comes back under "sunshine from window" this time and "neon light, cyberpunk" the next.
It ships in abyz22/image_control, a single-developer fork of Impact Pack. Most of that pack is body-editing and outpainting tooling, but this node is the one you'll actually reuse in everyday workflows.
How it works
You type a bunch of candidate phrases into the text box, separated by /. The node picks one at random with random.choice(text.split("/")), wraps it as (phrase:1.2), tokenizes it with your CLIP, and concats the result onto the incoming conditioning. The selected_prompt output is a plain STRING of whatever got chosen, so wire it into a ShowText node and you can see which mood you rolled without reading pixel noise.
A couple of inputs actually matter:
text- your candidate list. The default is a 30ish-entry lighting list (sunset, black and white, warm atmosphere...), which is a fine starting point. The/separator is the whole contract, so don't put literal slashes inside a phrase.weight_factor(0.5–1.5, default 1.2) - the emphasis weight wrapped around the chosen phrase. 1.0 is neutral; the default nudges lighting to actually show up.seed- makes the pick reproducible. Same seed, same lighting. You'll want this when you find a winner and want to re-roll the rest of the workflow around it.
There's also an optional opt input that accepts anything. If you wire in a string that ends with /<number>, it uses that number as the seed instead of the widget - useful when another node (like a queue/batch controller) owns the seed and you want the lighting to stay locked to it.
Install
ComfyUI Manager → search "image_control", or:
cd ComfyUI/custom_nodes
git clone https://github.com/abyz22/image_control
Restart ComfyUI after installing. The pack pulls in openpyxl, pytorch-lightning, and kornia from its requirements.txt - pytorch-lightning is a chunky install, so the first start after adding this pack can take a while.
Where it bites
The biggest trap is the weight_factor range topping out at 1.5. Lighting at 1.2–1.5 on an SDXL or Illustrious checkpoint is usually fine, but slam it too high on a model with a fragile CFG balance and you'll get banding or a blown-out frame. If you're also using a wildcard encoder elsewhere in the graph, don't double-dip - a lighting wildcard plus AddPrompt both appending can stack emphasis past what the model tolerates. And remember this node only adds text; if your negative conditioning needs the same treatment, run a second one on the negative side and paste your own "avoid" list into it.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| clip | CLIP | — | |
| weight_factor | FLOAT | 1.200.5–1.5 | — |
| text | STRING | red light/blue light/yellow light/sun light/pink light/blue light/green light/purple light/gray light/warm atmosphere/sunshine from window/sunshine, outdoor, warm atmosphere/shadow from window/sunset over sea/neon light, cyberpunk/light and shadow/natural lighting/sunset/black and white/daylight/beige light/jade light/emerald light/lime light/aqua light/peach light/coral light/brown light/cream light/khaki light/olive light/frost light/navy light/cyan light/sunny day/ | — |
| seed | INT | 00–18446744073709550000 | — |
| optopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| selected_prompt | STRING | — |