fix: pin diffusers>=0.37.0 for torchao 0.16.0 compatibility#983
Conversation
PR #974 bumped torchao from <0.16.0 to >=0.16.0, but diffusers was left unpinned. torchao 0.16.0 removed the `torchao.dtypes.uintx.uint4_layout` module, which diffusers 0.36.0 tries to import at module level. This causes model initialization to fail with `NameError: name 'logger' is not defined`. diffusers 0.37.0+ handles this correctly by gating the import behind a torchao version check (huggingface/diffusers#11018). Fixes #982 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
diffusers>=0.37.0inpyproject.tomlto fix model initialization crash introduced by fix: bump torchao lower bound to 0.16.0 for torch 2.10.0+cu128 compat #974Root Cause
PR #974 bumped
torchaofrom<0.16.0to>=0.16.0, but leftdiffusersunpinned. This created a dependency incompatibility:torchao0.16.0 removedtorchao.dtypes.uintx.uint4_layout, whichdiffusers0.36.0 imports at module level. The import failure triggers aNameError(loggernot yet defined), crashing VAE model loading:diffusers0.37.0+ fixed this via huggingface/diffusers#11018 by gating the import behindis_torchao_version(">", "0.15.0").Fix
Test plan
uv syncresolves diffusers >=0.37.0python -c "from diffusers.models import AutoencoderOobleck"succeedsFixes #982
🤖 Generated with Claude Code
Summary by CodeRabbit