File size: 5,308 Bytes
96d64b3 5db4208 96d64b3 25e9d60 6322b15 6963cdc 6322b15 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 7524e09 6963cdc 7524e09 6963cdc 25e9d60 6963cdc 6322b15 6963cdc 6322b15 6963cdc 25e9d60 6963cdc 89170f5 6963cdc 89170f5 6963cdc 89170f5 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 4abee18 6963cdc 7524e09 6963cdc 4abee18 6963cdc 89170f5 6963cdc 89170f5 6963cdc 4abee18 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc 25e9d60 6963cdc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
---
license: mit
base_model:
- HiDream-ai/HiDream-I1-Full
- MiaoshouAI/Florence-2-large-PromptGen-v2.0
pipeline_tag: image-to-image
---
<div align="center">
# ๐ HiDream Img2Img ComfyUI Workflow
[](https://opensource.org/licenses/MIT)
[](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI)
[](https://replicate.com/goodguy1963/hidream-l1-full-img2img)
#### Advanced image-to-image generation with HiDream model suite and Florence-2 prompt generator
</div>
## ๐ Overview
This workflow combines the power of HiDream diffusion models with Florence-2 captioning for enhanced image-to-image generation in ComfyUI:
- โจ **Image-to-image generation** with the state-of-the-art HiDream diffusion model
- ๐ฎ **Optional Florence-2** intelligent prompt generation and image captioning
- ๐ผ๏ธ **VAE encoding/decoding** and advanced CLIP-based text encoding
- ๐ซ **Customizable negative prompts** for artifact reduction
- ๐ป **Low VRAM mode** available for systems with limited resources
## ๐ Try It Now!
You can test this workflow directly on Replicate:
[โถ๏ธ Run on Replicate](https://replicate.com/goodguy1963/hidream-l1-full-img2img)
## ๐ฅ Required Models & Setup
### ๐จ Diffusion Model
The workflow supports two HiDream model variants:
#### Full Model (Default)
- **`hidream_i1_full_fp16.safetensors`**
๐ Place in: `ComfyUI/models/diffusion_models`
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/diffusion_models/hidream_i1_full_fp16.safetensors)
#### Dev Model (Alternative)
- **`hidream_i1_dev_bf16.safetensors`**
๐ Place in: `ComfyUI/models/diffusion_models`
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/diffusion_models/hidream_i1_dev_bf16.safetensors)
> **Credit:** [HiDream.ai](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI)
### ๐ Text Encoders
๐ Place all in: `ComfyUI/models/text_encoders`
- **`clip_g_hidream.safetensors`**
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/text_encoders/clip_g_hidream.safetensors)
- **`clip_l_hidream.safetensors`**
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/text_encoders/clip_l_hidream.safetensors)
- **`llama_3.1_8b_instruct_fp8_scaled.safetensors`**
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/text_encoders/llama_3.1_8b_instruct_fp8_scaled.safetensors)
- **`t5xxl_fp8_e4m3fn_scaled.safetensors`**
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/text_encoders/t5xxl_fp8_e4m3fn_scaled.safetensors)
### ๐ผ๏ธ VAE
- **`ae.safetensors`**
๐ Place in: `ComfyUI/models/vae`
๐ฆ [Download](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI/blob/main/split_files/vae/ae.safetensors)
### ๐ Florence-2 Prompt Generator
- **Florence-2-large**
โก Automatic download at runtime
๐ฆ [Microsoft Florence-2](https://huggingface.co/microsoft/Florence-2-large)
> **Credit:** [MiaoshouAI](https://huggingface.co/MiaoshouAI/Florence-2-large-PromptGen-v2.0) for the optimized implementation
## ๐ก Usage Guide
1. Download all required models and place them in the correct directories as listed above
2. Import the workflow into ComfyUI
3. Load your input image, adjust settings as needed
4. Choose whether to use Florence-2 automatic captioning:
- **With Florence-2**: Provide a brief prefix that will be combined with the AI-generated caption
- **Without Florence-2**: Enter your complete custom prompt directly
5. Customize the negative prompt to avoid unwanted elements
6. Generate new images with enhanced quality
## ๐ป Low VRAM Mode (< 24GB VRAM)
<div align="center">
<img src="https://img.shields.io/badge/Memory-Efficient-brightgreen" alt="Memory Efficient"/>
</div>
For systems with limited VRAM, use this alternative setup:
1. Install [city96/ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF) custom node
2. Replace the standard Diffusion Model Loader with the **Unet LOADER** node
3. Download the optimized HiDream-I1 Full or DEV GGUF model:
- ๐ฆ [HiDream-I1-Full-gguf](https://huggingface.co/city96/HiDream-I1-Full-gguf/tree/main)
- ๐ฆ [HiDream-I1-DEV-gguf](https://huggingface.co/city96/HiDream-I1-Dev-gguf)
- ๐ Place in: `ComfyUI/models/unet`
## ๐ Workflow Diagram
<div align="center">
<img src="https://huggingface.co/hofixD/comfyui-hidream-l1-full-img2img/resolve/main/WORKFLOW-HIDREAM-IMG2IMG.png" alt="HiDream Workflow Diagram" width="85%"/>
</div>
## ๐ Acknowledgements
- **HiDream.ai** for the remarkable diffusion model and encoders
- **Microsoft** for the Florence-2 vision-language model
- **MiaoshouAI** for the Florence-2 prompt generator implementation
- **ComfyUI** team for the intuitive workflow engine
- **city96** for the GGUF optimization for low VRAM systems
---
<div align="center">
<p>โญ If you find this workflow useful, please consider starring the repository! โญ</p>
</div> |