hofixD's picture
Update README.md
7524e09 verified
---
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
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Hugging Face](https://img.shields.io/badge/๐Ÿค—%20Hugging%20Face-Models-blue)](https://huggingface.co/Comfy-Org/HiDream-I1_ComfyUI)
[![Replicate](https://img.shields.io/badge/Replicate-Demo-brightgreen)](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>