Skip to content

Fix DreamLite legacy block type aliases#14066

Open
ElectricGoal wants to merge 1 commit into
huggingface:mainfrom
ElectricGoal:fix-dreamlite-legacy-block-aliases
Open

Fix DreamLite legacy block type aliases#14066
ElectricGoal wants to merge 1 commit into
huggingface:mainfrom
ElectricGoal:fix-dreamlite-legacy-block-aliases

Conversation

@ElectricGoal

@ElectricGoal ElectricGoal commented Jun 25, 2026

Copy link
Copy Markdown

What does this PR do?

Fixes #14065.

carlofkl/DreamLite-base saves DreamLite UNet block type names using upstream-style strings such as CrossAttnDownRemoveSelfAttnBlock2D, CrossAttnUpBlock2D, and CrossAttnUpRemoveSelfAttnBlock2DV1.

DreamLiteUNetModel currently only accepts the DreamLite-local class names, so DreamLitePipeline.from_pretrained("carlofkl/DreamLite-base") fails while constructing the UNet.

This PR adds a small alias normalization step in the DreamLite block dispatch helpers so those saved config values map to the existing DreamLite block classes. It also adds a focused regression test using the exact block strings from the public
checkpoint config.

Coordination issue: #14065

Before submitting

Tests

../.venv_dreamlite/bin/python -m pytest tests/pipelines/dreamlite/test_pipeline_dreamlite.py::DreamLitePipelineFastTests::test_legacy_block_type_aliases -q
# 1 passed, 3 warnings in 1.36s

../.venv_dreamlite/bin/python -m ruff check src/diffusers/models/unets/unet_dreamlite.py tests/pipelines/dreamlite/test_pipeline_dreamlite.py
# All checks passed!

../.venv_dreamlite/bin/python -m ruff format --check src/diffusers/models/unets/unet_dreamlite.py tests/pipelines/dreamlite/test_pipeline_dreamlite.py
# 2 files already formatted

../.venv_dreamlite/bin/python -m compileall -q src/diffusers/models/unets/unet_dreamlite.py tests/pipelines/dreamlite/test_pipeline_dreamlite.py
git diff --check
# passed

Who can review?

Pipelines and models: @Carlofkl

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DreamLite-base fails to load due to unsupported legacy UNet block type names

1 participant