from_pretrained fails loading deprecated pipelines

Open Beginner friendly
#14,008 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python

Research direction

Start in src/diffusers/pipelines/pipeline_loading_utils.py at _get_custom_components_and_folders, then reproduce with DiffusionPipeline.from_pretrained("warp-ai/wuerstchen-prior"). Compare the existing diffusers.pipelines lookup with the deprecated module location described in the issue. Done means the deprecated Wuerstchen pipeline loads instead of raising the missing-module ValueError.

Written by the indexing model from the issue text.

Description

Note: I understand these pipelines are deprecated and bugfixes aren't accepted anymore. But this seems to be a bug in the process of moving pipelines to deprecated itself

Describe the bug

_get_custom_components_and_folders (src/diffusers/pipelines/pipeline_loading_utils.py) resolves custom pipeline components by checking hasattr(diffusers.pipelines, module_candidate). Since #13157 moved several pipelines (e.g. Wuerstchen) to diffusers.pipelines.deprecated.<name>, that check no longer finds them, even though the relocated module still exists.

Reproduction
from diffusers import DiffusionPipeline
DiffusionPipeline.from_pretrained("warp-ai/wuerstchen-prior")
ValueError: prior/wuerstchen.py as defined in `model_index.json` does not exist in warp-ai/wuerstchen-prior and is not a module in 'diffusers/pipelines'.

model_index.json declares "prior": ["wuerstchen", "WuerstchenPrior"]. hasattr(diffusers.pipelines, "wuerstchen") is False, but hasattr(diffusers.pipelines.deprecated, "wuerstchen") is True — confirming the module just moved out from under the check.

Suggested fix: have _get_custom_components_and_folders also check diffusers.pipelines.deprecated before raising.

System Info
  • diffusers commit: 0f1abc4ae8b0eb2a3b40e82a310507281144c423 (main)
  • Python: 3.12
  • Platform: Linux
Who can help?

@yiyixuxu @stevhliu


Drafted by Claude

Dominant language
Python
Stars
34.6k
Forks
7.3k
Avg merge
3d 18h
Merged PRs (30d)
77

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/diffusers

All issues in huggingface/diffusers

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.