diffusers
diffusers copied to clipboard
fix VAE loading issue in train_dreambooth
What does this PR do?
This PR is similar to https://github.com/huggingface/diffusers/pull/3462 but fixes the same issue in train_dreambooth.py
.
Fixes https://github.com/huggingface/diffusers/issues/7619
Before submitting
- [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
- [ ] Did you read the contributor guideline?
- [ ] Did you read our philosophy doc (important for complex PRs)?
- [x] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
- [ ] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
- [ ] Did you write any new necessary tests?
Who can review?
@sayakpaul @standardAI
We need to make sure the code quality tests pass.
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.
@bssrdf could you run make style && make quality
?
It still doesn't pass :/
It still doesn't pass :/
I don't know what's going on. Any way, I rerun make style
and make quality
and here are the outputs. Nothing stands out.
$ make style
ruff check examples scripts src tests utils benchmarks setup.py --fix
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
- 'ignore' -> 'lint.ignore'
- 'select' -> 'lint.select'
- 'isort' -> 'lint.isort'
- 'per-file-ignores' -> 'lint.per-file-ignores'
All checks passed!
ruff format examples scripts src tests utils benchmarks setup.py
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
- 'ignore' -> 'lint.ignore'
- 'select' -> 'lint.select'
- 'isort' -> 'lint.isort'
- 'per-file-ignores' -> 'lint.per-file-ignores'
876 files left unchanged
doc-builder style src/diffusers docs/source --max_len 119
make autogenerate_code
make[1]: Entering directory '/home/isodden/temp/diffusers'
running deps_table_update
updating src/diffusers/dependency_versions_table.py
make[1]: Leaving directory '/home/isodden/temp/diffusers'
make extra_style_checks
make[1]: Entering directory '/home/isodden/temp/diffusers'
python utils/custom_init_isort.py
python utils/check_doc_toc.py --fix_and_overwrite
make[1]: Leaving directory '/home/isodden/temp/diffusers'
$make quality
ruff check examples scripts src tests utils benchmarks setup.py
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
- 'ignore' -> 'lint.ignore'
- 'select' -> 'lint.select'
- 'isort' -> 'lint.isort'
- 'per-file-ignores' -> 'lint.per-file-ignores'
All checks passed!
ruff format --check examples scripts src tests utils benchmarks setup.py
warning: The top-level linter settings are deprecated in favour of their counterparts in the `lint` section. Please update the following options in `pyproject.toml`:
- 'ignore' -> 'lint.ignore'
- 'select' -> 'lint.select'
- 'isort' -> 'lint.isort'
- 'per-file-ignores' -> 'lint.per-file-ignores'
876 files already formatted
doc-builder style src/diffusers docs/source --max_len 119 --check_only
python utils/check_doc_toc.py
$git log
commit ee9b19e53e4ff1b14a001fadc140f19c47959bb1 (HEAD -> fix-train-dreambooth-vae-not-loading, origin/fix-train-dreambooth-vae-not-loading)
Merge: ac68fe51 279de3c3
Author: Sayak Paul <[email protected]>
Date: Fri Apr 12 08:33:05 2024 +0530
Merge branch 'main' into fix-train-dreambooth-vae-not-loading
commit 279de3c3ffedcb1394518a8f1c950fa30f272390
Author: Sai-Suraj-27 <[email protected]>
Date: Fri Apr 12 01:13:01 2024 +0530
fix: Replaced deprecated `logger.warn` with `logger.warning` (#7643)
Fixed deprecated logger.warn with logger.warning.
commit 8e14535708f6af0794148150f5c073c4723dbbae
Author: Yiqin Zhao <[email protected]>
Date: Thu Apr 11 15:08:42 2024 -0400
Fixed YAML loading. (#7579)
commit 0bee4d336b925b6064eee156f5a155e3ca3b30ab
Author: dg845 <[email protected]>
Date: Thu Apr 11 10:52:12 2024 -0700
LCM Distill Scripts Fix Bug when Initializing Target U-Net (#6848)
* Initialize target_unet from unet rather than teacher_unet so that we correctly add time_embedding.cond_proj if necessary.
* Use UNet2DConditionModel.from_config to initialize target_unet from unet's config.
---------
Co-authored-by: Sayak Paul <[email protected]>
commit ac68fe5151a7e1bba83167bd07b65aded716174b
Author: bssrdf <[email protected]>
Date: Thu Apr 11 09:22:17 2024 -0400
reformat code with make style && make quality
Could you reverse the last changes make style && make quality
done, and downgrade your ruff, then run the command again? Actually, install diffusers
from the source:
python -m uv pip install -e ".[dev]"
Maybe ruff
in the diffusers
should be upgraded, Idk 🤔.
I downgraded ruff and reran the "make style && make quality". Let's give it another push. Yeah, ruff is now on 0.3.5. diffusers uses 0.1.5 which is pretty old.
i understand that the other script does this, but that change is from May, 2023. if anything we should fix the method used by this script, and enhance the other scripts to make use of the correct method.
@sayakpaul can we merge this now?
Sorry for the delay. Once this CI is green, will merge.