Ig/diffuser 0.34.0#2152
Conversation
|
@astachowiczhabana @libinta @dsocek. FYI on this |
|
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. |
|
Thank you @imangohari1 |
|
@regisss @imangohari1 this upgrade will break the current trl which requires |
@yafshar thanks for checking on this but I don't believe that's the case:
please make sure your setup is correct. I don't believe a revert is needed. |
|
@imangohari1 you can try this example after main install python -m pytest tests/test_examples.py::MultiCardSFTChatExampleTester::test_sft_Qwen2-7B_multi_cardthis is the error Traceback (most recent call last):
File "/root/optimum-habana/examples/trl/sft.py", line 19, in <module>
from optimum.habana.trl import GaudiSFTConfig, GaudiSFTTrainer
File "/usr/local/lib/python3.12/dist-packages/optimum/habana/trl/__init__.py", line 1, in <module>
from .models.modeling_base import adapt_PreTrainedModelWrapper_to_gaudi
File "/usr/local/lib/python3.12/dist-packages/optimum/habana/trl/models/__init__.py", line 21, in <module>
from .modeling_sd_base import (
File "/usr/local/lib/python3.12/dist-packages/optimum/habana/trl/models/modeling_sd_base.py", line 19, in <module>
from diffusers.pipelines.stable_diffusion.pipeline_stable_diffusion import rescale_noise_cfg
File "/usr/local/lib/python3.12/dist-packages/diffusers/__init__.py", line 5, in <module>
from .utils import (
File "/usr/local/lib/python3.12/dist-packages/diffusers/utils/__init__.py", line 21, in <module>
from .constants import (
File "/usr/local/lib/python3.12/dist-packages/diffusers/utils/constants.py", line 59, in <module>
dep_version_check("peft")
File "/usr/local/lib/python3.12/dist-packages/diffusers/dependency_versions_check.py", line 34, in dep_version_check
require_version(deps[pkg], hint)
File "/usr/local/lib/python3.12/dist-packages/diffusers/utils/versions.py", line 111, in require_version
_compare_versions(op, got_ver, want_ver, requirement, pkg, hint)
File "/usr/local/lib/python3.12/dist-packages/diffusers/utils/versions.py", line 44, in _compare_versions
raise ImportError(
ImportError: peft>=0.15.0 is required for a normal functioning of this module, but found peft==0.12.0. |
You likely are missing this: https://github.com/huggingface/optimum-habana/blob/main/Makefile#L167-L170 |
|
the same issue. The trl version and peft are correct, but the new diffuser requires different peft version which causes this issue. There is an import inside trl |
|
@yafshar Thanks. I understand the problem now better. @regisss @astachowiczhabana
this leads to a dependency issue for trl:
here are 3 solutions that I can think of:
diff --git a/examples/trl/requirements.txt b/examples/trl/requirements.txt
index 3a9be362..0f26d035 100644
--- a/examples/trl/requirements.txt
+++ b/examples/trl/requirements.txt
@@ -4,3 +4,4 @@ datasets == 2.19.2
tyro
evaluate
scikit-learn == 1.5.2
+diffusers == 0.33.1
diff --git a/examples/trl/requirements.txt b/examples/trl/requirements.txt
index 3a9be362..502a2d99 100644
--- a/examples/trl/requirements.txt
+++ b/examples/trl/requirements.txt
@@ -1,5 +1,5 @@
trl == 0.9.6
-peft == 0.12.0
+peft == 0.15.0
datasets == 2.19.2
tyro
Let me know which one you think is the best and I open a PR for it. |
|
Well since this PR has very small changes, I think it's okay to revert it and merge it again once TRL is updated. WDYT? |
Hi regiss, I think it is more useful to update that version versus downgrading the diffusers IMHO. WDYT? |
|
I'm okay with that as well |
Co-authored-by: Iman Gohari <s.m.iman.gohari@intel.com>

What does this PR do?
This PR upgrades the diffuser versions to the latest (as of date) upstream: https://github.com/huggingface/diffusers/releases
Tests
The following tests have been conducted to make sure the upgrade is functional:
Notes:
Fixes # (issue)
Before submitting