`--disable-dynamic-vram` prevents automatic fast-disk detection on Windows
Title
--disable-dynamic-vram prevents automatic fast-disk detection on Windows
Description
After #16333 added automatic --fast-disk detection, models are reported as:
[INFO] Model storage policy: fast_disk=False paths=['D:\\ComfyUI_windows_portable\\ComfyUI\\models\\diffusion_models\\anima-base-v1.0.safetensors']
even though the model is stored on a PCIe 4.0 x4 NVMe drive that comfy-aimdo correctly detects as a fast disk.
This happens when ComfyUI is started with:
--disable-dynamic-vram
It appears that comfy_aimdo.control.init() is only called when enables_dynamic_vram() is true.
Since comfy_aimdo.storage.fast_disk() depends on the native Aimdo library being initialized, the storage check returns None when Dynamic VRAM is explicitly disabled. model_fast_disk() then treats this as False.
Environment
- OS: Windows 11
- GPU: AMD Radeon RX 9070 XT / RX 9060 XT
- PyTorch: 2.15.0a0+rocm10.1.0a20260822
- HIP: 7.16.26332
- ComfyUI: current master
- C: drive: PCIe 3.0 x4 NVMe
- D: drive: PCIe 4.0 x4 NVMe
- Dynamic VRAM explicitly disabled with
--disable-dynamic-vram
Reproduction
Start ComfyUI with --disable-dynamic-vram and load a model from the PCIe 4.0 x4 NVMe drive.
Observed:
[INFO] Model storage policy: fast_disk=False paths=['D:\\ComfyUI_windows_portable\\ComfyUI\\models\\diffusion_models\\anima-base-v1.0.safetensors']
Testing comfy-aimdo directly without initializing it returns None.
If Aimdo is initialized first:
import comfy_aimdo.control as c
print("vendor =", c.detect_vendor())
print("init =", c.init())
print("lib =", bool(c.lib))
import comfy_aimdo.storage as s
print("C =", s.fast_disk(r"C:\Windows\System32\kernel32.dll"))
print("D =", s.fast_disk(
r"D:\ComfyUI_windows_portable\ComfyUI\models\diffusion_models\anima-base-v1.0.safetensors"
))
the result is:
vendor = rocm
init = True
lib = True
C = True
D = True
So the Windows NVMe detection itself appears to work correctly.
Expected behavior
Automatic fast-disk detection should still work when Dynamic VRAM is disabled.
Storage detection probably needs either:
- Aimdo initialization independent of Dynamic VRAM, or
- lazy initialization of the native backend when
comfy_aimdo.storage.fast_disk()is used.
Workaround
Explicitly passing:
--fast-disk
works around the issue.
Source: Comfy-Org/ComfyUI