Skip to content

Commit 715ed1d

Browse files
Fix small community pipeline import bug and finish README (huggingface#869)
* up * Finish
1 parent 25806fb commit 715ed1d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

dynamic_modules_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,11 @@ def find_pipeline_class(loaded_module):
168168

169169
pipeline_class = None
170170
for cls_name, cls in cls_members.items():
171-
if cls_name != DiffusionPipeline.__name__ and issubclass(cls, DiffusionPipeline):
171+
if (
172+
cls_name != DiffusionPipeline.__name__
173+
and issubclass(cls, DiffusionPipeline)
174+
and cls.__module__.split(".")[0] != "diffusers"
175+
):
172176
if pipeline_class is not None:
173177
raise ValueError(
174178
f"Multiple classes that inherit from {DiffusionPipeline.__name__} have been found:"

0 commit comments

Comments
 (0)