r/StableDiffusion • • 16d ago

Resource - Update ComfyUI-SingleEncoderEnhancer

One node that rewrites your instruction with the text encoder's own language model and then encodes the result with that same model. You need no second LLM, the model loads once, and each reference picture goes through the vision tower once, for both the rewrite and the encode. But there is an option to use another refiner model also.

The main gain of time is in image-to -image mode and in text-to-image its very small.

The node was built for Qwen-Image-2.1 (Qwen3-VL encoder). It works with any CLIP that ComfyUI's Generate Text node can run. With other CLIPs, use Normal mode or connect a refiner CLIP to do the writing.

Images only. The node is for image generation and image editing: its inputs are text and still images (up to 16). Unlike Generate Text it has no video or audio inputs, and its output is image conditioning, not free text for other uses. For video or audio prompts, use Generate Text.

I have published it on Comfyui manager also and can also be downloaded from github: https://github.com/Magirad/ComfyUI-SingleEncoderEnhancer

28 Upvotes

6 comments sorted by

7

u/ROBOTTTTT13 16d ago

Main gain of what? What are we gaining exactly? I don't understand

1

u/Stock_Mycologist1104 16d ago

Time. See the charts at the end.

1

u/AdHistorical6734 16d ago

so it like pup/pe?

1

u/Stock_Mycologist1104 16d ago

Yes. This node uses the same clip model (if supported) to do the prompt enhancement but faster. Further as it only loads the model once it saves vram and time. I have tested it on Qwen 2.1, Moss and Fibo 2.

1

u/Calm_Mix_3776 15d ago

Why do you need a custom node for that? Can't you already do this with Comfy's native "Generate Text" node? Just connect the same text encoder from your "Load CLIP" node to "Generate Text" and give it a system prompt or instructions on how you would like it to augment your prompt and that's it. I don't get it.

1

u/Stock_Mycologist1104 15d ago

Every comparison has been made this way only. See the chart attached at the end. The generate text + test encoder mentioned in the images is exactly what you explained.