|
25 | 25 | from ..pipelines.stable_diffusion.clip_image_project_model import CLIPImageProjection |
26 | 26 | from ..pipelines.stable_diffusion.stable_unclip_image_normalizer import StableUnCLIPImageNormalizer |
27 | 27 | from ..pipelines.unclip.text_proj import UnCLIPTextProjModel |
28 | | -from ..pipelines.unidiffuser.modeling_text_decoder import UniDiffuserTextDecoder |
29 | 28 | from ..pipelines.unidiffuser.modeling_uvit import UniDiffuserModel, UTransformer2DModel |
30 | 29 | from ..pipelines.wuerstchen.modeling_paella_vq_model import PaellaVQModel |
31 | 30 | from ..pipelines.wuerstchen.modeling_wuerstchen_diffnext import WuerstchenDiffNeXt |
32 | 31 | from ..pipelines.wuerstchen.modeling_wuerstchen_prior import WuerstchenPrior |
| 32 | +from ..utils.import_utils import is_transformers_available |
33 | 33 | from .adapter import MultiAdapter, T2IAdapter |
34 | 34 | from .autoencoders.autoencoder_asym_kl import AsymmetricAutoencoderKL |
35 | 35 | from .autoencoders.autoencoder_dc import AutoencoderDC |
|
90 | 90 | from .unets.uvit_2d import UVit2DModel |
91 | 91 |
|
92 | 92 |
|
| 93 | +if is_transformers_available(): |
| 94 | + from ..pipelines.unidiffuser.modeling_text_decoder import UniDiffuserTextDecoder |
| 95 | + |
93 | 96 | AUTO_MODEL_MAPPING = OrderedDict( |
94 | 97 | [ |
95 | 98 | ("multi-adapter", MultiAdapter), |
|
167 | 170 | ("clip-image-projection", CLIPImageProjection), |
168 | 171 | ("stable-unclip-image-normalizer", StableUnCLIPImageNormalizer), |
169 | 172 | ("unclip-text-proj", UnCLIPTextProjModel), |
170 | | - ("unidiffuser-text-decoder", UniDiffuserTextDecoder), |
171 | 173 | ("utransformer-2d", UTransformer2DModel), |
172 | 174 | ("unidiffuser", UniDiffuserModel), |
173 | 175 | ("paella-vq", PaellaVQModel), |
|
177 | 179 | ) |
178 | 180 |
|
179 | 181 |
|
| 182 | +if is_transformers_available(): |
| 183 | + AUTO_MODEL_MAPPING["unidiffuser-text-decoder"] = UniDiffuserTextDecoder |
| 184 | + |
| 185 | + |
180 | 186 | SUPPORTED_TASKS_MAPPINGS = [AUTO_MODEL_MAPPING] |
181 | 187 |
|
182 | 188 |
|
|
0 commit comments