SCG Prompt Forge
Need 500 distinct prompts for LoRA testing? This node writes them for you
- prompt
- index
- count
The wall every LoRA tester hits is not the training, it's the prompts. You need a hundred quality prompts carrying your trigger word to see if the LoRA actually holds up, and writing them by hand is the most boring hour in ComfyUI. SCG Prompt Forge exists to take that hour away: you give it a seed idea and it opens a full-screen overlay over the canvas where an LLM writes batches of genuinely distinct prompts for you - up to 500 at a go - and the node then steps through them one per run.
The first thing to know: this is not a local-LLM node. There's no bundled model, nothing to download. It talks to any OpenAI-compatible chat-completions endpoint - OpenAI, Grok, Gemini's compat URL, or a local LM Studio server on your LAN - so the only thing standing between you and a prompt batch is an API key (or a local model you already run). The author, SanDiegoDude, is a long-time r/StableDiffusion regular best known for LTX-2 music videos, and this tool reads like something someone built to solve their own workflow, not to chase install counts.
How it works
Inside the forge you describe the seed idea, optionally add a reference image (drag, click, or Ctrl+V - with no seed text the image's scene becomes the springboard; with seed text, the seed stays in charge), and list the required keywords your batch must carry - LoRA triggers, hex color codes, whatever. Those keywords get injected into every prompt, or rotated one-per-prompt across the batch, so the variability is in the scene rather than in the trigger.
The generation runs in two stages: the agent first expands your seed into a creative brief plus a set of distinct "concept angles," then writes the prompts in chunks so each one gets its own angle. That's the clever part - ask an LLM for "200 variations" in one call and you get 190 near-duplicates. Chunking with one angle per prompt is what actually buys you variety. Wildcard .txt files work like the author's scg-wildcards format (one option per line, # comments ignored), referenced as _name_ in the seed or keywords to control where the drawn value lands.
The whole pipeline runs inside the overlay, through a chat proxy on the ComfyUI server - your keys never reach the browser. Nothing is queued on the graph until you save the batch and run your own workflow.
The inputs and outputs that matter
The node itself is nearly dumb, and that's the point. Its two inputs are prompt_batch - a hidden JSON widget that the forge writes for you when you hit Save to node (you never type it) - and index, which defaults to increment so each queue run walks the batch one prompt at a time, wrapping at the end. Set index's control to fixed to pin a single prompt. Outputs are prompt (the current prompt), index (the wrapped index), and count (batch size). Wire prompt straight into a CLIP Text Encode and queue N runs.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/SanDiegoDude/scg-prompt-forge.git scg_prompt_forge
Then restart ComfyUI - it registers two small server routes at startup. You can also search "SCG Prompt Forge" in ComfyUI Manager. For the common OpenAI-compatible case there are zero dependencies; the only optional one is google-auth, needed solely if you configure a Vertex AI provider.
Point it at a model
Copy .env.example to .env in the pack folder and add one line per provider:
AI_PROVIDER_OPENAI = OpenAI (gpt-5.4-mini) | gpt-5.4-mini | | sk-...
AI_PROVIDER_LOCAL = Local (qwen3) | qwen3-... | http://192.168.0.180:1234 | 123
Leave base_url blank for official OpenAI; a bare host gets /v1 appended automatically. After editing, hit Refresh in Agent Configuration - no restart. If you already use the author's sibling scg_json_prompt_agent, its .env is used automatically, so there's nothing to configure.
Where people get burned
- Run the node with an unsaved batch and you get a clear RuntimeError telling you to open the forge and save - the
prompt_batchwidget starts as empty JSON. - Gemini flash/thinking models spend tokens on internal reasoning, so keep Max tokens at 8k+ or replies come back truncated or blank.
- The
.envformat isLabel | model | base_url | api_key- a missing|silently breaks that provider. And it's git-ignored for a reason: never commit your keys.
Is it worth it? If you test LoRAs in volume, yes - the required-keyword and wildcard handling is exactly what batch prompting tools usually get wrong, and it gets it right. If you write three prompts a week, it's overhead you don't need.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_batch | STRING | {"format": "paragraph", "prompts": []} | — |
| index | INT | 00–18446744073709550000 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| index | INT | — |
| count | INT | — |