ComfyUI Node
Scripted Prompt Rewrite (calls no LLM)
Walks the (score, rewrite) turns you supply, or a length/keyword heuristic that appends a fixed phrase to short prompts, until the score reaches the threshold. It calls no LLM, so the score is not a quality judgement.
Scripted Prompt Rewrite (calls no LLM)
- rewritten_prompt
- iteration_count
- score
◄initial_prompta cat►
◄script►
◄max_iterations5►
◄quality_threshold0.70►
CategoryParametric/Prompts
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| initial_prompt | STRING | a cat | Initial prompt. Default a cat. |
| script | STRING | Script. | |
| max_iterations | INT | 51–50 | Max iterations. From 1 to 50. Default 5. |
| quality_threshold | FLOAT | 0.700–1 | Quality threshold. From 0 to 1. Default 0.7. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| rewritten_prompt | STRING | — |
| iteration_count | INT | — |
| score | FLOAT | — |