SID Z-Image Prompt Generator
Feed it a photo instead
- image
- llm_model
- prompt
- width
- height
- metadata
- debug
Z-Image is a weird model to prompt, and that's exactly why this node exists. The Turbo variant everyone runs is a 6B flow-matching model whose text encoder is a full LLM - Qwen3-4B, not a CLIP pair. So all the SDXL muscle memory is dead on it: masterpiece, best quality does nothing, (word:1.3) passes through as literal punctuation, and keyword soup eats into the attention budget. What Z-Image actually wants is a flowing natural-language description of the scene. That's great for your results and miserable for your wrists if you're hand-writing every prompt.
SID_ZImagePromptGenerator is the flagship node of Siddhartha Lahiri's AI Photography Toolkit. Drop in any image - a photo whose look you want, a frame you want to iterate on, someone else's render - and it uses a vision LLM to write the Z-Image-style narrative prompt for you. It's image-to-prompt, tuned for the one model family where the output actually matches how the encoder reads. It's also useful for variety: because prompt generation is seeded, the same image with different seeds gives you different-but-faithful descriptions to batch.
How it works. The node doesn't contain a model itself. It takes a llm_model from one of the pack's two provider nodes, looks at whether that LLM claims to support reasoning, and picks a pipeline accordingly. Reasoning on (cloud models with "Enable Reasoning", or local Qwen3-VL Thinking variants) → agentic mode: a multi-stage breakdown into subject, setting, pose, clothing, lighting, then a single assembled narrative prompt. Reasoning off → single-shot mode: one direct generation call, faster and often cleaner with small local models. That auto-switch is the pack's whole design bet, and it's why the metadata output exists - it reports what the analysis found (subject type, components, timing) so you can see what the LLM thought it was looking at.
The inputs you actually touch:
- image - the thing to analyze.
- llm_model - wire an SID_LLM_API or SID_LLM_Local node here. This is the brain.
- analysis_mode - Quick / Standard / Detailed / Extreme. Start at Standard; Quick is for iterating, Detailed or Extreme for a final quality pass.
- preset_style - Auto-Detect, Portrait, Fashion, Artistic, NSFW. Steers what the analysis focuses on.
- user_guidance - free text, e.g. "focus on the red dress."
prompt_length, image_resize, and seed round it out; leave them alone until you know you need them.
Outputs. prompt (STRING) goes to the positive-prompt input of your Z-Image checkpoint's CLIP Text Encode. width and height are the analyzed image's dimensions (handy if you want the generation to match the source). metadata is the JSON analysis report, debug the raw component output - both useful when something comes out looking wrong.
Install. ComfyUI Manager (search "AI Photography Toolkit"), or:
cd ComfyUI/custom_nodes
git clone https://github.com/slahiri/ComfyUI-AI-Photography-Toolkit.git
Restart ComfyUI and the pack installs its dependencies automatically (Anthropic/OpenAI SDKs, plus transformers and friends for the local node). No model downloads until you actually run it.
Gotchas. The biggest one is pairing: local models generally produce mushier agentic output, so the author recommends reasoning off for them - pick a non-Thinking Qwen3-VL and let it run single-shot. The first run is slow because the provider node pulls its model weights from Hugging Face. And if you use a cloud key, it lives in a plain widget value - strip it before you share the workflow JSON anywhere.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Input image to analyze | |
| llm_model | LLM_MODEL | Connect SID_LLM_API or SID_LLM_Local node | |
| analysis_mode | COMBO | Standard | Quick=fast, Standard=balanced, Detailed=full, Extreme=maximum |
| preset_style | COMBO | Auto-Detect | Focus area: Auto-Detect, Portrait, Fashion, Artistic, NSFW |
| image_resize | COMBO | auto | auto=optimal for model, max=highest detail, min=fastest, original=no resize |
| prompt_length | COMBO | Free | Short=30-60 words, Medium=80-150 words, Long=150-250 words, Free=no constraint |
| user_guidance | STRING | Optional: Custom instructions (e.g., 'focus on the red dress') | |
| seed | INT | 00–2147483647 | Random seed for reproducibility |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| prompt | STRING | — |
| width | INT | — |
| height | INT | — |
| metadata | STRING | JSON metadata about the analysis (subject type, components, timing) |
| debug | STRING | Debug information and raw component outputs |