diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Any Wan version crashes

Open tin2tin opened this issue 1 month ago โ€ข 13 comments

Describe the bug

Running any diffusers Wan example code crashes for me, when running from inside Blender python (everything else in Diffusers has run fine from Blender Python over the years).

Ex. code:

# pip install ftfy
import torch
import numpy as np
from diffusers import AutoModel, WanPipeline
from diffusers.quantizers import PipelineQuantizationConfig
from diffusers.hooks.group_offloading import apply_group_offloading
from diffusers.utils import export_to_video, load_image
from transformers import UMT5EncoderModel

text_encoder = UMT5EncoderModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="text_encoder", torch_dtype=torch.bfloat16)
vae = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="vae", torch_dtype=torch.float32)
transformer = AutoModel.from_pretrained("Wan-AI/Wan2.1-T2V-14B-Diffusers", subfolder="transformer", torch_dtype=torch.bfloat16)

# group-offloading
onload_device = torch.device("cuda")
offload_device = torch.device("cpu")
apply_group_offloading(text_encoder,
    onload_device=onload_device,
    offload_device=offload_device,
    offload_type="block_level",
    num_blocks_per_group=4
)
transformer.enable_group_offload(
    onload_device=onload_device,
    offload_device=offload_device,
    offload_type="leaf_level",
    use_stream=True
)

pipeline = WanPipeline.from_pretrained(
    "Wan-AI/Wan2.1-T2V-14B-Diffusers",
    vae=vae,
    transformer=transformer,
    text_encoder=text_encoder,
    torch_dtype=torch.bfloat16
)
pipeline.to("cuda")

prompt = """
The camera rushes from far to near in a low-angle shot, 
revealing a white ferret on a log. It plays, leaps into the water, and emerges, as the camera zooms in 
for a close-up. Water splashes berry bushes nearby, while moss, snow, and leaves blanket the ground. 
Birch trees and a light blue sky frame the scene, with ferns in the foreground. Side lighting casts dynamic 
shadows and warm highlights. Medium composition, front view, low angle, with depth of field.
"""
negative_prompt = """
Bright tones, overexposed, static, blurred details, subtitles, style, works, paintings, images, static, overall gray, worst quality, 
low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, 
misshapen limbs, fused fingers, still picture, messy background, three legs, many people in the background, walking backwards
"""

output = pipeline(
    prompt=prompt,
    negative_prompt=negative_prompt,
    num_frames=81,
    guidance_scale=5.0,
).frames[0]
export_to_video(output, "output.mp4", fps=16)

Results in:

Loading checkpoint shards: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 5/5 [00:08<00:00,  1.60s/it]
Fetching 12 files: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 12/12 [00:00<?, ?it/s]
Loading checkpoint shards:  58%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹                       | 7/12 [00:22<00:17,  3.47s/it]Error   : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FFA24B56EDB
Module  : torch_cpu.dll
Thread  : 00007254
Writing: C:\Users\peter\AppData\Local\Temp\Dependencies_01.crash.txt

Report: Dependencies_01.crash.txt

Reproduction

Win 11 CUDA 12.4 RTX 4090 Python 3.11

Package                Version
---------------------- ------------
absl-py                2.3.1
accelerate             1.11.0
anyio                  4.11.0
attrs                  25.4.0
autopep8               2.3.1
bitsandbytes           0.48.2
certifi                2025.4.26
charset-normalizer     3.4.1
click                  8.3.0
colorama               0.4.6
contourpy              1.3.3
cycler                 0.12.1
Cython                 3.0.11
diffusers              0.36.0.dev0
einops                 0.8.1
en_core_web_md         3.8.0
filelock               3.20.0
flatbuffers            25.9.23
fonttools              4.60.1
fsspec                 2025.10.0
gguf                   0.17.1
h11                    0.16.0
hf-xet                 1.2.0
httpcore               1.0.9
httpx                  0.28.1
huggingface-hub        0.36.0
idna                   3.10
image_gen_aux          0.1.0.dev0
importlib_metadata     8.7.0
jax                    0.8.0
jaxlib                 0.8.0
Jinja2                 3.1.6
kiwisolver             1.4.9
kornia                 0.8.2
kornia_rs              0.1.10
MarkupSafe             3.0.3
matplotlib             3.10.7
meson                  0.63.0
ml_dtypes              0.5.3
mpmath                 1.3.0
networkx               3.5
numpy                  1.26.4
opencv-python-headless 4.12.0.88
opt_einsum             3.4.0
packaging              25.0
peft                   0.18.0
pillow                 12.0.0
pip                    25.3
protobuf               3.20.1
psutil                 7.1.3
pycodestyle            2.13.0
pydub                  0.25.1
pyparsing              3.2.5
python-dateutil        2.9.0.post0
PyYAML                 6.0.3
regex                  2025.11.3
reportlab              4.4.4
requests               2.32.5
safetensors            0.6.2
scipy                  1.16.3
screenplain            0.11.1
sentencepiece          0.2.1
setuptools             63.2.0
shellingham            1.5.4
six                    1.17.0
sniffio                1.3.1
spandrel               0.4.1
sympy                  1.13.1
timm                   1.0.22
tokenizers             0.22.1
torch                  2.6.0+cu124
torchaudio             2.6.0+cu124
torcheval              0.0.7
torchvision            0.21.0+cu124
tqdm                   4.67.1
transformers           4.57.1
triton-windows         3.2.0.post21
typer-slim             0.20.0
typing_extensions      4.15.0
urllib3                2.4.0
xformers               0.0.29.post3
zipp                   3.23.0
zstandard              0.23.0

Logs

Also linked to above:

# Blender 4.5.5, Commit date: 2025-11-12 13:42, Hash 231f96901b68
bpy.context.scene.generatorai_typeselect = 'movie'  # Property
bpy.ops.sequencer.generate_movie()  # Operator
Python: Traceback (most recent call last):
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\modeling_utils.py", line 1190, in from_pretrained
    resolved_model_file = _get_model_file(
                          ^^^^^^^^^^^^^^^^
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\utils\hub_utils.py", line 290, in _get_model_file
    model_file = hf_hub_download(
                 ^^^^^^^^^^^^^^^^
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\file_download.py", line 1007, in hf_hub_download
    return _hf_hub_download_to_cache_dir(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\file_download.py", line 1168, in _hf_hub_download_to_cache_dir
    _download_to_tmp_and_move(
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\file_download.py", line 1720, in _download_to_tmp_and_move
    xet_get(
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\file_download.py", line 626, in xet_get
    download_files(
KeyboardInterrupt  # Error

# backtrace
Exception Record:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION
Exception Address     : 0x00007FFA24B56EDB
Exception Module      : torch_cpu.dll
Exception Flags       : 0x00000000
Exception Parameters  : 0x2
	Parameters[0] : 0x0000000000000000
	Parameters[1] : 0x0000000000002638


Stack trace:
torch_cpu.dll       :0x00007FFA24B56BD0  at::native::_rowwise_prune
torch_cpu.dll       :0x00007FFA24B576A0  at::native::_local_scalar_dense_cpu
torch_cpu.dll       :0x00007FFA25723510  at::cpu::where_outf
torch_cpu.dll       :0x00007FFA256BB250  at::cpu::bucketize_outf
torch_cpu.dll       :0x00007FFA2538B660  at::_ops::_local_scalar_dense::redispatch
torch_cpu.dll       :0x00007FFA26B33010  torch::autograd::GraphRoot::apply
torch_cpu.dll       :0x00007FFA26B33010  torch::autograd::GraphRoot::apply
torch_cpu.dll       :0x00007FFA252EA5B0  at::_ops::_local_scalar_dense::call
torch_cpu.dll       :0x00007FFA24B57750  at::native::item
torch_cpu.dll       :0x00007FFA25A1EDB0  at::compositeimplicitautograd::where
torch_cpu.dll       :0x00007FFA259CEBF0  at::compositeimplicitautograd::broadcast_to_symint
torch_cpu.dll       :0x00007FFA251A4A50  at::_ops::item::call
torch_cpu.dll       :0x00007FFA25E6C8B0  at::Tensor::item<unsigned char>
torch_python.dll    :0x00007FFA1E311EA0  pybind11::detail::type_caster<at::Tensor,void>::load
torch_python.dll    :0x00007FFA1DEB77F0  isMainPyInterpreter
python311.dll       :0x00007FFB69E456D0  PyObject_Call
python311.dll       :0x00007FFB69F74820  PyEval_GetFuncDesc
python311.dll       :0x00007FFB69F6B020  PyEval_EvalFrameDefault
python311.dll       :0x00007FFB69F6B020  PyEval_EvalFrameDefault
python311.dll       :0x00007FFB69E45880  PyFunction_Vectorcall
python311.dll       :0x00007FFB69EA4CB0  PyTuple_DebugMallocStats
python311.dll       :0x00007FFB69EA8060  PyObject_LookupSpecialId
python311.dll       :0x00007FFB69EAF9B0  PyType_Ready
torch_python.dll    :0x00007FFA1E357A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFA1E357A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFA1E357A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFA1DF1A750  THPPointer<PyCodeObject>::THPPointer<PyCodeObject>
python311.dll       :0x00007FFB69E8B3D0  PyCFunction_GetFlags
python311.dll       :0x00007FFB69E456D0  PyObject_Call
_safetensors_rust.pyd:0x00007FFBA334A701  Symbols not available


Loaded Modules :
0x00007FF647960000 4.5.5.0              blender.exe C:\Users\peter\blender-4.5.5\blender-4.5.5\blender.pdb 
0x00007FFBD1CA0000 10.0.26100.7019      ntdll.dll  
0x00007FFBD01F0000 10.0.26100.7019      KERNEL32.DLL  
0x00007FFBCF610000 10.0.26100.7171      KERNELBASE.dll  
0x00007FFBC8F10000 10.0.26100.7019      apphelp.dll  
0x00007FFBD0330000 10.0.26100.7171      USER32.dll  
0x00007FFBCFA10000 10.0.26100.7171      win32u.dll  
0x00007FFBB8220000                      blender_cpu_check.dll  
0x00007FFBA3590000 2021.13.0.0          tbb12.dll  
0x00007FFBD15B0000 10.0.26100.7019      GDI32.dll  
0x00007FFBB2850000 2021.13.0.0          tbbmalloc.dll  
0x00007FFBCF3A0000 10.0.26100.7019      gdi32full.dll  
0x00007FFBCF4D0000 10.0.26100.7019      msvcp_win.dll  
0x00007FFBCF250000 10.0.26100.7019      ucrtbase.dll  
0x00007FFBD15E0000 10.0.26100.7019      ADVAPI32.dll  
0x00007FFBCFB30000 7.0.26100.7019       msvcrt.dll  
0x00007FFBD16B0000 10.0.26100.7019      sechost.dll  
0x00007FFBD1950000 10.0.26100.7019      RPCRT4.dll  
0x00007FFBB20F0000 6.10.26100.7019      COMCTL32.dll  
0x00007FFBD0D60000 10.0.26100.7171      SHELL32.dll  
0x00007FFBC90C0000 10.0.26100.1150      VERSION.dll  
0x00007FFBCEDF0000 10.0.26100.7019      wintypes.dll  
0x00007FFBB7B20000 14.29.30139.0        VCRUNTIME140.dll  
0x00007FFBD08A0000 10.0.26100.7019      combase.dll  
0x00007FFBB7EB0000 14.29.30139.0        VCRUNTIME140_1.dll  
0x00007FFBD0600000 10.0.26100.7019      ole32.dll  
0x00007FFB9F7F0000 14.29.30139.0        MSVCP140.dll  
0x00007FFBCFA40000 10.0.26100.7019      SHLWAPI.dll  
0x00007FFBC2030000 10.0.26100.5074      dbghelp.dll  
0x00007FFBD14D0000 10.0.26100.7019      OLEAUT32.dll  
0x00007FFB96B40000                      shaderc_shared.dll  
0x00007FFB9E110000 1.3.296.0            vulkan-1.dll  
0x00007FFBD0500000 10.0.26100.7171      shcore.dll  
0x00007FFBA9DB0000                      Iex.dll  
0x00007FFBD02C0000 10.0.26100.7019      IMM32.dll  
0x00007FFB9DF10000                      OpenEXR.dll  
0x00007FFBA2520000                      Imath.dll  
0x00007FFBB15B0000 1.39.2.0             MaterialXFormat.dll  
0x00007FFB95560000 1.39.2.0             MaterialXCore.dll  
0x00007FFB6FC00000 8.0.0.0              sycl8.dll  
0x00007FFB6ADB0000                      OpenColorIO_2_4.dll  
0x00007FFB14790000                      cycles_kernel_oneapi_aot.dll  
0x00007FFB6B240000 4.4.0.0              embree4.dll  
0x00007FFB6A6B0000 3.0.6.0              OpenImageIO.dll  
0x00007FFBB0680000 2.3.3.0              OpenImageDenoise.dll  
0x00007FFB90D70000 3.0.6.0              OpenImageIO_Util.dll  
0x00007FFBAA320000                      oslquery.dll  
0x00007FFB104D0000                      oslcomp.dll  
0x00007FFB85B30000 61.7.100.0           avformat-61.dll  
0x00007FFBCFAB0000 10.0.26100.7019      WS2_32.dll  
0x00007FFB0BE60000                      oslexec.dll  
0x00007FFB05E40000 61.19.101.0          avcodec-61.dll  
0x00007FFBB4FC0000 61.3.100.0           avdevice-61.dll  
0x00007FFB9E060000 8.3.100.0            swscale-8.dll  
0x00007FFB8BDF0000 1.2.2.0              sndfile.dll  
0x00007FFB0F3E0000 59.39.100.0          avutil-59.dll  
0x00007FFB8A730000 1.23.1.0             OpenAL32.dll  
0x00007FFB6A3A0000 12.0.0.0             openvdb.dll  
0x00007FFB98A60000                      epoxy-0.dll  
0x00007FFB69D40000 3.11.11150.1013      python311.dll  
0x00007FFB872D0000                      gmp-10.dll  
0x00007FFBCC1E0000 10.0.26100.7019      dxgi.dll  
0x00007FFBB7DF0000 2021.13.0.0          tbbmalloc_proxy.dll  
0x00007FFB09540000                      usd_ms.dll  
0x00007FFBAA130000 14.29.30139.0        MSVCP140_2.dll  
0x00007FFBCEA90000 10.0.26100.7019      CFGMGR32.dll  
0x00007FFBCC340000 10.0.26100.7019      dwmapi.dll  
0x00007FFBCECE0000 10.0.26100.7019      bcrypt.dll  
0x00007FFBB6EA0000                      libgmpxx.dll  
0x00007FFBB6B90000                      IlmThread.dll  
0x00007FFB69B00000                      OpenEXRCore.dll  
0x00007FFBB4B20000 8.8.0.0              ur_win_proxy_loader.dll  
0x00007FFBC8ED0000 10.0.26100.1         Secur32.dll  
0x00007FFBA9E10000 5.3.100.0            swresample-5.dll  
0x00007FFBB2570000 10.0.26100.1150      AVICAP32.dll  
0x00007FFBB4B10000                      oslnoise.dll  
0x00007FFB03170000 2.3.3.0              OpenImageDenoise_core.dll  
0x00007FFBC1C30000 10.0.26100.7019      WINMM.dll  
0x00007FFBCE9F0000 10.0.26100.3912      powrprof.dll  
0x00007FFB418F0000 10.0.26100.7019      OPENGL32.dll  
0x00007FFBA25B0000 1.39.2.0             MaterialXGenGlsl.dll  
0x00007FFB9F000000 1.39.2.0             MaterialXRender.dll  
0x00007FFBA2420000 1.39.2.0             MaterialXGenMsl.dll  
0x00007FFB86F90000 1.39.2.0             MaterialXGenShader.dll  
0x00007FFBA80A0000 10.0.26100.1150      MSVFW32.dll  
0x00007FFB85AF0000 10.0.26100.1150      GLU32.dll  
0x00007FFBCDE50000 10.0.26100.7019      SSPICLI.DLL  
0x00007FFBCC190000 10.0.26100.7019      dxcore.dll  
0x00007FFB86ED0000 0.11.8.0             ur_loader.dll  
0x00007FFBCE7D0000 10.0.26100.7019      UMPDC.dll  
0x00007FFBCDBB0000 10.0.26100.7019      kernel.appcore.dll  
0x00007FFBCCA00000 10.0.26100.7171      windows.storage.dll  
0x00007FFBCED10000 10.0.26100.7019      profapi.dll  
0x00007FFBCE400000 10.0.26100.7019      CRYPTBASE.DLL  
0x00007FFBCEF60000 10.0.26100.7019      bcryptPrimitives.dll  
0x00007FFBCC0B0000 10.0.26100.7019      uxtheme.dll  
0x00007FFBD0130000 2001.12.10941.16384  clbcatq.dll  
0x00007FFBC7E80000 10.0.26100.7019      MMDevApi.dll  
0x00007FFBCEA60000 10.0.26100.1150      DEVOBJ.dll  
0x00007FFBA13A0000 10.0.26100.7019      AUDIOSES.DLL  
0x00007FFBCC6C0000 10.0.26100.1150      resourcepolicyclient.dll  
0x00007FFBD1760000 10.0.26100.7019      MSCTF.dll  
0x00007FFBCA010000 7.0.26100.7019       PROPSYS.dll  
0x00007FFBB7690000 10.0.26100.7019      windows.staterepositorycore.dll  
0x00007FFB31760000 32.0.15.8097         nvoglv64.dll  
0x00007FFBCFBE0000 10.0.26100.7019      SETUPAPI.dll  
0x00007FFBC8EE0000 10.0.26100.7019      WTSAPI32.dll  
0x00007FFBCF0D0000 10.0.26100.7019      CRYPT32.dll  
0x00007FFBCE450000 10.0.26100.7019      msasn1.dll  
0x00007FFBC8320000 10.0.26100.7019      cryptnet.dll  
0x00007FFBCE530000 10.0.26100.7019      wldp.dll  
0x00007FFBC7C70000 10.0.26100.7019      drvstore.dll  
0x000001CBF1F90000 10.0.26100.7019      WINTRUST.dll  
0x00007FFBCDCD0000 10.0.26100.7019      ntmarta.dll  
0x00007FFBD0300000 10.0.26100.4202      imagehlp.dll  
0x00007FFBCE3E0000 10.0.26100.7019      CRYPTSP.dll  
0x00007FFBCDAF0000 10.0.26100.7019      rsaenh.dll  
0x00007FFBC34C0000 32.0.15.8097         nvgpucomp64.dll  
0x00007FFBCE4C0000 10.0.26100.7019      WINSTA.dll  
0x00007FFBABE80000 10.0.26100.7019      dataexchange.dll  
0x00007FFBC8A00000 10.0.26100.7019      twinapi.appcore.dll  
0x00007FFBA7460000 10.0.26100.7019      textinputframework.dll  
0x00007FFBCBD50000 10.0.26100.7019      CoreMessaging.dll  
0x00007FFBC8710000 10.0.26100.7019      CoreUIComponents.dll  
0x00007FFBB6870000 7.2.26100.7019       Oleacc.dll  
0x00007FFB698B0000 1.0.5.10             Wintab32.dll  
0x00007FFBB36E0000 10.0.26100.7019      MPR.dll  
0x00007FFB8B930000 6.3.46.2             Wacom_Tablet.dll  
0x00007FFB9C8C0000 10.0.26100.7171      explorerframe.dll  
0x00007FFBA7780000 10.0.26100.6725      directmanipulation.dll  
0x00007FFBCA2C0000 10.0.26100.7019      policymanager.dll  
0x00007FFBD0C30000 10.0.26100.7019      coml2.dll  
0x00007FFBAF270000 10.0.26100.1         LINKINFO.dll  
0x00007FFBADE30000 10.0.26100.7019      Windows.System.Launcher.dll  
0x00007FFBA4C00000 10.0.26100.4768      p9np.dll  
0x00007FFBB4800000 10.0.26100.1         drprov.dll  
0x00007FFBA4490000 10.0.26100.7019      ntlanman.dll  
0x00007FFBA3640000 10.0.26100.1         davclnt.dll  
0x00007FFBC78F0000 10.0.26100.7019      wkscli.dll  
0x00007FFBB06B0000 10.0.26100.1         cscapi.dll  
0x00007FFBCD560000 10.0.26100.1882      netutils.dll  
0x00007FFBB63F0000 10.0.26100.7019      Windows.StateRepositoryPS.dll  
0x000001CB82520000 3.11.11150.1013      python3.DLL  
0x00007FFBB0580000 3.11.11150.1013      _socket.pyd  
0x00007FFBCD570000 10.0.26100.7019      IPHLPAPI.DLL  
0x00007FFBB4020000 3.11.11150.1013      select.pyd  
0x00007FFB59630000                      _multiarray_umath.cp311-win_amd64.pyd  
0x00007FFB010B0000                      libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb373ff767a3f.dll  
0x00007FFBAF1E0000                      _multiarray_tests.cp311-win_amd64.pyd  
0x00007FFBA26C0000 3.11.11150.1013      _ctypes.pyd  
0x00007FFBB2CF0000                      libffi-8.dll  
0x00007FFBA87C0000                      _umath_linalg.cp311-win_amd64.pyd  
0x00007FFBA3D50000                      _pocketfft_internal.cp311-win_amd64.pyd  
0x00007FFB8E7E0000                      mtrand.cp311-win_amd64.pyd  
0x00007FFBA24B0000                      bit_generator.cp311-win_amd64.pyd  
0x00007FFBA2360000                      _common.cp311-win_amd64.pyd  
0x00007FFBB0670000 3.11.11150.1013      _hashlib.pyd  
0x00007FFB4A1A0000 3.1.5.0              libcrypto-3.dll  
0x00007FFB9EA30000                      _bounded_integers.cp311-win_amd64.pyd  
0x00007FFBA3570000                      _mt19937.cp311-win_amd64.pyd  
0x00007FFBA3310000                      _philox.cp311-win_amd64.pyd  
0x00007FFBA2400000                      _pcg64.cp311-win_amd64.pyd  
0x00007FFBB0640000                      _sfc64.cp311-win_amd64.pyd  
0x00007FFB85590000                      _generator.cp311-win_amd64.pyd  
0x00007FFBA2340000 3.11.11150.1013      _bz2.pyd  
0x00007FFBA1FD0000 3.11.11150.1013      _lzma.pyd  
0x00007FFBA05A0000 3.11.11150.1013      _ssl.pyd  
0x00007FFB59540000 3.1.5.0              libssl-3.dll  
0x00007FFBA0EC0000 3.11.11150.1013      _asyncio.pyd  
0x00007FFBB7E70000 3.11.11150.1013      _overlapped.pyd  
0x00007FFBCE120000 10.0.26100.7019      mswsock.dll  
0x00007FFBA30C0000 3.11.11150.1013      _decimal.pyd  
0x00007FFB9EAE0000                      asmjit.dll  
0x00007FFB49D10000                      c10.dll  
0x00007FFB9E2F0000                      c10_cuda.dll  
0x00007FFB9E260000 6.14.11.12040        cudart64_12.dll  
0x00007FFBB7E60000                      caffe2_nvrtc.dll  
0x00007FFAFE550000 6.14.11.9000         nvrtc64_120_0.dll  
0x00007FFAF85A0000 6.14.11.1242         cublas64_12.dll  
0x00007FFAD8CC0000 6.14.11.1242         cublasLt64_12.dll  
0x00007FFB14390000 32.0.15.8097         nvcuda.dll  
0x00007FFB9E6F0000 9.1.0.70             cudnn64_9.dll  
0x00007FFACA540000 9.1.0.70             cudnn_adv64_9.dll  
0x00007FFB49AF0000                      cudnn_graph64_9.dll  
0x00007FFAC3E00000 9.1.0.70             cudnn_ops64_9.dll  
0x00007FFB13FB0000 9.1.0.70             cudnn_cnn64_9.dll  
0x00007FFAA0A20000 9.1.0.70             cudnn_engines_precompiled64_9.dll  
0x00007FFB13410000 9.1.0.70             cudnn_engines_runtime_compiled64_9.dll  
0x00007FFA9B850000                      cudnn_heuristic64_9.dll  
0x00007FFA8A000000 6.14.11.1120         cufft64_11.dll  
0x00007FFBB6530000 6.14.11.1120         cufftw64_11.dll  
0x00007FFB12FA0000 2024.1.0.0           cupti64_2024.1.0.dll  
0x00007FFA85D60000 6.14.11.1035         curand64_10.dll  
0x00007FFA7EFC0000 6.14.11.1160         cusolver64_11.dll  
0x00007FFA6E8D0000 6.14.11.1230         cusparse64_12.dll  
0x00007FFA6C430000 6.14.11.9000         nvJitLink_120_0.dll  
0x00007FFA67990000 6.14.11.1160         cusolverMg64_11.dll  
0x00007FFB0EF10000                      fbgemm.dll  
0x00007FFB53B00000 5.0.2024.820         libiomp5md.dll  
0x00007FFBB6520000 5.0.2024.820         libiompstubs5md.dll  
0x00007FFB0E9B0000                      nvrtc-builtins64_124.dll  
0x00007FFBB05C0000                      nvToolsExt64_1.dll  
0x00007FFBB02F0000                      shm.dll  
0x00007FFA1EB10000                      torch_cpu.dll  
0x00007FFB17EC0000                      uv.dll  
0x00007FFBD0120000 10.0.26100.1         PSAPI.DLL  
0x00007FFBCE1D0000 10.0.26100.7019      USERENV.dll  
0x00007FFA2DB30000                      torch_cuda.dll  
0x00007FFBAA310000                      torch.dll  
0x00007FFBAA120000                      torch_global_deps.dll  
0x00007FFA1DA70000                      torch_python.dll  
0x0000000010000000 1.2.3.0              zlibwapi.dll  
0x00007FFBA8090000                      _C.cp311-win_amd64.pyd  
0x00007FFBA6EB0000 3.11.11150.1013      _queue.pyd  
0x00007FFBA6A50000 3.11.11150.1013      _uuid.pyd  
0x00007FFB59420000 3.11.11150.1013      unicodedata.pyd  
0x00007FFBA6940000 3.11.11150.1013      _multiprocessing.pyd  
0x00007FFA1B940000 32.0.15.8097         nvcuda64.dll  
0x00007FFBB9EA0000 32.0.15.8097         nvapi64.dll  
0x00007FFB9E1C0000                      nvdxgdmal64.dll  
0x00007FFB13D40000                      _imaging.cp311-win_amd64.pyd  
0x00007FFA174A0000                      cv2.pyd  
0x00007FFBB6DC0000 10.0.26100.7171      MF.dll  
0x00007FFBA8820000 10.0.26100.7019      MFPlat.DLL  
0x00007FFBB6C10000 10.0.26100.7019      MFReadWrite.dll  
0x00007FFBAA390000 10.0.26100.1         WSOCK32.dll  
0x00007FFBAED30000 10.0.26100.7171      MFCORE.DLL  
0x00007FFBA8770000 10.0.26100.7019      RTWorkQ.DLL  
0x00007FFBA9390000 10.0.26100.7019      ApplicationTargetedFeatureDatabase.dll  
0x00007FFBB2F40000                      backend_c.cp311-win_amd64.pyd  
0x00007FFBB2EF0000                      _yaml.cp311-win_amd64.pyd  
0x00007FFBA3330000                      _safetensors_rust.pyd  
0x00007FFB9E770000                      _regex.cp311-win_amd64.pyd  
0x00007FFBB3D40000                      _speedups.cp311-win_amd64.pyd  
0x00007FFA16D50000                      tokenizers.pyd  
0x00007FFA16750000                      _C.pyd  
0x00007FFB52650000                      _imagingft.cp311-win_amd64.pyd  
0x00007FFBB2C30000                      image.pyd  
0x00007FFBAA350000                      libpng16.dll  
0x00007FFBA2640000                      libwebp.dll  
0x00007FFB96AB0000                      jpeg8.dll  
0x00007FFA16290000 6.14.11.1231         nvjpeg64_12.dll  
0x00007FFBB3D30000                      libsharpyuv.dll  
0x00007FFBB2C10000 1.2.13.0             zlib.dll  
0x00007FFBA3090000 3.11.11150.1013      _elementtree.pyd  
0x00007FFBA2600000 3.11.11150.1013      pyexpat.pyd  
0x00007FFBA0500000                      _ccallback_c.cp311-win_amd64.pyd  
0x00007FFB854D0000                      _fblas.cp311-win_amd64.pyd  
0x00007FFA14F30000                      libscipy_openblas-48c358d105077551cc9cc3ba79387ed5.dll  
0x00007FFB0E780000                      _flapack.cp311-win_amd64.pyd  
0x00007FFB87C10000                      _cythonized_array_utils.cp311-win_amd64.pyd  
0x00007FFB9EAA0000                      _cyutility.cp311-win_amd64.pyd  
0x00007FFB871D0000                      cython_lapack.cp311-win_amd64.pyd  
0x00007FFB9F560000                      _solve_toeplitz.cp311-win_amd64.pyd  
0x00007FFB9EA00000                      _decomp_lu_cython.cp311-win_amd64.pyd  
0x00007FFB98970000                      _matfuncs_schur_sqrtm.cp311-win_amd64.pyd  
0x00007FFB8B700000                      _matfuncs_expm.cp311-win_amd64.pyd  
0x00007FFB4A090000                      _linalg_pythran.cp311-win_amd64.pyd  
0x00007FFB86E70000                      _decomp_update.cp311-win_amd64.pyd  
0x00007FFB98940000                      cython_blas.cp311-win_amd64.pyd  
0x00007FFA14B30000                      _sparsetools.cp311-win_amd64.pyd  
0x00007FFB6D120000                      _csparsetools.cp311-win_amd64.pyd  
0x00007FFB6D430000                      _superlu.cp311-win_amd64.pyd  
0x00007FFB494B0000                      _arpack.cp311-win_amd64.pyd  
0x00007FFB59070000                      _spropack.cp311-win_amd64.pyd  
0x00007FFB58F70000                      _dpropack.cp311-win_amd64.pyd  
0x00007FFB4E380000                      _cpropack.cp311-win_amd64.pyd  
0x00007FFB37D80000                      _zpropack.cp311-win_amd64.pyd  
0x00007FFB193D0000                      _group_columns.cp311-win_amd64.pyd  
0x00007FFB8A6F0000                      _trlib.cp311-win_amd64.pyd  
0x00007FFB9F7D0000                      messagestream.cp311-win_amd64.pyd  
0x00007FFB87D20000                      _lbfgsb.cp311-win_amd64.pyd  
0x00007FFB95530000                      _moduleTNC.cp311-win_amd64.pyd  
0x00007FFB70E70000                      _slsqplib.cp311-win_amd64.pyd  
0x00007FFB94E00000                      _minpack.cp311-win_amd64.pyd  
0x00007FFB9EA80000                      givens_elimination.cp311-win_amd64.pyd  
0x00007FFBB3D20000                      _zeros.cp311-win_amd64.pyd  
0x00007FFA14570000                      _core.cp311-win_amd64.pyd  
0x00007FFB16E00000                      _highs_options.cp311-win_amd64.pyd  
0x00007FFB303C0000                      _decomp_interpolative.cp311-win_amd64.pyd  
0x00007FFB69870000                      _uarray.cp311-win_amd64.pyd  
0x00007FFA143F0000                      _ufuncs.cp311-win_amd64.pyd  
0x00007FFA141A0000                      _ufuncs_cxx.cp311-win_amd64.pyd  
0x00007FFB8BBC0000                      _ellip_harm_2.cp311-win_amd64.pyd  
0x00007FFA13F60000                      _special_ufuncs.cp311-win_amd64.pyd  
0x00007FFA13DE0000                      _gufuncs.cp311-win_amd64.pyd  
0x00007FFB69820000                      _specfun.cp311-win_amd64.pyd  
0x00007FFB98A40000                      _comb.cp311-win_amd64.pyd  
0x00007FFB18C90000                      pypocketfft.cp311-win_amd64.pyd  
0x00007FFB59A50000                      _bglu_dense.cp311-win_amd64.pyd  
0x00007FFB593E0000                      _lsap.cp311-win_amd64.pyd  
0x00007FFB57C20000                      _pava_pybind.cp311-win_amd64.pyd  
0x00007FFA13C50000                      _ckdtree.cp311-win_amd64.pyd  
0x00007FFB17DD0000                      _qhull.cp311-win_amd64.pyd  
0x00007FFB95EE0000                      _voronoi.cp311-win_amd64.pyd  
0x00007FFB8C100000                      _hausdorff.cp311-win_amd64.pyd  
0x00007FFB12E40000                      _distance_pybind.cp311-win_amd64.pyd  
0x00007FFB88740000                      _distance_wrap.cp311-win_amd64.pyd  
0x00007FFB551F0000                      _rigid_transform.cp311-win_amd64.pyd  
0x00007FFB13C70000                      _rotation.cp311-win_amd64.pyd  
0x00007FFB8BDD0000                      _direct.cp311-win_amd64.pyd  
0x00007FFA12B20000                      libbitsandbytes_cuda124.dll  
0x00007FFA12A20000                      _sentencepiece.cp311-win_amd64.pyd  
0x00007FFA11760000                      _C.pyd  
0x00007FF9F7AE0000                      _C_flashattention.pyd  
0x00007FFB4AAE0000                      _odepack.cp311-win_amd64.pyd  
0x00007FFB86E40000                      _quadpack.cp311-win_amd64.pyd  
0x00007FFB49A50000                      _vode.cp311-win_amd64.pyd  
0x00007FFB537D0000                      _dop.cp311-win_amd64.pyd  
0x00007FFB49420000                      _lsoda.cp311-win_amd64.pyd  
0x00007FFB51FA0000                      _fitpack.cp311-win_amd64.pyd  
0x00007FF9F7A30000                      _dfitpack.cp311-win_amd64.pyd  
0x00007FF9F7930000                      _dierckx.cp311-win_amd64.pyd  
0x00007FFB53ED0000                      _ppoly.cp311-win_amd64.pyd  
0x00007FFB51860000                      _interpnd.cp311-win_amd64.pyd  
0x00007FF9F7800000                      _rbfinterp_pythran.cp311-win_amd64.pyd  
0x00007FFB84BC0000                      _rgi_cython.cp311-win_amd64.pyd  
0x00007FF9F7760000                      _stats.cp311-win_amd64.pyd  
0x00007FF9F7470000                      cython_special.cp311-win_amd64.pyd  
0x00007FFB4A030000                      _biasedurn.cp311-win_amd64.pyd  
0x00007FF9F7350000                      _stats_pythran.cp311-win_amd64.pyd  
0x00007FFB889C0000                      levyst.cp311-win_amd64.pyd  
0x00007FFB70E40000                      _ansari_swilk_statistics.cp311-win_amd64.pyd  
0x00007FF9F72B0000                      _shortest_path.cp311-win_amd64.pyd  
0x00007FFB58F30000                      _tools.cp311-win_amd64.pyd  
0x00007FFB16C50000                      _traversal.cp311-win_amd64.pyd  
0x00007FFB59040000                      _min_spanning_tree.cp311-win_amd64.pyd  
0x00007FFB53AC0000                      _flow.cp311-win_amd64.pyd  
0x00007FFB51F00000                      _matching.cp311-win_amd64.pyd  
0x00007FFB48C00000                      _reordering.cp311-win_amd64.pyd  
0x00007FFB30100000                      _sobol.cp311-win_amd64.pyd  
0x00007FFB2FD20000                      _qmc_cy.cp311-win_amd64.pyd  
0x00007FFB4AAB0000                      rcont.cp311-win_amd64.pyd  
0x00007FFB492D0000                      _qmvnt_cy.cp311-win_amd64.pyd  
0x00007FFB19390000                      _nd_image.cp311-win_amd64.pyd  
0x00007FFB48BD0000                      _rank_filter_1d.cp311-win_amd64.pyd  
0x00007FFB16DB0000                      _ni_label.cp311-win_amd64.pyd  
0x00007FFBCD600000 10.0.26100.7019      DNSAPI.dll  
0x00007FFBD16A0000 10.0.26100.7019      NSI.dll  
0x00007FFBC8400000 10.0.26100.7171      rasadhlp.dll  
0x00007FFBC3320000 10.0.26100.7019      fwpuclnt.dll  
0x00007FF9F64F0000                      hf_xet.pyd  
0x00007FFBB41C0000 10.0.26100.7019      pdh.dll  
0x00007FF9F1F30000                      kornia_rs.cp311-win_amd64.pyd  

# Python backtrace
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\torch\storage.py", line 469 in __getitem__
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\safetensors\torch.py", line 383 in load_file
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\model_loading_utils.py", line 177 in load_state_dict
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\model_loading_utils.py", line 358 in _load_shard_file
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\modeling_utils.py", line 1667 in _load_pretrained_model
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\modeling_utils.py", line 1285 in from_pretrained
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114 in _inner_fn
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\auto_model.py", line 223 in from_pretrained
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114 in _inner_fn
  File "C:\Users\peter\Documents\Dependencies_01.blend\Text.002", line 12 in <module>

System Info

Win 11 CUDA 12.4 RTX 4090 Python 3.11 diffusers 0.36.0.dev0

Who can help?

No response

tin2tin avatar Nov 15 '25 14:11 tin2tin

hi @tin2tin how much RAM do you have? using your code, you will need at least 64GB of free RAM, if you don't have it, maybe that's the reason. Since that crash doesn't have a really helpful message, we can just guess though.

asomoza avatar Nov 15 '25 16:11 asomoza

Processor AMD Ryzen 9 7900X 12-Core Processor (4.70 GHz) Installed RAM 32,0 GB (31,2 GB usable) System type 64-bit operating system, x64-based processor

tin2tin avatar Nov 15 '25 16:11 tin2tin

Is the offloading to RAM hard-coded in Diffusers? It works fine when using Wan on ComfyUI.

Is there anything I can do to get it to work via Diffusers?

tin2tin avatar Nov 15 '25 17:11 tin2tin

when you use group_offloading with leaf and cuda streams in diffusers is very different than ComfyUI, this technique is very fast because it prefetch the next layer while the current one is running at the cost of higher RAM usage.

If I remember correctly, ComfyUI just offloads the layers/blocks that don't fit in the GPU, not sure if it moves or clones them, but anyways, ComfyUI does a lot of stuff without the user knowing at the cost of speed and abstraction, with diffusers, you have total control of what you can do but you need the knowledge/experience to be able to do it, but we can help with that too.

You have several options:

  • you can add low_cpu_mem_usage=True at the cost of inference speed.
  • you can offload to a fast SSD instead of RAM with offload_to_disk_path=path
  • you can switch from leaf to block_level
  • you can use layerwise casting.
  • you can use quantization

asomoza avatar Nov 15 '25 17:11 asomoza

I did try quantization with bitsandbytes and that didn't work either. What are the ram/vram needs for those other solutions? Any examples?

tin2tin avatar Nov 15 '25 20:11 tin2tin

I did try quantization with bitsandbytes and that didn't work either.

what do you mean with "it didn't work"? had the same EXCEPTION_ACCESS_VIOLATION error? If it is, that really doesn't help, I test diffusers under windows quite often and I never get that generic error, so I really don't know what causes it. I'm guessing is something in your environment and the way you use it inside blender.

What are the ram/vram needs for those other solutions?

it varies with each solution, sadly I don't have the bandwidth right now to do them all with all the possible combinations and see how much VRAM and RAM they use. I'm starting to compile examples and create a repo so I can share it in the future with people like you so you can just copy & paste the code.

Any examples?

Each one is properly documented in the docs here and here with examples on how to use them.

asomoza avatar Nov 15 '25 22:11 asomoza

I tried DiffStudio, their default solution, it workied but took 30 mins. for a single 81 frames video on a RTX 4090+32 GB RAM.

Unfortunately, I didn't save my bitsandbytes code. However, running this code of yours: https://github.com/huggingface/diffusers/issues/12613#issuecomment-3513272423

I get similar errors:

Loading pipeline components...:  17%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹                                           | 1/6 [00:02<00:11,  2.33s/it]`torch_dtype` is deprecated! Use `dtype` instead!
Loading checkpoint shards: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 3/3 [00:00<00:00, 35.61it/s]
Loading checkpoint shards: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 12/12 [00:31<00:00,  2.64s/it]
Loading pipeline components...:  83%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž        | 5/6 [00:35<00:07,  7.47s/it]Error   : EXCEPTION_ACCESS_VIOLATIONโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž                  | 8/12 [00:34<00:21,  5.36s/it]
Address : 0x00007FFA14226EDB
Module  : torch_cpu.dll
Thread  : 0000a03c
Writing: C:\Users\peter\AppData\Local\Temp\Dependencies_01.crash.txt
# Blender 4.5.5, Commit date: 2025-11-12 13:42, Hash 231f96901b68

# backtrace
Exception Record:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION
Exception Address     : 0x00007FFA14226EDB
Exception Module      : torch_cpu.dll
Exception Flags       : 0x00000000
Exception Parameters  : 0x2
	Parameters[0] : 0x0000000000000000
	Parameters[1] : 0x0000000000002508


Stack trace:
torch_cpu.dll       :0x00007FFA14226BD0  at::native::_rowwise_prune
torch_cpu.dll       :0x00007FFA142276A0  at::native::_local_scalar_dense_cpu
torch_cpu.dll       :0x00007FFA14DF3510  at::cpu::where_outf
torch_cpu.dll       :0x00007FFA14D8B250  at::cpu::bucketize_outf
torch_cpu.dll       :0x00007FFA14A5B660  at::_ops::_local_scalar_dense::redispatch
torch_cpu.dll       :0x00007FFA16203010  torch::autograd::GraphRoot::apply
torch_cpu.dll       :0x00007FFA16203010  torch::autograd::GraphRoot::apply
torch_cpu.dll       :0x00007FFA149BA5B0  at::_ops::_local_scalar_dense::call
torch_cpu.dll       :0x00007FFA14227750  at::native::item
torch_cpu.dll       :0x00007FFA150EEDB0  at::compositeimplicitautograd::where
torch_cpu.dll       :0x00007FFA1509EBF0  at::compositeimplicitautograd::broadcast_to_symint
torch_cpu.dll       :0x00007FFA14874A50  at::_ops::item::call
torch_cpu.dll       :0x00007FFA1553C8B0  at::Tensor::item<unsigned char>
torch_python.dll    :0x00007FFB19A41EA0  pybind11::detail::type_caster<at::Tensor,void>::load
torch_python.dll    :0x00007FFB195E77F0  isMainPyInterpreter
python311.dll       :0x00007FFB6AEE56D0  PyObject_Call
python311.dll       :0x00007FFB6B014820  PyEval_GetFuncDesc
python311.dll       :0x00007FFB6B00B020  PyEval_EvalFrameDefault
python311.dll       :0x00007FFB6B00B020  PyEval_EvalFrameDefault
python311.dll       :0x00007FFB6AEE5880  PyFunction_Vectorcall
python311.dll       :0x00007FFB6AF44CB0  PyTuple_DebugMallocStats
python311.dll       :0x00007FFB6AF48060  PyObject_LookupSpecialId
python311.dll       :0x00007FFB6AF4F9B0  PyType_Ready
torch_python.dll    :0x00007FFB19A87A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFB19A87A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFB19A87A80  torch::utils::getTHPMemoryFormat
torch_python.dll    :0x00007FFB1964A750  THPPointer<PyCodeObject>::THPPointer<PyCodeObject>
python311.dll       :0x00007FFB6AF2B3D0  PyCFunction_GetFlags
python311.dll       :0x00007FFB6AEE56D0  PyObject_Call
_safetensors_rust.pyd:0x00007FFBA31CA701  Symbols not available


Loaded Modules :
0x00007FF681130000 4.5.5.0              blender.exe C:\Users\peter\blender-4.5.5\blender-4.5.5\blender.pdb 
0x00007FFBD1CA0000 10.0.26100.7019      ntdll.dll  
0x00007FFBD01F0000 10.0.26100.7019      KERNEL32.DLL  
0x00007FFBCF610000 10.0.26100.7171      KERNELBASE.dll  
0x00007FFBC8F10000 10.0.26100.7019      apphelp.dll  
0x00007FFBD0330000 10.0.26100.7171      USER32.dll  
0x00007FFBCFA10000 10.0.26100.7171      win32u.dll  
0x00007FFBD15B0000 10.0.26100.7019      GDI32.dll  
0x00007FFBCF3A0000 10.0.26100.7019      gdi32full.dll  
0x00007FFBCF4D0000 10.0.26100.7019      msvcp_win.dll  
0x00007FFBCF250000 10.0.26100.7019      ucrtbase.dll  
0x00007FFBD15E0000 10.0.26100.7019      ADVAPI32.dll  
0x00007FFBCFB30000 7.0.26100.7019       msvcrt.dll  
0x00007FFBD16B0000 10.0.26100.7019      sechost.dll  
0x00007FFBD1950000 10.0.26100.7019      RPCRT4.dll  
0x00007FFBD0D60000 10.0.26100.7171      SHELL32.dll  
0x00007FFBCEDF0000 10.0.26100.7019      wintypes.dll  
0x00007FFBD08A0000 10.0.26100.7019      combase.dll  
0x00007FFBD0600000 10.0.26100.7019      ole32.dll  
0x00007FFBCFA40000 10.0.26100.7019      SHLWAPI.dll  
0x00007FFBD14D0000 10.0.26100.7019      OLEAUT32.dll  
0x00007FFBD0500000 10.0.26100.7171      shcore.dll  
0x00007FFBD02C0000 10.0.26100.7019      IMM32.dll  
0x00007FFBB20F0000 6.10.26100.7019      COMCTL32.dll  
0x00007FFBC90C0000 10.0.26100.1150      VERSION.dll  
0x00007FFBC2030000 10.0.26100.5074      dbghelp.dll  
0x00007FFBC2D00000                      blender_cpu_check.dll  
0x00007FFBA6E90000 2021.13.0.0          tbbmalloc.dll  
0x00007FFB6FCF0000                      shaderc_shared.dll  
0x00007FFBA4280000                      Iex.dll  
0x00007FFBA1BE0000 2021.13.0.0          tbb12.dll  
0x00007FFB6FC40000 1.3.296.0            vulkan-1.dll  
0x00007FFB6F960000                      OpenEXR.dll  
0x00007FFB95E40000                      Imath.dll  
0x00007FFBA2540000 1.39.2.0             MaterialXFormat.dll  
0x00007FFB6F860000 1.39.2.0             MaterialXCore.dll  
0x00007FFB676F0000 4.4.0.0              embree4.dll  
0x00007FFB65A10000                      cycles_kernel_oneapi_aot.dll  
0x00007FFB6F3D0000                      OpenColorIO_2_4.dll  
0x00007FFB6BB10000 3.0.6.0              OpenImageIO.dll  
0x00007FFB6F2C0000 3.0.6.0              OpenImageIO_Util.dll  
0x00007FFBA2620000 2.3.3.0              OpenImageDenoise.dll  
0x00007FFB29E70000                      oslcomp.dll  
0x00007FFBA1B60000                      oslquery.dll  
0x00007FFB26770000 61.19.101.0          avcodec-61.dll  
0x00007FFB1CF10000                      oslexec.dll  
0x00007FFBA3100000 61.3.100.0           avdevice-61.dll  
0x00007FFB6EFA0000 61.7.100.0           avformat-61.dll  
0x00007FFBCFAB0000 10.0.26100.7019      WS2_32.dll  
0x00007FFB6EB70000 8.3.100.0            swscale-8.dll  
0x00007FFB25680000 59.39.100.0          avutil-59.dll  
0x00007FFB6C880000 1.2.2.0              sndfile.dll  
0x00007FFB6C6F0000 1.23.1.0             OpenAL32.dll  
0x00007FFB6B750000 8.0.0.0              sycl8.dll  
0x00007FFB6B440000 12.0.0.0             openvdb.dll  
0x00007FFB6C640000                      epoxy-0.dll  
0x00007FFBCC1E0000 10.0.26100.7019      dxgi.dll  
0x00007FFB6ADE0000 3.11.11150.1013      python311.dll  
0x00007FFB6EF10000 14.29.30139.0        MSVCP140.dll  
0x00007FFB9D450000 14.29.30139.0        MSVCP140_2.dll  
0x00007FFBCEA90000 10.0.26100.7019      CFGMGR32.dll  
0x00007FFBA24F0000 14.29.30139.0        VCRUNTIME140.dll  
0x00007FFBB8280000 14.29.30139.0        VCRUNTIME140_1.dll  
0x00007FFBCC340000 10.0.26100.7019      dwmapi.dll  
0x00007FFBCECE0000 10.0.26100.7019      bcrypt.dll  
0x00007FFB6C520000                      gmp-10.dll  
0x00007FFBB7F30000 2021.13.0.0          tbbmalloc_proxy.dll  
0x00007FFBB64C0000                      libgmpxx.dll  
0x00007FFBB4020000                      IlmThread.dll  
0x00007FFB6A930000                      OpenEXRCore.dll  
0x00007FFB1A240000 2.3.3.0              OpenImageDenoise_core.dll  
0x00007FFB9D430000 10.0.26100.1150      AVICAP32.dll  
0x00007FFBC8ED0000 10.0.26100.1         Secur32.dll  
0x00007FFB14210000                      usd_ms.dll  
0x00007FFBC1C30000 10.0.26100.7019      WINMM.dll  
0x00007FFBCE9F0000 10.0.26100.3912      powrprof.dll  
0x00007FFB95E10000 10.0.26100.1150      MSVFW32.dll  
0x00007FFB6E8C0000 10.0.26100.7019      OPENGL32.dll  
0x00007FFBB2AB0000                      oslnoise.dll  
0x00007FFB927E0000 5.3.100.0            swresample-5.dll  
0x00007FFBAEB60000 8.8.0.0              ur_win_proxy_loader.dll  
0x00007FFB894B0000 1.39.2.0             MaterialXGenGlsl.dll  
0x00007FFB6AD50000 1.39.2.0             MaterialXRender.dll  
0x00007FFB6FBF0000 1.39.2.0             MaterialXGenMsl.dll  
0x00007FFBCDE50000 10.0.26100.7019      SSPICLI.DLL  
0x00007FFB85200000 10.0.26100.1150      GLU32.dll  
0x00007FFB6A870000 1.39.2.0             MaterialXGenShader.dll  
0x00007FFBCC190000 10.0.26100.7019      dxcore.dll  
0x00007FFB6A7B0000 0.11.8.0             ur_loader.dll  
0x00007FFBCE7D0000 10.0.26100.7019      UMPDC.dll  
0x00007FFBCDBB0000 10.0.26100.7019      kernel.appcore.dll  
0x00007FFBCCA00000 10.0.26100.7171      windows.storage.dll  
0x00007FFBCED10000 10.0.26100.7019      profapi.dll  
0x00007FFBCE400000 10.0.26100.7019      CRYPTBASE.DLL  
0x00007FFBCEF60000 10.0.26100.7019      bcryptPrimitives.dll  
0x00007FFBCC0B0000 10.0.26100.7019      uxtheme.dll  
0x00007FFBD0130000 2001.12.10941.16384  clbcatq.dll  
0x00007FFBC7E80000 10.0.26100.7019      MMDevApi.dll  
0x00007FFBCEA60000 10.0.26100.1150      DEVOBJ.dll  
0x00007FFBA13A0000 10.0.26100.7019      AUDIOSES.DLL  
0x00007FFBCC6C0000 10.0.26100.1150      resourcepolicyclient.dll  
0x00007FFBD1760000 10.0.26100.7019      MSCTF.dll  
0x00007FFBCA010000 7.0.26100.7019       PROPSYS.dll  
0x00007FFBB7690000 10.0.26100.7019      windows.staterepositorycore.dll  
0x00007FFB3F5C0000 32.0.15.8097         nvoglv64.dll  
0x00007FFBCFBE0000 10.0.26100.7019      SETUPAPI.dll  
0x00007FFBC8EE0000 10.0.26100.7019      WTSAPI32.dll  
0x00007FFBCF0D0000 10.0.26100.7019      CRYPT32.dll  
0x00007FFBCE450000 10.0.26100.7019      msasn1.dll  
0x00007FFBC8320000 10.0.26100.7019      cryptnet.dll  
0x00007FFBCE530000 10.0.26100.7019      wldp.dll  
0x00007FFBC7C70000 10.0.26100.7019      drvstore.dll  
0x000001BB1C7E0000 10.0.26100.7019      WINTRUST.dll  
0x00007FFBCDCD0000 10.0.26100.7019      ntmarta.dll  
0x00007FFBD0300000 10.0.26100.4202      imagehlp.dll  
0x00007FFBCE3E0000 10.0.26100.7019      CRYPTSP.dll  
0x00007FFBCDAF0000 10.0.26100.7019      rsaenh.dll  
0x00007FFBC34C0000 32.0.15.8097         nvgpucomp64.dll  
0x00007FFBCE4C0000 10.0.26100.7019      WINSTA.dll  
0x00007FFBABDB0000 10.0.26100.7019      dataexchange.dll  
0x00007FFBC8A00000 10.0.26100.7019      twinapi.appcore.dll  
0x00007FFBA6A50000 10.0.26100.7019      textinputframework.dll  
0x00007FFBCBD50000 10.0.26100.7019      CoreMessaging.dll  
0x00007FFBC8710000 10.0.26100.7019      CoreUIComponents.dll  
0x00007FFBB6850000 7.2.26100.7019       Oleacc.dll  
0x00007FFB6A560000 1.0.5.10             Wintab32.dll  
0x00007FFBB36E0000 10.0.26100.7019      MPR.dll  
0x00007FFB8E970000 6.3.46.2             Wacom_Tablet.dll  
0x00007FFBAF630000 10.0.26100.7171      explorerframe.dll  
0x00007FFBA7760000 10.0.26100.6725      directmanipulation.dll  
0x00007FFBCA2C0000 10.0.26100.7019      policymanager.dll  
0x00007FFBD0C30000 10.0.26100.7019      coml2.dll  
0x00007FFBAF270000 10.0.26100.1         LINKINFO.dll  
0x00007FFBADE30000 10.0.26100.7019      Windows.System.Launcher.dll  
0x00007FFBB6CC0000 10.0.26100.4768      p9np.dll  
0x00007FFBCB5B0000 10.0.26100.1         drprov.dll  
0x00007FFBB6C90000 10.0.26100.7019      ntlanman.dll  
0x00007FFBB6C60000 10.0.26100.1         davclnt.dll  
0x00007FFBC78F0000 10.0.26100.7019      wkscli.dll  
0x00007FFBB06B0000 10.0.26100.1         cscapi.dll  
0x00007FFBCD560000 10.0.26100.1882      netutils.dll  
0x00007FFBB63F0000 10.0.26100.7019      Windows.StateRepositoryPS.dll  
0x000001BB25C70000 3.11.11150.1013      python3.DLL  
0x00007FFB969F0000 3.11.11150.1013      _bz2.pyd  
0x00007FFB927B0000 3.11.11150.1013      _lzma.pyd  
0x00007FFB895F0000 3.11.11150.1013      _socket.pyd  
0x00007FFBCD570000 10.0.26100.7019      IPHLPAPI.DLL  
0x00007FFBA9020000 3.11.11150.1013      select.pyd  
0x00007FFBA49F0000 3.11.11150.1013      _hashlib.pyd  
0x00007FFB654D0000 3.1.5.0              libcrypto-3.dll  
0x00007FFB86DB0000 3.11.11150.1013      _ssl.pyd  
0x00007FFB6A470000 3.1.5.0              libssl-3.dll  
0x00007FFB651F0000                      _multiarray_umath.cp311-win_amd64.pyd  
0x00007FFB11B40000                      libopenblas64__v0.3.23-293-gc2f4bdbb-gcc_10_3_0-2bde3a66a51006b2b53eb373ff767a3f.dll  
0x00007FFBA7360000                      _multiarray_tests.cp311-win_amd64.pyd  
0x00007FFBA72E0000 3.11.11150.1013      _ctypes.pyd  
0x00007FFBA72D0000                      libffi-8.dll  
0x00007FFB96A60000                      _umath_linalg.cp311-win_amd64.pyd  
0x00007FFB96A40000                      _pocketfft_internal.cp311-win_amd64.pyd  
0x00007FFB95850000                      mtrand.cp311-win_amd64.pyd  
0x00007FFB96A10000                      bit_generator.cp311-win_amd64.pyd  
0x00007FFB702B0000                      _common.cp311-win_amd64.pyd  
0x00007FFB70260000                      _bounded_integers.cp311-win_amd64.pyd  
0x00007FFB70240000                      _mt19937.cp311-win_amd64.pyd  
0x00007FFB70220000                      _philox.cp311-win_amd64.pyd  
0x00007FFB6FBD0000                      _pcg64.cp311-win_amd64.pyd  
0x00007FFBA4590000                      _sfc64.cp311-win_amd64.pyd  
0x00007FFB6FB20000                      _generator.cp311-win_amd64.pyd  
0x00007FFBA45F0000 3.11.11150.1013      _asyncio.pyd  
0x00007FFBA45E0000 3.11.11150.1013      _overlapped.pyd  
0x00007FFBCE120000 10.0.26100.7019      mswsock.dll  
0x00007FFB70340000 3.11.11150.1013      _decimal.pyd  
0x00007FFB702E0000                      asmjit.dll  
0x00007FFB69CC0000                      c10.dll  
0x00007FFB70190000                      c10_cuda.dll  
0x00007FFB6FA90000 6.14.11.12040        cudart64_12.dll  
0x00007FFBA45D0000                      caffe2_nvrtc.dll  
0x00007FFB0EFE0000 6.14.11.9000         nvrtc64_120_0.dll  
0x00007FFAF8830000 6.14.11.1242         cublas64_12.dll  
0x00007FFAD8F50000 6.14.11.1242         cublasLt64_12.dll  
0x00007FFB64DF0000 32.0.15.8097         nvcuda.dll  
0x00007FFB6A400000 9.1.0.70             cudnn64_9.dll  
0x00007FFACA7D0000 9.1.0.70             cudnn_adv64_9.dll  
0x00007FFB2D680000                      cudnn_graph64_9.dll  
0x00007FFAC4090000 9.1.0.70             cudnn_ops64_9.dll  
0x00007FFB2D2A0000 9.1.0.70             cudnn_cnn64_9.dll  
0x00007FFAA0CB0000 9.1.0.70             cudnn_engines_precompiled64_9.dll  
0x00007FFB24E90000 9.1.0.70             cudnn_engines_runtime_compiled64_9.dll  
0x00007FFA9BAE0000                      cudnn_heuristic64_9.dll  
0x00007FFA8A290000 6.14.11.1120         cufft64_11.dll  
0x00007FFB70160000 6.14.11.1120         cufftw64_11.dll  
0x00007FFB23580000 2024.1.0.0           cupti64_2024.1.0.dll  
0x00007FFA85FF0000 6.14.11.1035         curand64_10.dll  
0x00007FFA7F250000 6.14.11.1160         cusolver64_11.dll  
0x00007FFA6EB60000 6.14.11.1230         cusparse64_12.dll  
0x00007FFA6C6C0000 6.14.11.9000         nvJitLink_120_0.dll  
0x00007FFA67C20000 6.14.11.1160         cusolverMg64_11.dll  
0x00007FFB230B0000                      fbgemm.dll  
0x00007FFB22F40000 5.0.2024.820         libiomp5md.dll  
0x00007FFBA45C0000 5.0.2024.820         libiompstubs5md.dll  
0x00007FFB229E0000                      nvrtc-builtins64_124.dll  
0x00007FFBA44E0000                      nvToolsExt64_1.dll  
0x00007FFBA4270000                      shm.dll  
0x00007FFA2DDC0000                      torch_cuda.dll  
0x00007FFA0E1E0000                      torch_cpu.dll  
0x00007FFB22720000                      uv.dll  
0x00007FFBD0120000 10.0.26100.1         PSAPI.DLL  
0x00007FFBCE1D0000 10.0.26100.7019      USERENV.dll  
0x00007FFBA1BD0000                      torch.dll  
0x00007FFBA1B50000                      torch_global_deps.dll  
0x00007FFB191A0000                      torch_python.dll  
0x0000000010000000 1.2.3.0              zlibwapi.dll  
0x00007FFB9F750000                      _C.cp311-win_amd64.pyd  
0x00007FFB9CB70000 3.11.11150.1013      _queue.pyd  
0x00007FFB95840000 3.11.11150.1013      _uuid.pyd  
0x00007FFB6A2E0000 3.11.11150.1013      unicodedata.pyd  
0x00007FFB927A0000 3.11.11150.1013      _multiprocessing.pyd  
0x00007FFA2BC90000 32.0.15.8097         nvcuda64.dll  
0x00007FFBB9EA0000 32.0.15.8097         nvapi64.dll  
0x00007FFB2BC10000                      nvdxgdmal64.dll  
0x00007FFB224B0000                      _imaging.cp311-win_amd64.pyd  
0x00007FFA277F0000                      cv2.pyd  
0x00007FFBB6DC0000 10.0.26100.7171      MF.dll  
0x00007FFBA8820000 10.0.26100.7019      MFPlat.DLL  
0x00007FFBACEF0000 10.0.26100.7019      MFReadWrite.dll  
0x00007FFB91660000 10.0.26100.1         WSOCK32.dll  
0x00007FFBAED30000 10.0.26100.7171      MFCORE.DLL  
0x00007FFBA8770000 10.0.26100.7019      RTWorkQ.DLL  
0x00007FFBA87B0000 10.0.26100.7019      ApplicationTargetedFeatureDatabase.dll  
0x00007FFB70870000                      backend_c.cp311-win_amd64.pyd  
0x00007FFBB3080000                      _yaml.cp311-win_amd64.pyd  
0x00007FFBA31B0000                      _safetensors_rust.pyd  
0x00007FFB171E0000                      libbitsandbytes_cuda124.dll  
0x00007FFBB7F60000                      _speedups.cp311-win_amd64.pyd  
0x00007FFB70930000                      _sentencepiece.cp311-win_amd64.pyd  
0x00007FFB6AC90000                      _regex.cp311-win_amd64.pyd  
0x00007FFA26530000                      _C.pyd  
0x00007FFBB30F0000                      _ccallback_c.cp311-win_amd64.pyd  
0x00007FFB24DD0000                      _fblas.cp311-win_amd64.pyd  
0x00007FFA251D0000                      libscipy_openblas-48c358d105077551cc9cc3ba79387ed5.dll  
0x00007FFB18F70000                      _flapack.cp311-win_amd64.pyd  
0x00007FFB2BB90000                      _cythonized_array_utils.cp311-win_amd64.pyd  
0x00007FFBB3040000                      _cyutility.cp311-win_amd64.pyd  
0x00007FFB2B610000                      cython_lapack.cp311-win_amd64.pyd  
0x00007FFBB2C10000                      _solve_toeplitz.cp311-win_amd64.pyd  
0x00007FFBB2BA0000                      _decomp_lu_cython.cp311-win_amd64.pyd  
0x00007FFBA1B90000                      _matfuncs_schur_sqrtm.cp311-win_amd64.pyd  
0x00007FFB707D0000                      _matfuncs_expm.cp311-win_amd64.pyd  
0x00007FFB18E60000                      _linalg_pythran.cp311-win_amd64.pyd  
0x00007FFB69C60000                      _decomp_update.cp311-win_amd64.pyd  
0x00007FFBA2510000                      cython_blas.cp311-win_amd64.pyd  
0x00007FFB18A60000                      _sparsetools.cp311-win_amd64.pyd  
0x00007FFB22410000                      _csparsetools.cp311-win_amd64.pyd  
0x00007FFB189D0000                      _superlu.cp311-win_amd64.pyd  
0x00007FFB188E0000                      _arpack.cp311-win_amd64.pyd  
0x00007FFB18840000                      _spropack.cp311-win_amd64.pyd  
0x00007FFB187A0000                      _dpropack.cp311-win_amd64.pyd  
0x00007FFB186E0000                      _cpropack.cp311-win_amd64.pyd  
0x00007FFB18610000                      _zpropack.cp311-win_amd64.pyd  
0x00007FFB18500000                      _group_columns.cp311-win_amd64.pyd  
0x00007FFB6FA30000                      _trlib.cp311-win_amd64.pyd  
0x00007FFBB30D0000                      messagestream.cp311-win_amd64.pyd  
0x00007FFB6F280000                      _lbfgsb.cp311-win_amd64.pyd  
0x00007FFB70900000                      _moduleTNC.cp311-win_amd64.pyd  
0x00007FFB6AC50000                      _slsqplib.cp311-win_amd64.pyd  
0x00007FFB6EB40000                      _minpack.cp311-win_amd64.pyd  
0x00007FFB6CC80000                      givens_elimination.cp311-win_amd64.pyd  
0x00007FFBB7F50000                      _zeros.cp311-win_amd64.pyd  
0x00007FFB0EA20000                      _core.cp311-win_amd64.pyd  
0x00007FFB170A0000                      _highs_options.cp311-win_amd64.pyd  
0x00007FFB18370000                      _decomp_interpolative.cp311-win_amd64.pyd  
0x00007FFB64DB0000                      _uarray.cp311-win_amd64.pyd  
0x00007FFB16F20000                      _ufuncs.cp311-win_amd64.pyd  
0x00007FFB13FC0000                      _ufuncs_cxx.cp311-win_amd64.pyd  
0x00007FFB6C310000                      _ellip_harm_2.cp311-win_amd64.pyd  
0x00007FFB13D80000                      _special_ufuncs.cp311-win_amd64.pyd  
0x00007FFB16DA0000                      _gufuncs.cp311-win_amd64.pyd  
0x00007FFB64D00000                      _specfun.cp311-win_amd64.pyd  
0x00007FFB6C500000                      _comb.cp311-win_amd64.pyd  
0x00007FFB13C60000                      pypocketfft.cp311-win_amd64.pyd  
0x00007FFB619E0000                      _bglu_dense.cp311-win_amd64.pyd  
0x00007FFB4AF80000                      _lsap.cp311-win_amd64.pyd  
0x00007FFB223B0000                      _pava_pybind.cp311-win_amd64.pyd  
0x00007FFB0E890000                      _ckdtree.cp311-win_amd64.pyd  
0x00007FFB0E7A0000                      _qhull.cp311-win_amd64.pyd  
0x00007FFB6A2C0000                      _voronoi.cp311-win_amd64.pyd  
0x00007FFB69C00000                      _hausdorff.cp311-win_amd64.pyd  
0x00007FFA25070000                      _distance_pybind.cp311-win_amd64.pyd  
0x00007FFB64D80000                      _distance_wrap.cp311-win_amd64.pyd  
0x00007FFB16C60000                      _rigid_transform.cp311-win_amd64.pyd  
0x00007FFA24FA0000                      _rotation.cp311-win_amd64.pyd  
0x00007FFB63A50000                      _direct.cp311-win_amd64.pyd  
0x00007FF9D68D0000                      _C_flashattention.pyd  
0x00007FFB0E710000                      _odepack.cp311-win_amd64.pyd  
0x00007FFB42C30000                      _quadpack.cp311-win_amd64.pyd  
0x00007FFA24F00000                      _vode.cp311-win_amd64.pyd  
0x00007FFA24E80000                      _dop.cp311-win_amd64.pyd  
0x00007FFA24DF0000                      _lsoda.cp311-win_amd64.pyd  
0x00007FFA24D80000                      _fitpack.cp311-win_amd64.pyd  
0x00007FFA24CD0000                      _dfitpack.cp311-win_amd64.pyd  
0x00007FFA24BD0000                      _dierckx.cp311-win_amd64.pyd  
0x00007FFA24B70000                      _ppoly.cp311-win_amd64.pyd  
0x00007FFB2B4E0000                      _interpnd.cp311-win_amd64.pyd  
0x00007FFA24A40000                      _rbfinterp_pythran.cp311-win_amd64.pyd  
0x00007FFB2DC30000                      _rgi_cython.cp311-win_amd64.pyd  
0x00007FFA249A0000                      _stats.cp311-win_amd64.pyd  
0x00007FFA246B0000                      cython_special.cp311-win_amd64.pyd  
0x00007FFA24650000                      _biasedurn.cp311-win_amd64.pyd  
0x00007FFA24530000                      _stats_pythran.cp311-win_amd64.pyd  
0x00007FFB2D280000                      levyst.cp311-win_amd64.pyd  
0x00007FFB184D0000                      _ansari_swilk_statistics.cp311-win_amd64.pyd  
0x00007FFA24490000                      _shortest_path.cp311-win_amd64.pyd  
0x00007FFA24450000                      _tools.cp311-win_amd64.pyd  
0x00007FFA243D0000                      _traversal.cp311-win_amd64.pyd  
0x00007FFA243A0000                      _min_spanning_tree.cp311-win_amd64.pyd  
0x00007FFA24360000                      _flow.cp311-win_amd64.pyd  
0x00007FFA24320000                      _matching.cp311-win_amd64.pyd  
0x00007FFA242E0000                      _reordering.cp311-win_amd64.pyd  
0x00007FFA24290000                      _sobol.cp311-win_amd64.pyd  
0x00007FFA24230000                      _qmc_cy.cp311-win_amd64.pyd  
0x00007FFA24200000                      rcont.cp311-win_amd64.pyd  
0x00007FFA241D0000                      _qmvnt_cy.cp311-win_amd64.pyd  
0x00007FFA24190000                      _nd_image.cp311-win_amd64.pyd  
0x00007FFA24160000                      _rank_filter_1d.cp311-win_amd64.pyd  
0x00007FFA24110000                      _ni_label.cp311-win_amd64.pyd  
0x00007FFA239C0000                      tokenizers.pyd  
0x00007FFA233C0000                      _C.pyd  
0x00007FFA231C0000                      _imagingft.cp311-win_amd64.pyd  
0x00007FFA23180000                      image.pyd  
0x00007FFA23110000                      libwebp.dll  
0x00007FFA230D0000                      libpng16.dll  
0x00007FFA23040000                      jpeg8.dll  
0x00007FFBB3030000                      libsharpyuv.dll  
0x00007FFB2B5F0000 1.2.13.0             zlib.dll  
0x00007FFA22B80000 6.14.11.1231         nvjpeg64_12.dll  
0x00007FFA22B50000 3.11.11150.1013      _elementtree.pyd  
0x00007FFA22B10000 3.11.11150.1013      pyexpat.pyd  
0x00007FFBCD600000 10.0.26100.7019      DNSAPI.dll  
0x00007FFBD16A0000 10.0.26100.7019      NSI.dll  
0x00007FFBC8400000 10.0.26100.7171      rasadhlp.dll  
0x00007FFBC3320000 10.0.26100.7019      fwpuclnt.dll  
0x00007FFA22120000                      kornia_rs.cp311-win_amd64.pyd  

# Python backtrace
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\torch\storage.py", line 469 in __getitem__
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\safetensors\torch.py", line 383 in load_file
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\model_loading_utils.py", line 177 in load_state_dict
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\model_loading_utils.py", line 358 in _load_shard_file
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\modeling_utils.py", line 1667 in _load_pretrained_model
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\models\modeling_utils.py", line 1285 in from_pretrained
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114 in _inner_fn
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\pipelines\pipeline_loading_utils.py", line 876 in load_sub_model
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\diffusers\pipelines\pipeline_utils.py", line 1021 in from_pretrained
  File "C:\Users\peter\blender-4.5.5\blender-4.5.5\4.5\python\Lib\site-packages\huggingface_hub\utils\_validators.py", line 114 in _inner_fn
  File "C:\Users\peter\Documents\Dependencies_01.blend\Text.004", line 12 in <module>

tin2tin avatar Nov 17 '25 08:11 tin2tin

that code works for 48GB GPUs only, WAN is a big model, using group offloading made the denoise inference time to go over 50m using half precision, so probably don't expect short times without quantization and distilled loras. That's why I was asking what problem did you have with it, since I know it works with quantization without problems.

asomoza avatar Nov 19 '25 19:11 asomoza

Still crashing the same way with bitsandbytes 32 GB RAM, 64 GB paging file, RTX 4090 24 GB VRAM.

import torch
import numpy as np
from diffusers import WanImageToVideoPipeline, WanTransformer3DModel
from diffusers.utils import export_to_video, load_image
from transformers import BitsAndBytesConfig

model_id = "FastDM/Wan2.2-I2V-A14B-Merge-Lightning-V1.0-Diffusers"
dtype = torch.bfloat16

quant_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=dtype
)

transformer = WanTransformer3DModel.from_pretrained(
    model_id,
    subfolder="transformer",
    quantization_config=quant_config,
    torch_dtype=dtype
)

pipe = WanImageToVideoPipeline.from_pretrained(
    model_id,
    transformer=transformer,
    torch_dtype=dtype
)

pipe.enable_model_cpu_offload()
pipe.vae.enable_tiling()

image = load_image(
    "https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/wan_i2v_input.JPG"
)

max_area = 480 * 832
aspect_ratio = image.height / image.width
mod_value = pipe.vae_scale_factor_spatial * pipe.transformer.config.patch_size[1]
height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
image = image.resize((width, height))

prompt = "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression. Blurred beach scenery forms the background featuring crystal-clear waters, distant green hills, and a blue sky dotted with white clouds. The cat assumes a naturally relaxed posture, as if savoring the sea breeze and warm sunlight. A close-up shot highlights the feline's intricate details and the refreshing atmosphere of the seaside."

negative_prompt = "่‰ฒ่ฐƒ่‰ณไธฝ๏ผŒ่ฟ‡ๆ›๏ผŒ้™ๆ€๏ผŒ็ป†่Š‚ๆจก็ณŠไธๆธ…๏ผŒๅญ—ๅน•๏ผŒ้ฃŽๆ ผ๏ผŒไฝœๅ“๏ผŒ็”ปไฝœ๏ผŒ็”ป้ข๏ผŒ้™ๆญข๏ผŒๆ•ดไฝ“ๅ‘็ฐ๏ผŒๆœ€ๅทฎ่ดจ้‡๏ผŒไฝŽ่ดจ้‡๏ผŒJPEGๅŽ‹็ผฉๆฎ‹็•™๏ผŒไธ‘้™‹็š„๏ผŒๆฎ‹็ผบ็š„๏ผŒๅคšไฝ™็š„ๆ‰‹ๆŒ‡๏ผŒ็”ปๅพ—ไธๅฅฝ็š„ๆ‰‹้ƒจ๏ผŒ็”ปๅพ—ไธๅฅฝ็š„่„ธ้ƒจ๏ผŒ็•ธๅฝข็š„๏ผŒๆฏๅฎน็š„๏ผŒๅฝขๆ€็•ธๅฝข็š„่‚ขไฝ“๏ผŒๆ‰‹ๆŒ‡่žๅˆ๏ผŒ้™ๆญขไธๅŠจ็š„็”ป้ข๏ผŒๆ‚ไนฑ็š„่ƒŒๆ™ฏ๏ผŒไธ‰ๆก่…ฟ๏ผŒ่ƒŒๆ™ฏไบบๅพˆๅคš๏ผŒๅ€’็€่ตฐ"

generator = torch.Generator(device="cuda").manual_seed(0)

output = pipe(
    image=image,
    prompt=prompt,
    negative_prompt=negative_prompt,
    height=height,
    width=width,
    num_frames=81,
    guidance_scale=1.0,
    num_inference_steps=4,
    generator=generator,
).frames[0]

export_to_video(output, "i2v_output.mp4", fps=16)

tin2tin avatar Nov 21 '25 10:11 tin2tin

The error EXCEPTION_ACCESS_VIOLATION inside _sentencepiece.cp311-win_amd64.pyd confirms that the SentencePiece library (used for the T5 Tokenizer) is crashing. The Fix: bypass the crashing sentencepiece library entirely by switching to the "Fast" Tokenizer (which is written in Rust and uses a different library, tokenizers).

This is the closest I got to getting it rendering(no crash), but the image of the video is completely broken:

import torch
import gc
import numpy as np
from diffusers import WanImageToVideoPipeline, WanTransformer3DModel, AutoencoderKLWan
from diffusers.schedulers import UniPCMultistepScheduler
from transformers import T5EncoderModel, AutoTokenizer, BitsAndBytesConfig
from diffusers.utils import export_to_video, load_image

gc.collect()
torch.cuda.empty_cache()

model_id = "FastDM/Wan2.2-I2V-A14B-Merge-Lightning-V1.0-Diffusers"
dtype = torch.bfloat16

quant_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=dtype
)

print("--- Step 1: Loading Tokenizer (Fast Mode) ---")
try:
    tokenizer = AutoTokenizer.from_pretrained(model_id, subfolder="tokenizer", use_fast=True)
except:
    tokenizer = AutoTokenizer.from_pretrained("google/t5-v1_1-xxl", use_fast=True)

print("--- Step 2: Loading Text Encoder (4-bit) ---")
text_encoder = T5EncoderModel.from_pretrained(
    model_id,
    subfolder="text_encoder",
    quantization_config=quant_config,
    torch_dtype=dtype
)

print("--- Step 3: Loading VAE (bfloat16) ---")
vae = AutoencoderKLWan.from_pretrained(
    model_id,
    subfolder="vae",
    torch_dtype=dtype
)

print("--- Step 4: Loading Transformer (4-bit) ---")
transformer = WanTransformer3DModel.from_pretrained(
    model_id,
    subfolder="transformer",
    quantization_config=quant_config,
    torch_dtype=dtype
)

print("--- Step 5: Loading Scheduler ---")
scheduler = UniPCMultistepScheduler.from_pretrained(model_id, subfolder="scheduler")

print("--- Step 6: Assembling Pipeline ---")
pipe = WanImageToVideoPipeline(
    vae=vae,
    text_encoder=text_encoder,
    tokenizer=tokenizer,
    transformer=transformer,
    scheduler=scheduler
)

print("--- Step 7: Optimizing Memory ---")
pipe.enable_model_cpu_offload()

pipe.vae.enable_tiling()

print("--- Processing Input Image ---")
image_url = "https://huggingface.co/datasets/YiYiXu/testing-images/resolve/main/wan_i2v_input.JPG"
image = load_image(image_url)

max_area = 480 * 832
aspect_ratio = image.height / image.width
mod_value = 16 
height = round(np.sqrt(max_area * aspect_ratio)) // mod_value * mod_value
width = round(np.sqrt(max_area / aspect_ratio)) // mod_value * mod_value
image = image.resize((width, height))

prompt = "Summer beach vacation style, a white cat wearing sunglasses sits on a surfboard. The fluffy-furred feline gazes directly at the camera with a relaxed expression."
negative_prompt = "low quality, bad anatomy, distorted, blurry, ugly, text, watermark"

print("--- Generating Video ---")
output = pipe(
    image=image,
    prompt=prompt,
    negative_prompt=negative_prompt,
    height=height,
    width=width,
    num_frames=81,
    guidance_scale=1.0,
    num_inference_steps=4, 
).frames[0]

print("--- Saving Video ---")
export_to_video(output, "i2v_output_manual.mp4", fps=16)
print("Done!")

https://github.com/user-attachments/assets/770291bc-1643-48d0-a362-93579159467b

tin2tin avatar Nov 21 '25 13:11 tin2tin

I'll try to take a look today, you have 32GB of RAM and 24GB of VRAM but since you're using this inside blender and with windows, can you tell me the real FREE values you have, I'm guessing is more like 20GB of RAM and 20 of VRAM, ideally this should work without using the page file or the shared VRAM that the nvidia driver uses by default.

Also do you happen to have a fast nvme drive?

asomoza avatar Nov 21 '25 14:11 asomoza

Thanks for taking a look.

Image Image

tin2tin avatar Nov 21 '25 15:11 tin2tin

maybe the flow shift.

    pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=3.0)

I know this fused lighting model works when quantized and offloaded. But i only quant the text encoder to 8bit and only use the transformers from it magespace/Wan2.2-I2V-A14B-Lightning-Diffusers

I have some example code here if it helps atall https://github.com/JoeGaffney/deferred-diffusion/blob/main/workers/videos/local/wan_2.py

Possibly also lifting the code out of blender would be good to figure out any issues there or contention of memory.

JoeGaffney avatar Dec 11 '25 17:12 JoeGaffney