You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] AMD: image and video models in Unsloth Studio cannot load on Windows ROCm (torch.distributed has no attribute 'Work') #7992
On a Windows host with a ROCm torch, loading any diffusion model in Studio fails immediately. Z-Image reports:
Failed to import diffusers.models.transformers.transformer_z_image because of the
following error (look up to see its traceback): module 'torch.distributed' has no
attribute 'Work'
The message names neither the package at fault nor the cause, so it reads like a diffusers or torch bug. It is neither.
Why
pyproject.toml:171 pins xformers>=0.0.22.post7 ; sys_platform == 'win32' with no CUDA condition, so a ROCm venv installs a CUDA-only xformers. A ROCm torch ships no distributed backend, and xformers/ops/differentiable_collectives.py names torch.distributed.Work in a module-scope annotation. diffusers imports xformers whenever it is installed (attention_processor.py, guarded only by is_xformers_available(), which is metadata-based and answers True for a broken install), so every diffusers model import dies with it.
Clearing that one exposes a second, identical wall: diffusers.quantizers imports torchao, which reaches torch._C._distributed_c10d, absent on the same build.
Environment
Windows 11, torch 2.11.0+rocm7.13.0, torch.distributed.is_available() is False
diffusers 0.39.0, xformers 0.0.35 (pip show reports nothing depends on it, it came from the Windows extra)
The same import failure also breaks 10 backend tests on this platform, including both test_zimage_forward_matches_stock_* arch-patch tests.
#7981 fixes the runtime side by stubbing both packages on Windows ROCm, which repairs venvs that already exist. The install pin is the underlying cause and is left open.
changed the title [-]Studio: image and video models cannot load on Windows ROCm (`torch.distributed has no attribute 'Work'`)[/-][+][BUG] AMD: image and video models in Unsloth Studio cannot load on Windows ROCm (`torch.distributed has no attribute 'Work'`)[/+]on Aug 6, 2026
Activity
[-]Studio: image and video models cannot load on Windows ROCm (`torch.distributed has no attribute 'Work'`)[/-][+][BUG] AMD: image and video models in Unsloth Studio cannot load on Windows ROCm (`torch.distributed has no attribute 'Work'`)[/+]