HiDream-O1 in ComfyUI (Patreon)
Downloads
Content
Video - https://youtu.be/aZ7DR22o24E
Overview
HiDream-O1 is now supported natively in ComfyUI and right of the bat it seems HiDream-O1 dev/distilled/turbo was a bit "broken", so I've been avoiding that one. An updated release has been made - https://huggingface.co/HiDream-ai/HiDream-O1-Image-Dev-2604/tree/main - but there aren't any official ComfyUI conversions yet in their huggingface repo.
From their repo:
"HiDream-O1-Image is a natively unified image generative foundation model built on a Pixel-level Unified Transformer (UiT) without external VAEs or disjoint text encoders, which natively encodes raw pixels, text, and task-specific conditions in a single shared token space — supporting text-to-image, image editing, and subject-driven personalisation at up to 2,048 × 2,048."
That being said, the base model is very good at adhering to your prompt and at generating text - probably the best text generation I've seen yet. Where Z-Image and ERNIE fail, HiDream-O1 succeeds!
It isn't all flowers and rodents with the base model though, as it does tend to generate very "smooth" images - and often over-saturated too. This doesn't work at all well for "photorealism" (especially for human skin!). Other styles which benefit from this, such as cartoons, are OK.
Oh, it is also terrible at small hands.
It can generate initial images up to 2048x2048, so it is almost like a "high-res" ERNIE-Image.
Upscale image with something like Z-Image Turbo, and you can gain the benefit of prompt adherence alongside more photorealistic output.
Workflow Information
The attached workflow has quite a few options, detailed below.
Model downloads
As mentioned, I'd ignore the initial "dev" versions for the moment, but you can use them if you like.
Custom Nodes
Very few custom nodes needed for this one, as most things are native:
Model Loading
The "mxfp8" model versions are under 9GB, but you can select anything you've downloaded in the checkpoint loader.
If you're using a base model, then flip the switch to "true". If use dev, then flip the switch to "false". The default values in the Patch Seam Smoothing node are ok, but play around with thins such as passes and blend if you wish.
Notice how the skin details are unfortunately "smooth" either way.
Settings
All the usual settings are available for resolution, steps and CFG as well as that various initial and upscale generation groups:
Prompting
For prompting I've also included a version of their "Prompt Agent". Just flip the switch to enable:
Prompt: "An anime cartoon-style image of a hamster building a vertical rocket in his back yard at night"
Without prompt agent:
With prompt agent:
Prompt "Make a cool, photorealistic image of a furry, ginger cat looking at a pancake"
Prompt: "Generate a detailed, photorealistic image of a very old woman dressed as a pineapple who is teaching penguins at the zoo to tap-dance"
Reference Images
HiDream-O1 can use reference images, and these can help a bit with issue such as terrible-looking animal fur. Don't expect Qwen-Image-Edit capabilities though - these really are only rough references!
There are 2 image there by default, but you can use just a single image or attach more!
You can also use this group to change image styles.
Prompt: "Change the image style to claymation":
Image-2-Image
HiDream has fairly reasonable Image-2-Image capabilities, but it isn't what the model was built for, and who knows if they even tested it... but I have been!
This time I'm changing the image style to anime cartoon:
Inpainting
It can also do fairly reasonable inpainting too... and without a VAE to encode the image, only the masked area will change :)
Overall
In summary, it is a weird one. On the plus side it can generate text very well and it follows the prompt... but often the image quality leaves much to be desired. Still, i makes for a reasonable starting point which you can then upscale using whatever your favourite, slightly-less-good-at-prompt-following model is.
Enjoy!
:)