ComfyUI Node
Z-Image Prompt Enhancer
Enhance prompts using LLM for text-to-image generation. Supports multi-turn conversations and image input.
Z-Image Prompt Enhancer
- config
- options
- image
- enhanced_prompt
- debug_log
◄prompt►
◄prompt_templatechinese►
◄retry_count3►
◄max_output_length6000►
◄session_id►
◄reset_sessionfalse►
◄keep_model_loadedtrue►
◄utf8_sanitizefalse►
◄custom_system_prompt►
CategoryZ-Image
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| config | ZIMAGE_CONFIG | — | |
| prompt | STRING | — | |
| prompt_template | COMBO | chinese | Prompt template language. 'auto' detects from input prompt, 'chinese' uses Chinese template, 'english' uses English template |
| optionsopt | ZIMAGE_OPTIONS | — | |
| imageopt | IMAGE | Optional image input for vision-capable models | |
| retry_countopt | INT | 30–10 | Number of retry attempts on API failure with exponential backoff |
| max_output_lengthopt | INT | 60000–10000 | Maximum length in characters (0=unlimited). Z-Image-Turbo works best with 4500-7500 chars (~600-1000 words). Default 6000 chars ≈ 800 words ≈ 1066 tokens. |
| session_idopt | STRING | Session identifier for multi-turn conversations. Same ID = shared history | |
| reset_sessionopt | BOOLEAN | false | Clear conversation history for this session |
| keep_model_loadedopt | BOOLEAN | true | Keep model in memory after inference for faster subsequent runs |
| utf8_sanitizeopt | BOOLEAN | false | Sanitize output to ASCII-safe characters |
| custom_system_promptopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| enhanced_prompt | STRING | — |
| debug_log | STRING | — |