Skip to content

[core] Refactor condition embedders (and others) modules from pipelines#13781

Draft
sayakpaul wants to merge 6 commits into
mainfrom
refactor/condition-embedders-submodule
Draft

[core] Refactor condition embedders (and others) modules from pipelines#13781
sayakpaul wants to merge 6 commits into
mainfrom
refactor/condition-embedders-submodule

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

@sayakpaul sayakpaul commented May 21, 2026

What does this PR do?

We have a bunch of model-level components under src/diffusers/pipelines module. This PR factors them out of the pipelines module and places them under src/diffusers/models module strategically.

For reviewers

Main changes can be summarized as follows:

  • Move an existing model-level module (e.g., audio_tokenizer_ace_step.py) to src/diffusers/models and deprecate gracefully.
  • I have used my best judgment to determine which model gets to either of autoencoders and condition_embedders. When I wasn't sure, I simply placed them under others. No strong opinions here.
  • scripts/smoke_test_relocated_pretrained.py is for transient testing until the PR is merged. Will delete it after.
  • There is a tests/models/test_relocated_class_loading.py which will check if deprecation warnings are raised and will also help to remove those deprecation paths once the cycle is over.

@github-actions github-actions Bot added size/L PR with diff > 200 LOC models tests utils pipelines and removed size/L PR with diff > 200 LOC labels May 21, 2026
@github-actions github-actions Bot added the size/L PR with diff > 200 LOC label May 21, 2026
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants