forked from huggingface/diffusers
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix PyCharm/VSCode static type checking for dummy objects (huggingfac…
…e#1596) * Fix PyCharm/VSCode static type checking for dummy objects * Re-add dummies * Fix AudioDiffusion imports * fix import * fix import * Update utils/check_dummies.py Co-authored-by: Pedro Cuenca <[email protected]> * Update src/diffusers/utils/import_utils.py * Update src/diffusers/__init__.py Co-authored-by: Patrick von Platen <[email protected]> * Update src/diffusers/pipelines/stable_diffusion/__init__.py * fix double import Co-authored-by: Pedro Cuenca <[email protected]> Co-authored-by: Patrick von Platen <[email protected]>
- Loading branch information
1 parent
03566d8
commit dbe0719
Showing
9 changed files
with
148 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
from ...utils import is_torch_available, is_transformers_available, is_transformers_version | ||
from ...utils import ( | ||
OptionalDependencyNotAvailable, | ||
is_torch_available, | ||
is_transformers_available, | ||
is_transformers_version, | ||
) | ||
|
||
|
||
if is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.25.0.dev0"): | ||
from .modeling_text_unet import UNetFlatConditionModel | ||
from .pipeline_versatile_diffusion import VersatileDiffusionPipeline | ||
from .pipeline_versatile_diffusion_dual_guided import VersatileDiffusionDualGuidedPipeline | ||
from .pipeline_versatile_diffusion_image_variation import VersatileDiffusionImageVariationPipeline | ||
from .pipeline_versatile_diffusion_text_to_image import VersatileDiffusionTextToImagePipeline | ||
else: | ||
try: | ||
if not (is_transformers_available() and is_torch_available() and is_transformers_version(">=", "4.25.0.dev0")): | ||
raise OptionalDependencyNotAvailable() | ||
except OptionalDependencyNotAvailable: | ||
from ...utils.dummy_torch_and_transformers_objects import ( | ||
VersatileDiffusionDualGuidedPipeline, | ||
VersatileDiffusionImageVariationPipeline, | ||
VersatileDiffusionPipeline, | ||
VersatileDiffusionTextToImagePipeline, | ||
) | ||
else: | ||
from .modeling_text_unet import UNetFlatConditionModel | ||
from .pipeline_versatile_diffusion import VersatileDiffusionPipeline | ||
from .pipeline_versatile_diffusion_dual_guided import VersatileDiffusionDualGuidedPipeline | ||
from .pipeline_versatile_diffusion_image_variation import VersatileDiffusionImageVariationPipeline | ||
from .pipeline_versatile_diffusion_text_to_image import VersatileDiffusionTextToImagePipeline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.