Skip to content

Commit 09eed8f

Browse files
committed
Merge branch 'refs/heads/semantic-hunyuan' into semantic_dits
# Conflicts: # src/diffusers/__init__.py
2 parents 98930ee + 9220a4f commit 09eed8f

File tree

6 files changed

+1276
-0
lines changed

6 files changed

+1276
-0
lines changed

src/diffusers/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@
300300
"PixArtAlphaPipeline",
301301
"PixArtSigmaPAGPipeline",
302302
"PixArtSigmaPipeline",
303+
"SemanticHunyuanDiTPipeline",
303304
"SemanticStableDiffusionPipeline",
304305
"ShapEImg2ImgPipeline",
305306
"ShapEPipeline",
@@ -739,6 +740,7 @@
739740
PixArtAlphaPipeline,
740741
PixArtSigmaPAGPipeline,
741742
PixArtSigmaPipeline,
743+
SemanticHunyuanDiTPipeline,
742744
SemanticStableDiffusionPipeline,
743745
ShapEImg2ImgPipeline,
744746
ShapEPipeline,

src/diffusers/pipelines/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@
232232
_import_structure["paint_by_example"] = ["PaintByExamplePipeline"]
233233
_import_structure["pia"] = ["PIAPipeline"]
234234
_import_structure["pixart_alpha"] = ["PixArtAlphaPipeline", "PixArtSigmaPipeline"]
235+
_import_structure["semantic_hunyuandit"] = ["SemanticHunyuanDiTPipeline"]
235236
_import_structure["semantic_stable_diffusion"] = ["SemanticStableDiffusionPipeline"]
236237
_import_structure["shap_e"] = ["ShapEImg2ImgPipeline", "ShapEPipeline"]
237238
_import_structure["stable_audio"] = [
@@ -556,6 +557,7 @@
556557
from .paint_by_example import PaintByExamplePipeline
557558
from .pia import PIAPipeline
558559
from .pixart_alpha import PixArtAlphaPipeline, PixArtSigmaPipeline
560+
from .semantic_hunyuandit import SemanticHunyuanDiTPipeline
559561
from .semantic_stable_diffusion import SemanticStableDiffusionPipeline
560562
from .shap_e import ShapEImg2ImgPipeline, ShapEPipeline
561563
from .stable_audio import StableAudioPipeline, StableAudioProjectionModel
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from typing import TYPE_CHECKING
2+
3+
from ...utils import (
4+
DIFFUSERS_SLOW_IMPORT,
5+
OptionalDependencyNotAvailable,
6+
_LazyModule,
7+
get_objects_from_module,
8+
is_torch_available,
9+
is_transformers_available,
10+
)
11+
12+
13+
_dummy_objects = {}
14+
_import_structure = {}
15+
16+
try:
17+
if not (is_transformers_available() and is_torch_available()):
18+
raise OptionalDependencyNotAvailable()
19+
except OptionalDependencyNotAvailable:
20+
from ...utils import dummy_torch_and_transformers_objects # noqa F403
21+
22+
_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_objects))
23+
else:
24+
_import_structure["pipeline_semantic_hunyuandit"] = ["SemanticHunyuanDiTPipeline"]
25+
26+
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
27+
try:
28+
if not (is_transformers_available() and is_torch_available()):
29+
raise OptionalDependencyNotAvailable()
30+
31+
except OptionalDependencyNotAvailable:
32+
from ...utils.dummy_torch_and_transformers_objects import *
33+
else:
34+
from .pipeline_semantic_hunyuandit import SemanticHunyuanDiTPipeline
35+
36+
else:
37+
import sys
38+
39+
sys.modules[__name__] = _LazyModule(
40+
__name__,
41+
globals()["__file__"],
42+
_import_structure,
43+
module_spec=__spec__,
44+
)
45+
46+
for name, value in _dummy_objects.items():
47+
setattr(sys.modules[__name__], name, value)

0 commit comments

Comments
 (0)