Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/diffusers/pipelines/kolors/pipeline_kolors.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ def retrieve_timesteps(


class KolorsPipeline(DiffusionPipeline, StableDiffusionMixin, StableDiffusionXLLoraLoaderMixin, IPAdapterMixin):

r"""
Pipeline for text-to-image generation using Kolors.

Expand Down
4 changes: 4 additions & 0 deletions src/diffusers/plus_pipelines/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
"EllaFixedDiffusionPipeline",
"EllaFlexDiffusionPipeline",
]
_import_structure["kolors_controlnet"] = [
"KolorsControlNetPipeline",
]

if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
try:
Expand All @@ -64,6 +67,7 @@
from ..utils.dummy_torch_and_transformers_objects import *
else:
from .ella import EllaFixedDiffusionPipeline, EllaFlexDiffusionPipeline
from .kolors_controlnet import KolorsControlNetPipeline

else:
import sys
Expand Down
64 changes: 64 additions & 0 deletions src/diffusers/plus_pipelines/kolors_controlnet/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
from typing import TYPE_CHECKING

from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_flax_available,
is_k_diffusion_available,
is_k_diffusion_version,
is_onnx_available,
is_torch_available,
is_transformers_available,
is_transformers_version,
)


_dummy_objects = {}
_additional_imports = {}
_import_structure = {"pipeline_output": ["StableDiffusionPipelineOutput"]}

try:
if not (is_transformers_available() and is_torch_available()):
raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
from ...utils import dummy_torch_and_transformers_objects # noqa F403

_dummy_objects.update(get_objects_from_module(dummy_torch_and_transformers_objects))
else:
_import_structure["pipeline_controlnet_xl_kolors"] = [
"KolorsControlNetPipeline",
]
_import_structure["safety_checker"] = ["StableDiffusionSafetyChecker"]


if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
try:
if not (is_transformers_available() and is_torch_available()):
raise OptionalDependencyNotAvailable()

except OptionalDependencyNotAvailable:
from ...utils.dummy_torch_and_transformers_objects import *

else:
from .pipeline_stable_diffusion import (
EllaFixedDiffusionPipeline,
EllaFlexDiffusionPipeline,
StableDiffusionPipelineOutput,
StableDiffusionSafetyChecker,
)
else:
import sys

sys.modules[__name__] = _LazyModule(
__name__,
globals()["__file__"],
_import_structure,
module_spec=__spec__,
)

for name, value in _dummy_objects.items():
setattr(sys.modules[__name__], name, value)
for name, value in _additional_imports.items():
setattr(sys.modules[__name__], name, value)
Loading