[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72460":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":14,"stars7d":14,"stars30d":15,"stars90d":14,"forks30d":14,"starsTrendScore":14,"compositeScore":16,"rankGlobal":8,"rankLanguage":8,"license":17,"archived":18,"fork":18,"defaultBranch":19,"hasWiki":20,"hasPages":18,"topics":21,"createdAt":8,"pushedAt":8,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":14,"starSnapshotCount":14,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},72460,"HiDream-I1","HiDream-ai\u002FHiDream-I1","HiDream-ai",null,"Python",2501,246,27,53,0,3,56.48,"MIT License",false,"main",true,[],"2026-06-12 04:01:05","# HiDream-I1\n\n![HiDream-I1 Demo](assets\u002Fdemo.jpg)\n\n\n\n`HiDream-I1` is a new open-source image generative foundation model with 17B parameters that achieves state-of-the-art image generation quality within seconds.\n\n\u003Cspan style=\"color: #FF5733; font-weight: bold\">For more features and to experience the full capabilities of our product, please visit [https:\u002F\u002Fvivago.ai\u002F](https:\u002F\u002Fvivago.ai\u002F).\u003C\u002Fspan>\n\n## Project Updates\n- 🌟 **July 16, 2025**: We've open-sourced the updated image editing model [**HiDream-E1-1**](https:\u002F\u002Fgithub.com\u002FHiDream-ai\u002FHiDream-E1).\n- 📝 **May 28, 2025**: We've released our technical report [HiDream-I1: A High-Efficient Image Generative Foundation Model with Sparse Diffusion Transformer](https:\u002F\u002Farxiv.org\u002Fabs\u002F2505.22705).\n- 🚀 **April 28, 2025**: We've open-sourced the instruction-based-image-editing model [**HiDream-E1-Full**](https:\u002F\u002Fgithub.com\u002FHiDream-ai\u002FHiDream-E1). Experience at [https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHiDream-ai\u002FHiDream-E1-Full](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHiDream-ai\u002FHiDream-E1-Full)!. \n- 🤗 **April 11, 2025**: HiDream is now officially supported in the `diffusers` library. Check out the docs [here](https:\u002F\u002Fhuggingface.co\u002Fdocs\u002Fdiffusers\u002Fmain\u002Fen\u002Fapi\u002Fpipelines\u002Fhidream).\n- 🤗 **April 8, 2025**: We've launched a Hugging Face Space for **HiDream-I1-Dev**. Experience our model firsthand at [https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHiDream-ai\u002FHiDream-I1-Dev](https:\u002F\u002Fhuggingface.co\u002Fspaces\u002FHiDream-ai\u002FHiDream-I1-Dev)!\n- 🚀 **April 7, 2025**: We've open-sourced the text-to-image model **HiDream-I1**. \n\n\n## Models\n\nWe offer both the full version and distilled models. For more information about the models, please refer to the link under Usage.\n\n| Name            | Script                                             | Inference Steps | HuggingFace repo       |\n| --------------- | -------------------------------------------------- | --------------- | ---------------------- |\n| HiDream-I1-Full | [inference.py](.\u002Finference.py)                     | 50              | 🤗 [HiDream-I1-Full](https:\u002F\u002Fhuggingface.co\u002FHiDream-ai\u002FHiDream-I1-Full)  |\n| HiDream-I1-Dev  | [inference.py](.\u002Finference.py)                     | 28              | 🤗 [HiDream-I1-Dev](https:\u002F\u002Fhuggingface.co\u002FHiDream-ai\u002FHiDream-I1-Dev) |\n| HiDream-I1-Fast | [inference.py](.\u002Finference.py)                     | 16              | 🤗 [HiDream-I1-Fast](https:\u002F\u002Fhuggingface.co\u002FHiDream-ai\u002FHiDream-I1-Fast) |\n\n\n## Quick Start\nPlease make sure you have installed [Flash Attention](https:\u002F\u002Fgithub.com\u002FDao-AILab\u002Fflash-attention). We recommend CUDA versions 12.4 for the manual installation.\n\n```sh\npip install -r requirements.txt\npip install -U flash-attn --no-build-isolation\n```\n\nThen you can run the inference scripts to generate images:\n\n``` python \n# For full model inference\npython .\u002Finference.py --model_type full\n\n# For distilled dev model inference\npython .\u002Finference.py --model_type dev\n\n# For distilled fast model inference\npython .\u002Finference.py --model_type fast\n```\n\n> [!NOTE]\n> The inference script will try to automatically download `meta-llama\u002FLlama-3.1-8B-Instruct` model files. You need to [agree to the license of the Llama model](https:\u002F\u002Fhuggingface.co\u002Fmeta-llama\u002FLlama-3.1-8B-Instruct) on your HuggingFace account and login using `huggingface-cli login` in order to use the automatic downloader.\n\n## Gradio Demo\n\nWe also provide a Gradio demo for interactive image generation. You can run the demo with:\n\n``` python\npython gradio_demo.py \n```\n\n## Inference with Diffusers\n\nWe recommend install Diffusers from source for better compatibility.\n\n```shell\npip install git+https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Fdiffusers.git\n```\n\nThen you can inference **HiDream-I1** with the following command:\n\n```python\nimport torch\nfrom transformers import PreTrainedTokenizerFast, LlamaForCausalLM\nfrom diffusers import HiDreamImagePipeline\ntokenizer_4 = PreTrainedTokenizerFast.from_pretrained(\"meta-llama\u002FMeta-Llama-3.1-8B-Instruct\")\ntext_encoder_4 = LlamaForCausalLM.from_pretrained(\n    \"meta-llama\u002FMeta-Llama-3.1-8B-Instruct\",\n    output_hidden_states=True,\n    output_attentions=True,\n    torch_dtype=torch.bfloat16,\n)\n\npipe = HiDreamImagePipeline.from_pretrained(\n    \"HiDream-ai\u002FHiDream-I1-Full\",  # \"HiDream-ai\u002FHiDream-I1-Dev\" | \"HiDream-ai\u002FHiDream-I1-Fast\"\n    tokenizer_4=tokenizer_4,\n    text_encoder_4=text_encoder_4,\n    torch_dtype=torch.bfloat16,\n)\n\npipe = pipe.to('cuda')\n\nimage = pipe(\n    'A cat holding a sign that says \"HiDream.ai\".',\n    height=1024,\n    width=1024,\n    guidance_scale=5.0,  # 0.0 for Dev&Fast\n    num_inference_steps=50,  # 28 for Dev and 16 for Fast\n    generator=torch.Generator(\"cuda\").manual_seed(0),\n).images[0]\nimage.save(\"output.png\")\n```\n\n## Evaluation Metrics\n\n### DPG-Bench\n| Model          | Overall   | Global | Entity | Attribute | Relation | Other |\n| -------------- | --------- | ------ | ------ | --------- | -------- | ----- |\n| PixArt-alpha   | 71.11     | 74.97  | 79.32  | 78.60     | 82.57    | 76.96 |\n| SDXL           | 74.65     | 83.27  | 82.43  | 80.91     | 86.76    | 80.41 |\n| DALL-E 3       | 83.50     | 90.97  | 89.61  | 88.39     | 90.58    | 89.83 |\n| Flux.1-dev     | 83.79     | 85.80  | 86.79  | 89.98     | 90.04    | 89.90 |\n| SD3-Medium     | 84.08     | 87.90  | 91.01  | 88.83     | 80.70    | 88.68 |\n| Janus-Pro-7B   | 84.19     | 86.90  | 88.90  | 89.40     | 89.32    | 89.48 |\n| CogView4-6B    | 85.13     | 83.85  | 90.35  | 91.17     | 91.14    | 87.29 |\n| **HiDream-I1** | **85.89** | 76.44  | 90.22  | 89.48     | 93.74    | 91.83 |\n\n### GenEval\n\n| Model          | Overall  | Single Obj. | Two Obj. | Counting | Colors | Position | Color attribution |\n| -------------- | -------- | ----------- | -------- | -------- | ------ | -------- | ----------------- |\n| SDXL           | 0.55     | 0.98        | 0.74     | 0.39     | 0.85   | 0.15     | 0.23              |\n| PixArt-alpha   | 0.48     | 0.98        | 0.50     | 0.44     | 0.80   | 0.08     | 0.07              |\n| Flux.1-dev     | 0.66     | 0.98        | 0.79     | 0.73     | 0.77   | 0.22     | 0.45              |\n| DALL-E 3       | 0.67     | 0.96        | 0.87     | 0.47     | 0.83   | 0.43     | 0.45              |\n| CogView4-6B    | 0.73     | 0.99        | 0.86     | 0.66     | 0.79   | 0.48     | 0.58              |\n| SD3-Medium     | 0.74     | 0.99        | 0.94     | 0.72     | 0.89   | 0.33     | 0.60              |\n| Janus-Pro-7B   | 0.80     | 0.99        | 0.89     | 0.59     | 0.90   | 0.79     | 0.66              |\n| **HiDream-I1** | **0.83** | 1.00        | 0.98     | 0.79     | 0.91   | 0.60     | 0.72              |\n\n### HPSv2.1 benchmark\n\n| Model                 | Averaged  | Animation | Concept-art | Painting | Photo |\n| --------------------- | --------- | --------- | ----------- | -------- | ----- |\n| Stable Diffusion v2.0 | 26.38     | 27.09     | 26.02       | 25.68    | 26.73 |\n| Midjourney V6         | 30.29     | 32.02     | 30.29       | 29.74    | 29.10 |\n| SDXL                  | 30.64     | 32.84     | 31.36       | 30.86    | 27.48 |\n| Dall-E3               | 31.44     | 32.39     | 31.09       | 31.18    | 31.09 |\n| SD3                   | 31.53     | 32.60     | 31.82       | 32.06    | 29.62 |\n| Midjourney V5         | 32.33     | 34.05     | 32.47       | 32.24    | 30.56 |\n| CogView4-6B           | 32.31     | 33.23     | 32.60       | 32.89    | 30.52 |\n| Flux.1-dev            | 32.47     | 33.87     | 32.27       | 32.62    | 31.11 |\n| stable cascade        | 32.95     | 34.58     | 33.13       | 33.29    | 30.78 |\n| **HiDream-I1**        | **33.82** | 35.05     | 33.74       | 33.88    | 32.61 |\n\n## License\n\nThe code in this repository and the HiDream-I1 models are licensed under [MIT License](.\u002FLICENSE).\n\n## Citation\n\n```bibtex\n@article{hidreami1technicalreport,\n  title={HiDream-I1: A High-Efficient Image Generative Foundation Model with Sparse Diffusion Transformer},\n  author={Cai, Qi and Chen, Jingwen and Chen, Yang and Li, Yehao and Long, Fuchen and Pan, Yingwei and Qiu, Zhaofan and Zhang, Yiheng and Gao, Fengbin and Xu, Peihan and others},\n  journal={arXiv preprint arXiv:2505.22705},\n  year={2025}\n}\n```\n","HiDream-I1 是一个拥有170亿参数的开源图像生成基础模型，能够在几秒钟内生成高质量的图像。该项目采用Python语言编写，并基于稀疏扩散变换器技术实现高效图像生成。它提供了多种版本的模型，包括完整版和精简版，以适应不同需求。用户可以通过Hugging Face平台体验该模型的功能，适用于需要快速生成高质量图像的场景，如创意设计、广告制作等。项目支持Flash Attention加速计算，并推荐使用CUDA 12.4进行手动安装。",2,"2026-06-11 03:42:08","high_star"]