Skip to content

Commit 0ef2935

Browse files
hlkygithub-actions[bot]a-r-r-o-w
authored
HiDream Image (#11231)
* HiDream Image --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Aryan <[email protected]> Co-authored-by: Aryan <[email protected]>
1 parent bc26105 commit 0ef2935

15 files changed

+1976
-1
lines changed

docs/source/en/_toctree.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@
175175
title: gguf
176176
- local: quantization/torchao
177177
title: torchao
178-
- local: quantization/quanto
178+
- local: quantization/quanto
179179
title: quanto
180180
title: Quantization Methods
181181
- sections:
@@ -300,6 +300,8 @@
300300
title: EasyAnimateTransformer3DModel
301301
- local: api/models/flux_transformer
302302
title: FluxTransformer2DModel
303+
- local: api/models/hidream_image_transformer
304+
title: HiDreamImageTransformer2DModel
303305
- local: api/models/hunyuan_transformer2d
304306
title: HunyuanDiT2DModel
305307
- local: api/models/hunyuan_video_transformer_3d
@@ -446,6 +448,8 @@
446448
title: Flux
447449
- local: api/pipelines/control_flux_inpaint
448450
title: FluxControlInpaint
451+
- local: api/pipelines/hidream
452+
title: HiDream-I1
449453
- local: api/pipelines/hunyuandit
450454
title: Hunyuan-DiT
451455
- local: api/pipelines/hunyuan_video
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!-- Copyright 2024 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License. -->
11+
12+
# HiDreamImageTransformer2DModel
13+
14+
A Transformer model for image-like data from [HiDream-I1](https://huggingface.co/HiDream-ai).
15+
16+
The model can be loaded with the following code snippet.
17+
18+
```python
19+
from diffusers import HiDreamImageTransformer2DModel
20+
21+
transformer = HiDreamImageTransformer2DModel.from_pretrained("HiDream-ai/HiDream-I1-Full", subfolder="transformer", torch_dtype=torch.bfloat16)
22+
```
23+
24+
## HiDreamImageTransformer2DModel
25+
26+
[[autodoc]] HiDreamImageTransformer2DModel
27+
28+
## Transformer2DModelOutput
29+
30+
[[autodoc]] models.modeling_outputs.Transformer2DModelOutput
+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<!-- Copyright 2024 The HuggingFace Team. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License. -->
14+
15+
# HiDreamImage
16+
17+
[HiDream-I1](https://huggingface.co/HiDream-ai) by HiDream.ai
18+
19+
<Tip>
20+
21+
Make sure to check out the Schedulers [guide](../../using-diffusers/schedulers) to learn how to explore the tradeoff between scheduler speed and quality, and see the [reuse components across pipelines](../../using-diffusers/loading#reuse-a-pipeline) section to learn how to efficiently load the same components into multiple pipelines.
22+
23+
</Tip>
24+
25+
## Available models
26+
27+
The following models are available for the [`HiDreamImagePipeline`](text-to-image) pipeline:
28+
29+
| Model name | Description |
30+
|:---|:---|
31+
| [`HiDream-ai/HiDream-I1-Full`](https://huggingface.co/HiDream-ai/HiDream-I1-Full) | - |
32+
| [`HiDream-ai/HiDream-I1-Dev`](https://huggingface.co/HiDream-ai/HiDream-I1-Dev) | - |
33+
| [`HiDream-ai/HiDream-I1-Fast`](https://huggingface.co/HiDream-ai/HiDream-I1-Fast) | - |
34+
35+
## HiDreamImagePipeline
36+
37+
[[autodoc]] HiDreamImagePipeline
38+
- all
39+
- __call__
40+
41+
## HiDreamImagePipelineOutput
42+
43+
[[autodoc]] pipelines.hidream_image.pipeline_output.HiDreamImagePipelineOutput

src/diffusers/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@
171171
"FluxControlNetModel",
172172
"FluxMultiControlNetModel",
173173
"FluxTransformer2DModel",
174+
"HiDreamImageTransformer2DModel",
174175
"HunyuanDiT2DControlNetModel",
175176
"HunyuanDiT2DModel",
176177
"HunyuanDiT2DMultiControlNetModel",
@@ -368,6 +369,7 @@
368369
"FluxInpaintPipeline",
369370
"FluxPipeline",
370371
"FluxPriorReduxPipeline",
372+
"HiDreamImagePipeline",
371373
"HunyuanDiTControlNetPipeline",
372374
"HunyuanDiTPAGPipeline",
373375
"HunyuanDiTPipeline",
@@ -761,6 +763,7 @@
761763
FluxControlNetModel,
762764
FluxMultiControlNetModel,
763765
FluxTransformer2DModel,
766+
HiDreamImageTransformer2DModel,
764767
HunyuanDiT2DControlNetModel,
765768
HunyuanDiT2DModel,
766769
HunyuanDiT2DMultiControlNetModel,
@@ -937,6 +940,7 @@
937940
FluxInpaintPipeline,
938941
FluxPipeline,
939942
FluxPriorReduxPipeline,
943+
HiDreamImagePipeline,
940944
HunyuanDiTControlNetPipeline,
941945
HunyuanDiTPAGPipeline,
942946
HunyuanDiTPipeline,

src/diffusers/models/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
_import_structure["transformers.transformer_cogview4"] = ["CogView4Transformer2DModel"]
7777
_import_structure["transformers.transformer_easyanimate"] = ["EasyAnimateTransformer3DModel"]
7878
_import_structure["transformers.transformer_flux"] = ["FluxTransformer2DModel"]
79+
_import_structure["transformers.transformer_hidream_image"] = ["HiDreamImageTransformer2DModel"]
7980
_import_structure["transformers.transformer_hunyuan_video"] = ["HunyuanVideoTransformer3DModel"]
8081
_import_structure["transformers.transformer_ltx"] = ["LTXVideoTransformer3DModel"]
8182
_import_structure["transformers.transformer_lumina2"] = ["Lumina2Transformer2DModel"]
@@ -151,6 +152,7 @@
151152
DualTransformer2DModel,
152153
EasyAnimateTransformer3DModel,
153154
FluxTransformer2DModel,
155+
HiDreamImageTransformer2DModel,
154156
HunyuanDiT2DModel,
155157
HunyuanVideoTransformer3DModel,
156158
LatteTransformer3DModel,

src/diffusers/models/transformers/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from .transformer_cogview4 import CogView4Transformer2DModel
2222
from .transformer_easyanimate import EasyAnimateTransformer3DModel
2323
from .transformer_flux import FluxTransformer2DModel
24+
from .transformer_hidream_image import HiDreamImageTransformer2DModel
2425
from .transformer_hunyuan_video import HunyuanVideoTransformer3DModel
2526
from .transformer_ltx import LTXVideoTransformer3DModel
2627
from .transformer_lumina2 import Lumina2Transformer2DModel

0 commit comments

Comments
 (0)