File tree Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Expand file tree Collapse file tree 3 files changed +25
-6
lines changed Original file line number Diff line number Diff line change 352352 "CogView3PlusPipeline" ,
353353 "CogView4ControlPipeline" ,
354354 "CogView4Pipeline" ,
355- "ConsisIDPipeline" ,
356355 "CycleDiffusionPipeline" ,
357356 "EasyAnimateControlPipeline" ,
358357 "EasyAnimateInpaintPipeline" ,
518517 ]
519518 )
520519
520+
521+ try :
522+ if not (is_torch_available () and is_transformers_available ()):
523+ raise OptionalDependencyNotAvailable ()
524+ except OptionalDependencyNotAvailable :
525+ from .utils import dummy_torch_and_transformers_and_opencv_objects # noqa F403
526+
527+ _import_structure ["utils.dummy_torch_and_transformers_and_opencv_objects" ] = [
528+ name for name in dir (dummy_torch_and_transformers_and_opencv_objects ) if not name .startswith ("_" )
529+ ]
530+
531+ else :
532+ _import_structure ["pipelines" ].extend (
533+ [
534+ "ConsisIDPipeline" ,
535+ ]
536+ )
537+
538+
521539try :
522540 if not (is_torch_available () and is_transformers_available () and is_k_diffusion_available ()):
523541 raise OptionalDependencyNotAvailable ()
Original file line number Diff line number Diff line change 88 is_torch_available ,
99 is_transformers_available ,
1010)
11+ from ...utils .import_utils import is_opencv_available
1112
1213
1314_dummy_objects = {}
1415_import_structure = {}
1516
1617
1718try :
18- if not (is_transformers_available () and is_torch_available ()):
19+ if not (is_transformers_available () and is_torch_available () and is_opencv_available () ):
1920 raise OptionalDependencyNotAvailable ()
2021except OptionalDependencyNotAvailable :
21- from ...utils import dummy_torch_and_transformers_objects # noqa F403
22+ from ...utils import dummy_torch_and_transformers_and_opencv_objects # noqa F403
2223
23- _dummy_objects .update (get_objects_from_module (dummy_torch_and_transformers_objects ))
24+ _dummy_objects .update (get_objects_from_module (dummy_torch_and_transformers_and_opencv_objects ))
2425else :
2526 _import_structure ["pipeline_consisid" ] = ["ConsisIDPipeline" ]
2627
2728if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT :
2829 try :
29- if not (is_transformers_available () and is_torch_available ()):
30+ if not (is_transformers_available () and is_torch_available () and is_opencv_available () ):
3031 raise OptionalDependencyNotAvailable ()
3132
3233 except OptionalDependencyNotAvailable :
33- from ...utils .dummy_torch_and_transformers_objects import *
34+ from ...utils .dummy_torch_and_transformers_and_opencv_objects import *
3435 else :
3536 from .pipeline_consisid import ConsisIDPipeline
3637
You can’t perform that action at this time.
0 commit comments