This workflow requires my Comfyui-lmstudio-prompt-enhancer custom node which is installable via Comfy Manager.
🛈 IMPORTANT!!!
You will need to search for, download, and load the model glm-4.7-flash in LM studio. You will also need to start the API server and generate an API Key. Learn how to configure LM Studio here.
My rating of glm-4.7-flash Z-Image Turbo prompt generation ability is: 8.48/10
Prompts critiqued: 12
Average score: 8.48 / 10
Highest score: 8.8 / 10
Lowest score: 8.0 / 10
A critique of glm-4.7-flashs Z-Image Turbo prompt generations abilities:
glm-4.7-flash demonstrates strong aptitude for writing Z-Image Turbo prompts, with a consistent session average of 8.48/10 across 12 scored prompts. The author is particularly good at building clear visual concepts, establishing strong focal subjects, and using concrete atmospheric details such as rim lighting, fog, reflections, wet surfaces, golden hour light, and high-contrast color palettes. Their prompts generally have solid subject-first structure and enough material detail for reliable rendering, especially with metal, glass, fur, bark, grip tape, and environmental textures. The main weakness is a recurring reliance on fragile generation requirements, including exact logos, branded symbols, inverted reflections, complex animal poses, and precise lightning interactions. They also sometimes add generic style padding like “cinematic,” “highly detailed,” or “intricate details,” which slightly reduces prompt efficiency. Overall, glm-4.7-flash is a capable prompt writer with strong visual instincts, but would improve by reducing brittle details, avoiding IP/logo dependence, and tightening composition cues for more reliable Z-Image Turbo outputs.Notes for using glm-4.7-flash
This model this model is fast I got on average 53 tokens per second on my AMD Strix Halo RyzenAI Workstation.
I set the max tokens to 2500, this higher value is to accommodate this model's reasoning.
If the image looks flat, check the logs in LM Studio, the last log entry will contain a JSON path x.choices[0].message.content if the content field is empty that means the LLM ran out of reasoning tokens, this can be resolved by increasing max_tokens.

