ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

BSOD in dxgmms2.sys (VidMm page-in use-after-free) on 6 GB RTX 3050 since v0.35.0 / comfy-aimdo 0.5.3 dynamic VRAM loading

Open jhonsu01 opened this issue 2 months ago • 12 comments

Summary

Since updating from v0.34.6 to v0.35.0 / v0.35.1 (which bumped comfy-aimdo 0.4.15 → 0.5.3), my Windows 11 machine has hit 4 kernel BSODs in one day, all with the identical signature inside the Windows video memory manager (dxgmms2.sys) while ComfyUI was staging models through the new dynamic VRAM loader on a 6 GB GPU. Two of the crashes happened at the exact same log line of the same workflow. With v0.34.6 the day before, the same machine ran 116 prompts over 12 hours without a single problem.

I'm aware a user-mode app "shouldn't" be able to bluescreen Windows — the fault is technically in dxgmms2.sys / nvlddmkm.sys — but the trigger is very clearly the allocation pattern of the 0.35 dynamic loader, and the startup message says --disable-dynamic-vram "will be removed soon" and asks for detailed reports, so here is one with a full kernel dump analysis.

Environment

ComfyUI v0.35.0 (crash #1–#3) and v0.35.1 (crash #4), via ComfyUI Desktop 0.4.x auto-update; comfy-aimdo 0.5.3, comfy-kitchen 0.2.33, frontend 1.51.10
Last known good v0.34.6 (comfy-aimdo 0.4.15) — 116 prompts / 12 h on 2026-09-08, 554 dynamic loads + 63 partial loads, zero issues
GPU NVIDIA GeForce RTX 3050 6 GB, driver 616.92 (nvlddmkm.sys built 2026-09-04), WDDM 3.2, HAGS on
Also present AMD Radeon iGPU (Ryzen 5 9600X) driving the monitors; RTX 3050 is headless (compute only). Confirmed from the kernel dump that the faulting adapter is the NVIDIA one (see below).
OS Windows 11 Pro 26200.9445 (KB5124008 installed 2026-09-09 — same day as the ComfyUI update, so I can't fully exclude an OS-side regression; noted for honesty)
RAM 64 GB DDR5
Python / torch 3.13.12, torch 2.12.1+cu130 (Desktop standalone env v0.29.0-env1), cudaMallocAsync enabled, NORMAL_VRAM
Launch args --enable-manager (default Desktop launch)

Crashes

# Time (local) Bugcheck Faulting function
1 2026-09-10 12:12 0x50 PAGE_FAULT_IN_NONPAGED_AREA dxgmms2!GetVidMmGlobalAllocFromOwner+0xf
2 2026-09-10 14:46 0x7E SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (c0000005) dxgmms2!GetVidMmGlobalAllocFromOwner+0x12
3 2026-09-10 ~16:34 0x7E (c0000005) dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+0x179
4 2026-09-10 ~19:18 0x50 dxgmms2!GetVidMmGlobalAllocFromOwner+0xf (same instruction as #1)

Identical stack in all four (from kd !analyze -v, Microsoft public symbols):

dxgmms2!GetVidMmGlobalAllocFromOwner            <- reads freed "owner" pointer
dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix
dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePte
dxgmms2!VIDMM_PAGE_DIRECTORY::CommitVirtualAddressRange
dxgmms2!CVirtualAddressAllocator::CommitVirtualAddressRange
dxgmms2!CommitAllocationVirtualAddressCb
dxgmms2!VIDMM_PHYSICAL_ADAPTER::IteratePhysicalMemoryRanges
dxgmms2!CommitVirtualAddressRangesInList
dxgmms2!VIDMM_GLOBAL::PageInOneAllocation       <- VidMm paging an allocation into GPU-visible memory
dxgmms2!VIDMM_GLOBAL::ProcessDeferredCommand
dxgmms2!VidMmWorkerThreadProc
nt!PspSystemThreadStartup

Kernel dump (crash #4, 3.9 GB automatic dump) details:

  • GetVidMmGlobalAllocFromOwner executes mov rax,[rdx] with rdx = ffffac839aa5e1c0; !pte on that address: PDE = 0, "not valid" — the allocation's owner object had already been freed. i.e. a use-after-free race between an allocation being destroyed and VidMm's deferred page-in of it.
  • The DXGADAPTER reachable from the VidMm objects of the failing operation has a DDI table with 126 function pointers into nvlddmkm.sys and 0 into amdkmdag.sys → the NVIDIA adapter (the one ComfyUI uses), not the iGPU.
  • Context process: System (VidMm worker thread); 7 python.exe (ComfyUI server) alive at crash time.

ComfyUI log at the moment of the crashes

Crash #3 (v0.35.0) and crash #4 (v0.35.1) both end on the same line of the same workflow (Z-Image → Lumina2, run after an LTXAV video generation):

[2026-09-10 19:17:49.525] got prompt
[2026-09-10 19:17:49.907] Using RAM pressure cache.
[2026-09-10 19:17:50.959] Requested to load ZImageTEModel_
[2026-09-10 19:17:51.070] Model ZImageTEModel_ prepared for dynamic VRAM loading. 7671MB Staged. 0 patches attached. Force pre-loaded 145 weights: 383 KB.
[2026-09-10 19:18:08.751] 0 models unloaded.
[2026-09-10 19:18:08.777] Model ZImageTEModel_ prepared for dynamic VRAM loading. 7671MB Staged. 0 patches attached. Force pre-loaded 145 weights: 383 KB.
[2026-09-10 19:18:09.810] model_type FLOW
[2026-09-10 19:18:09.818] Requested to load Lumina2
[2026-09-10 19:18:10.127] Model Lumina2 prepared for dynamic VRAM loading. 11738MB Staged. 0 patches attached. Force pre-loaded 205 weights: 1045 KB.
<-- BSOD here (crash #4). Crash #3 log ends on the identical line at 16:33:52.

Earlier in the same session, LTXAV had been staged at 20484MB Staged (two 440 s video generations completed fine); the crash comes when the next workflow stages ~19 GB of new weights while the previous ones are being evicted — i.e. the point of maximum allocate/free churn on a 6 GB card.

Note the v0.35 log shows 0 loaded partially lines in these sessions, whereas the v0.34.6 log for the same kind of work shows 63 — the loading strategy changed with the comfy-aimdo 0.5 bump.

What I've ruled out

  • Not power / thermal / storage / RAM at random: zero WHEA events in 14 days, all SSDs healthy, identical instruction in 4 dumps (random memory corruption doesn't do that).
  • Removed a third-party virtual display driver (IddSampleDriver-based) → crash #4 happened without it.
  • Reinstalling the NVIDIA driver (same version) → crash #3 happened 77 min later.

Workaround / status

  • Rolled back to v0.34.6 via ComfyUI Desktop snapshot and disabled auto-update; also running with --disable-dynamic-vram for now.
  • Startup on v0.35.1 with --disable-dynamic-vram prints: "Dynamic vram disabled with argument. If you have any issues with dynamic vram enabled please give us a detailed reports as this argument will be removed soon" — please keep that escape hatch at least until the 0.5.x loader is safe on small-VRAM WDDM GPUs.

Suggested things to look at

  • Whatever changed in comfy-aimdo 0.4.15 → 0.5.3 around freeing/re-staging weight buffers while a page-in of the same allocation is still queued (VidMm deferred commands). The kernel side clearly sees an allocation owner destroyed while its page-in is pending; on Windows that's a classic way to hit dxgmms2 bugs (Microsoft had a very similar dxgmms2 race regression in Jan 2026, fixed in KB5077181).
  • Interaction with cudaMallocAsync + pinned memory under heavy eviction on 6 GB cards.

I can provide the four minidumps, the full kernel dump !analyze -v output, lm module list, and the complete ComfyUI logs of the crashing sessions on request. Happy to test a patched comfy-aimdo build.

jhonsu01 avatar Sep 11 '26 01:09 jhonsu01

Yes, same problem here. (I guess) I'm on a rtx5090 and my minimax workflow could generate 20 sec videos with 1mp without problems before the update to 0.35.0. Now it's crashing every time. Something with the memory management doesn't work correctly anymore. I use the Minimax-H3-Motion-Director node, which segments the video generation, and the crash always happens when second segment wants to free memory and load weights for the generation of the second segment. The workflow worked flawless in previous version (0.34.x).

DarkNecrotic avatar Sep 11 '26 09:09 DarkNecrotic

I might suspect it's caused by the new Comfy Compiler feature implemented on latest aimdo v0.5.x

  • https://github.com/Comfy-Org/ComfyUI/pull/15861

You should try keeping dynamic vram enabled and using --disable-comfy-compiler to only disable that feature.

See if that solves your issue.

LukeG89 avatar Sep 11 '26 12:09 LukeG89

I'm experiencing the same issue. After unloading the models using ComfyUI Manager and then starting a MiniMax H3 generation, I get an immediate BSOD. My guess is that it may be related to system RAM / VRAM pressure or memory management during model unloading/loading. It seems to happen specifically after unloading the previous models, doing something else in the background and then starting a run

Here is my windows crash report analyzed in WinDbg (basically same issue as OP)

Click to expand
!analyze -v
Loading Kernel Symbols
...............................................................
................................................................
................................................................
........................................................
Loading User Symbols

Loading unloaded module list
......................
*******************************************************************************
*                                                                             *
*                        Bugcheck Analysis                                    *
*                                                                             *
*******************************************************************************

SYSTEM_THREAD_EXCEPTION_NOT_HANDLED (7e)
This is a very common BugCheck.  Usually the exception address pinpoints
the driver/function that caused the problem.  Always note this address
as well as the link date of the driver/image that contains this address.
Arguments:
Arg1: ffffffffc0000005, The exception code that was not handled
Arg2: fffff8062921c1f0, The address that the exception occurred at
Arg3: ffffd00cd4b37ca8, Exception Record Address
Arg4: ffffd00cd4b374c0, Context Record Address

Debugging Details:
------------------


KEY_VALUES_STRING: 1

    Key  : AV.Type
    Value: Read

    Key  : Analysis.CPU.mSec
    Value: 1781

    Key  : Analysis.Elapsed.mSec
    Value: 16330

    Key  : Analysis.IO.Other.Mb
    Value: 18

    Key  : Analysis.IO.Read.Mb
    Value: 1

    Key  : Analysis.IO.Write.Mb
    Value: 39

    Key  : Analysis.Init.CPU.mSec
    Value: 578

    Key  : Analysis.Init.Elapsed.mSec
    Value: 12386

    Key  : Analysis.Memory.CommitPeak.Mb
    Value: 102

    Key  : Analysis.Version.DbgEng
    Value: 10.0.29617.1000

    Key  : Analysis.Version.Description
    Value: 10.2604.29.1 amd64fre

    Key  : Analysis.Version.Ext
    Value: 1.2604.29.1

    Key  : Bugcheck.Code.LegacyAPI
    Value: 0x1000007e

    Key  : Bugcheck.Code.TargetModel
    Value: 0x1000007e

    Key  : Dump.Attributes.AsUlong
    Value: 0x21808

    Key  : Dump.Attributes.DiagDataWrittenToHeader
    Value: 1

    Key  : Dump.Attributes.ErrorCode
    Value: 0x0

    Key  : Dump.Attributes.KernelGeneratedTriageDump
    Value: 1

    Key  : Dump.Attributes.LastLine
    Value: Dump completed successfully.

    Key  : Dump.Attributes.ProgressPercentage
    Value: 0

    Key  : Failure.Bucket
    Value: AV_dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix

    Key  : Failure.Exception.Code
    Value: 0xc0000005

    Key  : Failure.Exception.IP.Address
    Value: 0xfffff8062921c1f0

    Key  : Failure.Exception.IP.Module
    Value: dxgmms2

    Key  : Failure.Exception.IP.Offset
    Value: 0x9c1f0

    Key  : Failure.Exception.Record
    Value: 0xffffd00cd4b37ca8

    Key  : Failure.Hash
    Value: {57b31de8-4da2-86e3-87d6-8a57c6306880}

    Key  : Faulting.IP.Type
    Value: Paged

    Key  : Hypervisor.Enlightenments.ValueHex
    Value: 0x7497cf94

    Key  : Hypervisor.Flags.AnyHypervisorPresent
    Value: 1

    Key  : Hypervisor.Flags.ApicEnlightened
    Value: 1

    Key  : Hypervisor.Flags.ApicVirtualizationAvailable
    Value: 0

    Key  : Hypervisor.Flags.AsyncMemoryHint
    Value: 0

    Key  : Hypervisor.Flags.CoreSchedulerRequested
    Value: 0

    Key  : Hypervisor.Flags.CpuManager
    Value: 1

    Key  : Hypervisor.Flags.DeprecateAutoEoi
    Value: 0

    Key  : Hypervisor.Flags.DynamicCpuDisabled
    Value: 1

    Key  : Hypervisor.Flags.Epf
    Value: 0

    Key  : Hypervisor.Flags.ExtendedProcessorMasks
    Value: 1

    Key  : Hypervisor.Flags.HardwareMbecAvailable
    Value: 1

    Key  : Hypervisor.Flags.MaxBankNumber
    Value: 0

    Key  : Hypervisor.Flags.MemoryZeroingControl
    Value: 0

    Key  : Hypervisor.Flags.NoExtendedRangeFlush
    Value: 0

    Key  : Hypervisor.Flags.NoNonArchCoreSharing
    Value: 1

    Key  : Hypervisor.Flags.Phase0InitDone
    Value: 1

    Key  : Hypervisor.Flags.PowerSchedulerQos
    Value: 0

    Key  : Hypervisor.Flags.RootScheduler
    Value: 0

    Key  : Hypervisor.Flags.SynicAvailable
    Value: 1

    Key  : Hypervisor.Flags.UseQpcBias
    Value: 0

    Key  : Hypervisor.Flags.Value
    Value: 38408431

    Key  : Hypervisor.Flags.ValueHex
    Value: 0x24a10ef

    Key  : Hypervisor.Flags.VpAssistPage
    Value: 1

    Key  : Hypervisor.Flags.VsmAvailable
    Value: 1

    Key  : Hypervisor.RootFlags.AccessStats
    Value: 1

    Key  : Hypervisor.RootFlags.CrashdumpEnlightened
    Value: 1

    Key  : Hypervisor.RootFlags.CreateVirtualProcessor
    Value: 1

    Key  : Hypervisor.RootFlags.DisableHyperthreading
    Value: 0

    Key  : Hypervisor.RootFlags.HostTimelineSync
    Value: 1

    Key  : Hypervisor.RootFlags.HypervisorDebuggingEnabled
    Value: 0

    Key  : Hypervisor.RootFlags.IsHyperV
    Value: 1

    Key  : Hypervisor.RootFlags.LivedumpEnlightened
    Value: 1

    Key  : Hypervisor.RootFlags.MapDeviceInterrupt
    Value: 1

    Key  : Hypervisor.RootFlags.MceEnlightened
    Value: 1

    Key  : Hypervisor.RootFlags.Nested
    Value: 0

    Key  : Hypervisor.RootFlags.StartLogicalProcessor
    Value: 1

    Key  : Hypervisor.RootFlags.Value
    Value: 1015

    Key  : Hypervisor.RootFlags.ValueHex
    Value: 0x3f7


BUGCHECK_CODE:  7e

BUGCHECK_P1: ffffffffc0000005

BUGCHECK_P2: fffff8062921c1f0

BUGCHECK_P3: ffffd00cd4b37ca8

BUGCHECK_P4: ffffd00cd4b374c0

FILE_IN_CAB:  091126-10796-01.dmp

TAG_NOT_DEFINED_202b:  *** Unknown TAG in analysis list 202b


DUMP_FILE_ATTRIBUTES: 0x21808
  Kernel Generated Triage Dump

FAULTING_THREAD:  ffffbf810745a180

EXCEPTION_RECORD:  ffffd00cd4b37ca8 -- (.exr 0xffffd00cd4b37ca8)
ExceptionAddress: fffff8062921c1f0 (dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+0x0000000000000184)
   ExceptionCode: c0000005 (Access violation)
  ExceptionFlags: 00000000
NumberParameters: 2
   Parameter[0]: 0000000000000000
   Parameter[1]: 0000000000000048
Attempt to read from address 0000000000000048

CONTEXT:  ffffd00cd4b374c0 -- (.cxr 0xffffd00cd4b374c0)
rax=0000000000000000 rbx=ffff9a8f988efde0 rcx=ffff9a8fc8631a30
rdx=ffffbf8140426ce0 rsi=ffff9a8f979640e0 rdi=ffff9a8f8c908480
rip=fffff8062921c1f0 rsp=ffffd00cd4b37ee0 rbp=ffffd00cd4b37f81
 r8=000000005b800000  r9=ffff9a8fc8630000 r10=fffff80625b81f80
r11=ffffd00cd4b37e80 r12=0000000000000346 r13=0000000714600000
r14=ffff9a8fbf729990 r15=0000000000000d18
iopl=0         nv up ei pl nz ac pe nc
cs=0010  ss=0018  ds=002b  es=002b  fs=0053  gs=002b             efl=00050216
dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+0x184:
fffff806`2921c1f0 4c2b4048        sub     r8,qword ptr [rax+48h] ds:002b:00000000`00000048=????????????????
Resetting default scope

BLACKBOXBSD: 1 (!blackboxbsd)


BLACKBOXNTFS: 1 (!blackboxntfs)


BLACKBOXPNP: 1 (!blackboxpnp)


BLACKBOXWINLOGON: 1 (!blackboxwinlogon) (!blackboxwinlogonnotify)


CUSTOMER_CRASH_COUNT:  1

PROCESS_NAME:  System

READ_ADDRESS: fffff806947c54d8: Unable to get MiVisibleState
 0000000000000048 

ERROR_CODE: (NTSTATUS) 0xc0000005 - Die Anweisung in 0x%p verwies auf Arbeitsspeicher bei 0x%p. Der Vorgang %s konnte im Arbeitsspeicher nicht durchgef hrt werden.

EXCEPTION_CODE_STR:  c0000005

EXCEPTION_PARAMETER1:  0000000000000000

EXCEPTION_PARAMETER2:  0000000000000048

EXCEPTION_STR:  0xc0000005

IP_IN_PAGED_CODE: 
dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+184
fffff806`2921c1f0 4c2b4048        sub     r8,qword ptr [rax+48h]

STACK_TEXT:  
ffffd00c`d4b37ee0 fffff806`2921be29     : 00000000`00000000 00000000`00000000 ffffbf81`03c382f0 00000000`00000001 : dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+0x184
ffffd00c`d4b37fd0 fffff806`2926d0d7     : 00000000`00000000 ffffd00c`d4b381d0 ffff9a8f`988efde0 00000000`04400000 : dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePte+0x6d
ffffd00c`d4b380c0 fffff806`2926c78d     : 00000000`00000000 ffff9a8f`979640e0 ffff9a8f`a1c6c800 00000000`00000000 : dxgmms2!VIDMM_PAGE_DIRECTORY::CommitVirtualAddressRange+0xd9f
ffffd00c`d4b38250 fffff806`2923f951     : 00000000`00000001 ffff9a8f`979640e0 ffffbf81`07211c00 00000000`00000000 : dxgmms2!VIDMM_PAGE_DIRECTORY::CommitVirtualAddressRange+0x455
ffffd00c`d4b383e0 fffff806`2923f413     : ffff9a8f`93de7908 00000000`00000000 ffffbf81`0596b1f0 ffff9a8f`724a4008 : dxgmms2!CVirtualAddressAllocator::CommitVirtualAddressRange+0x439
ffffd00c`d4b38560 fffff806`2923f259     : ffffbf81`03c38240 ffffbf81`0596b1f0 ffffd00c`d4b38740 ffffbf81`07211c90 : dxgmms2!CommitAllocationVirtualAddressCb+0xb3
ffffd00c`d4b38600 fffff806`292112e8     : ffff9a8f`ac2802a0 ffffbf81`03c38240 ffffbf81`07514000 00000000`00000000 : dxgmms2!VIDMM_PHYSICAL_ADAPTER::IteratePhysicalMemoryRanges+0xe9
ffffd00c`d4b38690 fffff806`2923bffe     : ffffbf81`21375990 ffffd00c`d4b387d0 ffff9a8f`93de7880 00000000`00000000 : dxgmms2!CommitVirtualAddressRangesInList+0x7c
ffffd00c`d4b386d0 fffff806`292584a1     : 00000000`00000000 ffffd301`4f751180 00000187`da796b20 00000000`00000002 : dxgmms2!VIDMM_GLOBAL::PageInOneAllocation+0x256
ffffd00c`d4b38820 fffff806`292570af     : ffffd00c`d4b38b00 ffff9a8f`b61e9870 ffffbf81`07514000 ffff9a8f`b61e9870 : dxgmms2!VIDMM_GLOBAL::ProcessDeferredCommand+0x261
ffffd00c`d4b38a00 fffff806`93c944ca     : ffff9a8f`724a8000 fffff806`29256901 ffffd301`4f4d1100 ffffbf81`58856e02 : dxgmms2!VidMmWorkerThreadProc+0x6ef
ffffd00c`d4b38bb0 fffff806`93eaf7f4     : ffffd301`4f4d1180 ffffbf81`0745a180 fffff806`93c94470 1a04b60f`1374c085 : nt!PspSystemThreadStartup+0x5a
ffffd00c`d4b38c00 00000000`00000000     : ffffd00c`d4b39000 ffffd00c`d4b32000 00000000`00000000 00000000`00000000 : nt!KiStartSystemThread+0x34


SYMBOL_NAME:  dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix+184

MODULE_NAME: dxgmms2

IMAGE_NAME:  dxgmms2.sys

IMAGE_VERSION:  10.0.26100.9444

STACK_COMMAND: .cxr 0xffffd00cd4b374c0 ; kb

BUCKET_ID_FUNC_OFFSET:  184

FAILURE_BUCKET_ID:  AV_dxgmms2!VIDMM_PAGE_DIRECTORY::ExpandLargePagePteWithFix

OSPLATFORM_TYPE:  x64

OSNAME:  Windows 10

FAILURE_ID_HASH:  {57b31de8-4da2-86e3-87d6-8a57c6306880}

Followup:     MachineOwner
---------

adrianschubek avatar Sep 11 '26 12:09 adrianschubek

I might suspect it's caused by the new Comfy Compiler feature implemented on latest aimdo v0.5.x

* [Introduce Comfy Compiler (CORE-389) #15861](https://github.com/Comfy-Org/ComfyUI/pull/15861)

You should try keeping dynamic vram enabled and using --disable-comfy-compiler to only disable that feature.

See if that solves your issue.

Thank you for the info. that solved the memory issue for me. Now I'm curious what's the problem with the new compiler and what it does different, to make comfy crash. :)

DarkNecrotic avatar Sep 11 '26 13:09 DarkNecrotic

Not a BSOD, but after updating to 0.35.0, my MinimaxH3 workflow which runs perfectly in Comfy 0.34.0 with 0.8MP/10 sec. crashes each time on Comfy 0.35.0 with a memory overflow, even when I go down to 0.5 MP. RTX4090 with 64GB RAM. Comfy tries to allocate 96153108480 bytes - that is 96 GB! WTF!? Edit: --disable-comfy-compiler does not fix the issue for me. Now back on 0.34.0 and the workflow runs again.

[ERROR] !!! Exception during processing !!! [enforce fail at alloc_cpu.cpp:117] data. DefaultCPUAllocator: not enough memory: you tried to allocate 96153108480 bytes. [ERROR] Traceback (most recent call last): File "G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py", line 545, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py", line 344, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py", line 318, in async_map_node_over_list await process_inputs(input_dict, i) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py", line 306, in process_inputs result = f(**inputs) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_api\internal_init.py", line 149, in wrapped_func return method(locked_class, **inputs) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_api\latest_io.py", line 2046, in EXECUTE_NORMALIZED to_return = cls.execute(*args, **kwargs) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 1055, in execute samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1335, in sample output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1262, in outer_sample output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1237, in inner_sample samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1005, in sample samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options) File "G:\ComfyUI_portable_Q4_2026\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 124, in decorate_context return func(*args, **kwargs) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\k_diffusion\sampling.py", line 1528, in sample_res_multistep return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=False) File "G:\ComfyUI_portable_Q4_2026\python_embeded\Lib\site-packages\torch\utils_contextlib.py", line 124, in decorate_context return func(*args, **kwargs) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\k_diffusion\sampling.py", line 1489, in res_multistep callback({"x": x, "i": i, "sigma": sigmas[i], "sigma_hat": sigmas[i], "denoised": denoised}) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1003, in k_callback callback(x["i"], x["denoised"], x["x"], total_steps) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", line 1295, in callback return packed_callback(step, x0, x, total_steps) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\latent_preview.py", line 137, in callback preview_bytes = previewer.decode_latent_to_preview_image(preview_format, x0) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py", line 55, in decode_latent_to_preview_image num_images)).run() ~~~^^ File "threading.py", line 995, in run File "G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py", line 59, in process_previews image_tensor = self.decode_latent_to_preview(image_tensor) File "G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py", line 85, in decode_latent_to_preview x_sample = self.taesd.decode(x0).movedim(1, 3) ~~~~~~~~~~~~~~~~~^^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\sd.py", line 1257, in decode model_management.raise_non_oom(e) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\model_management.py", line 399, in raise_non_oom raise e File "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\sd.py", line 1252, in decode pixel_samples = torch.empty((samples_in.shape[0],) + tuple(out.shape[1:]), device=self.output_device, dtype=self.vae_output_dtype()) RuntimeError: [enforce fail at alloc_cpu.cpp:117] data. DefaultCPUAllocator: not enough memory: you tried to allocate 96153108480 bytes.

VRAM-Hoarder avatar Sep 11 '26 18:09 VRAM-Hoarder

不是蓝屏死机,但升级到 0.35.0 版本后,我的 MinimaxH3 工作流程在 Comfy 0.34.0 版本下以 0.8MP/10 秒的分辨率完美运行,但在 Comfy 0.35.0 版本下每次都会崩溃,提示内存溢出,即使我将分辨率降低到 0.5MP 也无济于事。我的配置是 RTX4090 显卡和 64GB 内存。Comfy 尝试分配 96153108480 字节——也就是 96GB!这到底是怎么回事?! 编辑:--disable-comfy-compiler这个问题对我来说并没有解决。现在我又用回了 0.34.0 版本,工作流程又能正常运行了。

[错误] !!! 处理过程中发生异常 !!! [在 alloc_cpu.cpp:117 强制失败] 数据。DefaultCPUAllocator:内存不足:您尝试分配 96153108480 字节。 [错误] 回溯(最近一次调用): 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py”,第 545 行,在 execute 中 output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^ ...​allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^ ..._​await process_inputs(input_dict, i) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\execution.py”,第 306 行,在 process_inputs 中 result = f(**inputs) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_api\internal_init.py _”__,第 149 行,在 wrapped_func 中 return method(locked_class, **inputs) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_api\latest_io.py”,第 2046 行,在 EXECUTE_NORMALIZED 中 to_return = cls.execute(*args, **kwargs) 文件"G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy_extras\nodes_custom_sampler.py", 第 1055 行,在 execute 中 samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed) 文件 "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", 第 1335 行,在 sample 中 output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) 文件"G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\patcher_extension.py", 第 113 行,在 execute 中 返回 self.original(*args, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 文件 "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py", 第 1262 行,在 outer_sample 中 output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py”,第 1237 行,在 inner_sample 中 samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\patcher_extension.py”,第 113 行,在 execute 中 return self.original(*args, **kwargs) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py”,第 1005 行,在 sample 中 samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options) 文件“G:\ComfyUI_portable_Q4_2026\python_embeded\Lib\site-packages\torch\utils_contextlib.py”,第 124 行,在 decorate_context 中 返回 func(*args, **kwargs) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\k_diffusion\sampling.py”,第 1528 行,在 sample_res_multistep 中 返回 res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=False) 文件"G:\ComfyUI_portable_Q4_2026\python_embeded\Lib\site-packages\torch\utils_contextlib.py", 第 124 行,在 decorate_context 中 返回 func(*args, **kwargs) 文件 "G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\k_diffusion\sampling.py", 第 1489 行,在 res_multistep 中 回调({"x": x, "i": i, "sigma": sigmas[i], "sigma_hat": sigmas[i], "denoised": denoised}) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py”,第 1003 行,在 k_callback 中 callback(x["i"], x["denoised"], x["x"], total_steps) ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\samplers.py”,第 1295 行,在 callback 中 返回 packed_callback(step, x0, x, total_steps) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\latent_preview.py”,第 137 行,在 callback 中 preview_bytes = previewer.decode_latent_to_preview_image(preview_format, x0) 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py”,第 55 行,在 decode_latent_to_preview_image 中 num_images)).run() ~~~^^ 文件“threading.py”,第 995 行,在 run 中"G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py", 第 59 行,在 process_previews 中 image_tensor = self.decode_latent_to_preview(image_tensor) 文件 "G:\ComfyUI_portable_Q4_2026\ComfyUI\custom_nodes\comfyui-videohelpersuite\videohelpersuite\latent_preview.py”,第 85 行,在 decode_latent_to_preview 中 x_sample = self.taesd.decode(x0).movedim(1, 3) ~~~~~~~~~~~~~~~~~^^^^ 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\sd.py”,第 1257 行,在 decode 中 model_management.raise_non_oom(e) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\model_management.py”,第 399 行,在 raise_non_oom 中 raise e 文件“G:\ComfyUI_portable_Q4_2026\ComfyUI\comfy\sd.py”,第 1252 行,在 decode 中 pixel_samples = torch.empty((samples_in.shape[0],) + tuple(out.shape[1:]), device=self.output_device, dtype=self.vae_output_dtype()) RuntimeError: [enforce fail at alloc_cpu.cpp:117] data.DefaultCPUAllocator:内存不足:您尝试分配96153108480字节。

I'm in the same boat. I honestly suspect the developers did this on purpose to boost sales of graphics cards and RAM. Everything was fine in version 0.34.0.

ffoxa12 avatar Sep 15 '26 15:09 ffoxa12

I'm in the same boat. I honestly suspect the developers did this on purpose to boost sales of graphics cards and RAM. Everything was fine in version 0.34.0.

If it is still of interest, I found out what caused this error message "DefaultCPUAllocator: not enough memory: you tried to allocate 96153108480 bytes." in my case. It is the animated sampling preview that can be enabled in the VHS video helper suite. Once this setting was disabled, no more crashes. I now use Kijai's "Model Preview Override" node.

Image

VRAM-Hoarder avatar Sep 18 '26 21:09 VRAM-Hoarder

Same bugcheck on a 12 GB card, five times in 17 days. Three triage dumps (09-13, 09-18, 09-24) show the VidMm deferred page-in stack from the public-symbol !analyze earlier in this thread; the other two crashes are known only from their bugcheck addresses, whose low 16 bits match the same instructions. The regression window on this machine lines up with comfy-aimdo 0.5.x, though an NVIDIA driver update and a comfy-kitchen update fall inside it too.

Environment

  • RTX 3080 12 GB (the only GPU; it also drives the displays), 64 GB system RAM, Ryzen 9 5900X, Resizable BAR enabled
  • PyTorch 2.13.0+cu130, cudaMallocAsync, pinned memory enabled (~26 GB), sage attention
  • Workload: MiniMax H3 FL2VA int8, staged as 19995 MB on the 12 GB card once per H3 prompt, in near-continuous queues interleaved with image-model prompts
  • ComfyUI, comfy-aimdo, Windows and driver versions changed between crashes, so they are per crash below

Crashes

All 0x7E SYSTEM_THREAD_EXCEPTION_NOT_HANDLED with 0xC0000005.

Date ComfyUI (git) comfy-aimdo pinned Windows / dxgmms2.sys NVIDIA Fault
09-07 v0.34.0-72 0.5.2 26200.9278 / 9278 616.56 GetVidMmGlobalAllocFromOwner+0x12 (bugcheck address only)
09-13 v0.34.0-72 0.5.2 26200.9278 / 9278 616.56 ExpandLargePagePteWithFix+0x184
09-18 v0.36.0-1 0.5.5 26200.9457 / 9444 616.92 ExpandLargePagePteWithFix+0x184
09-19 v0.36.0-1 0.5.5 26200.9457 / 9444 616.92 same offset as 09-18 (bugcheck address only)
09-24 v0.37.0-5 0.5.5 26200.9457 / 9444 616.92 ExpandLargePagePteWithFix+0x184

ComfyUI is the git checkout at the time of each crash; comfy-aimdo is the version that checkout's requirements.txt pins. The installed version matched the pin where startup logs show it: 0.4.15 on 08-29, and 0.5.5 on 09-19 and 09-21.

How the names were obtained, without a symbol download: the offsets come from parsing the triage minidumps, and were matched against the public-symbol stack earlier in this thread using the unwind table in the on-disk dxgmms2.sys. On 9444 the fault offset and all ten function start addresses implied by that stack land exactly on unwind-table entries, and the 09-18 and 09-24 kernel stacks contain its ten return addresses in the same order: VidMmWorkerThreadProc → ProcessDeferredCommand → PageInOneAllocation → … → CommitVirtualAddressRange → ExpandLargePagePte → ExpandLargePagePteWithFix. On 9278 the 09-13 fault is +0x184 of the same function, with the same instruction bytes, and its stack shows the same ten frames. The 09-07 address is consistent with +0x12 of the small function that ExpandLargePagePteWithFix calls just before +0x184, the same function and offset as crash #2 in the original report; that function has several callers, so for 09-07 the call path itself is not established.

The faulting pointer is NULL in all three parsed dumps

In the parsed dumps (09-13, 09-18, 09-24), the exception record shows a read of address 0x48 with rax = 0. The code around the fault:

call GetVidMmGlobalAllocFromOwner
lea  rcx, [r9+r12*8]
test rax, rax
je   ...
mov  rax, [rax]          ; first field of the returned object -> 0
mov  r8,  [rcx+8]
shl  r8,  0Ch
sub  r8,  [rax+48h]      ; faults: reads 0x48

So in each parsed dump the owner lookup returned a non-NULL pointer to readable memory whose first field was zero. That fits an allocation being torn down, or not yet fully set up, while VidMm's deferred page-in referenced it. Across this thread the reported faults fall on successive loads of that one pointer chain: GetVidMmGlobalAllocFromOwner+0xf and +0x12, then ExpandLargePagePteWithFix+0x179 (the mov rax,[rax] above), then +0x184. In the original report's +0xf crashes the pointer was unmapped rather than NULL. r8 and r13 hold 2 MB-aligned values in all three dumps, which fits a large-page entry being expanded.

What was happening in ComfyUI

The ComfyUI logs for the 09-18, 09-19 and 09-24 crashes all end on the same line:

Model MiniMaxH3 prepared for dynamic VRAM loading. 19995MB Staged. 208 patches attached. Force pre-loaded 210 weights: 1175 KB.

That line comes from ModelPatcherDynamic.load in comfy/model_patcher.py. Each time it was the start of a prompt that began 3–28 s after the previous one finished, straight after the 15 GB text encoder had been staged and run. The 09-18 and 09-24 dumps timestamp the bugcheck 7 s and 6 s after that line. ComfyUI only logs the progress bar when a run completes, so the log cannot show whether the first sampling step had started. A third-party node that patches the H3 blocks is active for most H3 stages here but was absent for the 09-19 and 09-24 crashes, so it is not required.

What changed in the regression window

DynamicVRAM was already on with comfy-aimdo 0.4.15 (launch log, 08-29), and dxgmms2.sys 9278 arrived on 08-28. The first dxgmms2 bugcheck came on 09-07, two days after ComfyUI moved from e80c1570b (pinning comfy-aimdo 0.4.15) to commits pinning 0.5.2. Between that checkout and the one at the first crash (fbed745c8):

  • #15861 Introduce Comfy Compiler: bumps comfy-aimdo 0.4.15 → 0.5.1, enables the aimdo malloc-graph compiler by default whenever dynamic VRAM is on, and wraps MiniMaxH3Model.forward in it (malloc_scope="block" per block)
  • #16108: comfy-aimdo 0.5.2
  • #16103: removes the MiniMax attention v.clone() workaround as no longer necessary, merged minutes after #15861
  • #16148: pauses the compiler for long-lived sparse allocations
  • #16133: comfy-kitchen 0.2.31 → 0.2.33 (#16180 later made the compiler tolerate its static-cache element replacement)

Outside ComfyUI, the NVIDIA driver went from 610.88 to 616.56 on 08-30, also inside the window. The crashes then continued across 616.56 and 616.92, and across dxgmms2.sys 9278 and 9444. There were also unexpected shutdowns with no bugcheck recorded, cause unknown: six between 07-10 and 08-22, one on 09-04 (on comfy-aimdo 0.4.15) and one on 09-05 (on 0.5.2).

On the comfy-aimdo side, v0.4.15...v0.5.2 is almost entirely the compiler: a new src/malloc-graph.c, plus src/vmm-ref.c and src/malloc-rogue.c. The only other code changes are small (pyt-cu-plug-alloc-async.c +39/−10, model-vbar.c +8/−2, and a few lines of plumbing).

What the compiler does that could matter on WDDM

From the comfy-aimdo source (the behaviour described is the same in v0.5.2 and v0.5.5):

  • It backs allocations with 8 MB cuMemCreate pages. When placing a new allocation it maps the first physical page that is not live, and that page can still be mapped at earlier virtual pages, so one physical allocation ends up mapped at several GPU virtual addresses at once. vmm-ref.c keeps a reference per mapping. Before 0.5.x, each comfy-aimdo allocation had a single mapping.
  • When a graph is over budget, create_page() first calls vbars_free(...), so building a graph can evict VBAR pages (cuMemUnmap + cuMemRelease of 32 MB pages, after a context synchronize).
  • malloc_graph_destroy() unmaps and releases every page, with no synchronization on its normal path. ComfyUI tears down the compiled graph at the end of every node that used it, so each prompt's first compiled forward builds a new one. In fbed745c8 that teardown ran in reset_cast_buffers() after its synchronize(); since #16180 it runs in cleanup_prefetch_queues(), which execution.py calls before reset_cast_buffers(). Crashes happened under both arrangements, which argues against a simple missing synchronize on the user-mode side.
  • unmap_workaround() is a no-op on Windows.

Hypothesis

By its name and position in the stack, CommitVirtualAddressRangesInList appears to walk the GPU virtual-address mappings of the allocation being paged in, and the fault reads the owner of one of those mappings with its first field zero. Physical allocations mapped at several virtual addresses, with mappings being created or torn down while a graph is built and VBAR pages are evicted, could feed that walk a mapping in an inconsistent state. The timing is compatible. In the two timestamped crashes the bugcheck came 6–7 s after staging, and at 09-24 the previous prompt's graph had been torn down about two minutes earlier. In those seconds ComfyUI would be building the new graph (mapping its pages, often onto physical pages already mapped elsewhere), evicting the text encoder's VBAR pages and faulting in the 20 GB model's pages, on a 12 GB card where VidMm is also paging.

What this does not show:

  • VBAR eviction predates 0.5.x.
  • The NVIDIA and comfy-kitchen changes above fall in the same window.
  • In the original report, crashes #3 and #4 hit at Lumina2 staging, which v0.35.0 does not run under the compiler (though LTXAV, which does, had run earlier in that session). So the compiler is at most one route.
  • Whether one CUDA physical allocation mapped at several addresses becomes several VidMm mappings is not known here.
  • Nothing here captures what comfy-aimdo was doing at the instant of the bugcheck.

The kernel fault itself is a dxgmms2 bug that user-mode code should not be able to trigger, so a comfy-aimdo mitigation and a Windows or driver fix are both relevant.

Frequency

Between the 09-19 and 09-24 crashes, the logs show 373 stages of the 20 GB model (4772 model stages of all kinds) over 115 hours of near-continuous queueing and 814 completed prompts. That was 54, 74, 77, 78 and 80 of the 20 GB stages per day, and 10 on 09-24 before the crash, with one ComfyUI restart mid-span. After the 09-19 crash the same H3 workflow, interleaved with image-model prompts, ran for almost five days before the next crash; the 09-18 and 09-19 crashes were six hours apart. These are small numbers, and no rate is claimed.

Between those two periods TdrDelay and TdrDdiDelay were raised to 60, at the same time as a clean NVIDIA driver reinstall, custom-node updates and a ComfyUI update. A crash still happened with all of that in place, and the faulting thread is VidMm's paging worker, not TDR recovery.

Suggested experiments (not run here)

  • --disable-comfy-compiler keeps dynamic VRAM and VBARs but turns off the malloc graph (and CUDA graphs). If the hypothesis is right, it should stop these bugchecks. Crashes here have come anywhere from six hours to about six days apart, so a clean run needs well over a thousand 20 GB stages to mean much.
  • --verbose DEBUG switches on comfy-aimdo's debug logging, which should show what it was doing just before the next bugcheck. It also runs comfy-aimdo's analysis after every node, which changes timing.
  • On the comfy-aimdo side, possible WDDM mitigations: a single mapping per physical page, reusing freed pages rather than cuMemRelease/cuMemCreate, or leaving the compiler off by default on Windows until the kernel side is fixed.

More can be pulled from the dumps (module list, stacks, bugcheck parameters, register state) on request.


Prepared by Claude Code from the minidumps, the dxgmms2.sys binaries, the ComfyUI and comfy-aimdo source and git history, Windows event and device-install logs, and ComfyUI logs on this machine.

Carasibana avatar Sep 24 '26 10:09 Carasibana

Same here! It happens randomly when generating minimax h3 movies. It happened twice today and twice yesterday.

PATATAJEC avatar Sep 26 '26 15:09 PATATAJEC

Two more data points from the same machine, and a correction to the hypothesis in the earlier comment from this machine: a live compiled graph is not required to reach this fault.

Crash on 09-26

  • 0x7E / 0xC0000005 at ExpandLargePagePteWithFix+0x179, the mov rax,[rax] that loads the pointer +0x184 reads through (the same spot as crash #3 in the original report)
  • Read of 0x1a80003: this time the owner lookup returned a non-NULL garbage value, rather than an object whose first field was zero
  • All ten dxgmms2 return addresses of the public-symbol stack earlier in this thread are on the stack, in the same order
  • dxgmms2.sys 9444, NVIDIA 616.92 and comfy-aimdo 0.5.5, as for the three crashes before it; ComfyUI v0.37.0-25. No drivers were added or changed since the 09-24 crash: every module loaded at 09-26 is in the 09-24 list with the same name, timestamp and size.
  • The last ComfyUI log line was the text encoder, not the 20 GB diffusion model:
Model MiniMaxH3TEModel_ prepared for dynamic VRAM loading. 14956MB Staged. 0 patches attached. Force pre-loaded 410 weights: 4572 KB.

The dump timestamps the bugcheck 7.8 s after that line.

09-19, now parsed

The 09-19 dump, listed in the earlier comment as bugcheck address only, shows the same thing as 09-13, 09-18 and 09-24: ExpandLargePagePteWithFix+0x184, a read of 0x48 with rax = 0, all ten frames, 3.8 s after the 20 GB stage line.

That makes five crashes with parsed dumps:

  • four at +0x184 with the object's first field NULL (the three with logs were during a 20 GB diffusion-model stage)
  • one at +0x179 with a garbage pointer, during a 15 GB text-encoder stage

For the four with logs, each bugcheck came 3.8–7.8 s after the stage line.

No compiled graph was live at the 09-26 crash

  • The text-encoder step does not use the malloc-graph compiler here: none of the 559 text-encoder stages logged from 09-19 to 09-26 is followed by compiler activity.
  • The previous prompt's compiled graph had been torn down 2 min 16 s before the bugcheck.

With no graph active, comfy-aimdo 0.5.5's allocator hooks and VBAR eviction run the same code as 0.4.15. Eviction skips its synchronize only while a graph is active and sync-paused, which ComfyUI does only around CUDA-graph capture. The graph and rogue checks have nothing to act on, and every compiled graph in that session reported 0 rogues.

So a live compiled graph is not required to reach this fault. Compiled graphs had run earlier in the same session, though, so a lasting after-effect of earlier compiler activity isn't ruled out. The same applies to the original report's Lumina2 crashes, where LTXAV (which does use the compiler) had run earlier. --disable-comfy-compiler remains the direct test.

What every crash here with a log (four of six) has in common is a dynamic-VRAM model swap on an oversubscribed 12 GB card, consistent with one large model's VBAR pages faulting in while another's are evicted.

The regression window can't be narrowed

No dxgmms2 bugcheck is recorded on this machine before 09-07. Between the last configuration without one and the first crash, three separate things changed:

Date Change Crashes since
08-28 Windows 26200.9168 → 26200.9278 (dxgmms2.sys 9278) on 9278 and 9444
08-30 NVIDIA 610.88 → 616.56 on 616.56 and 616.92
09-05 comfy-aimdo 0.4.15 → 0.5.x (malloc-graph compiler on by default) on 0.5.2 and 0.5.5
  • The ComfyUI update that brought comfy-aimdo 0.5.x also carried other changes, including #16103 and #16148.
  • The comfy-kitchen 0.2.33 bump in the same window mainly adds sparse-attention kernels, which these workflows don't appear to use.
  • The earlier comment from this machine named the NVIDIA and comfy-kitchen updates but treated the Windows 9278 update as predating the window; it falls inside it.

The unexpected shutdowns with no bugcheck mentioned in the earlier comment left no crash-dump record at all: at the following boots Windows logged no dump attempt, unlike after every bugcheck here. So they look like a lower-level reset rather than this fault, including the one on 09-04, which ran on Windows 9278, NVIDIA 616.56 and comfy-aimdo 0.4.15.

Windows 9278 and NVIDIA 616.56 each ran for six to eight days on comfy-aimdo 0.4.15 without a recorded bugcheck, and 610.88 ran for 13 days before that. But the workload in those stretches isn't known, and crashes here have come anywhere from six hours to six days apart. So the gaps can't separate the three changes: Windows and NVIDIA remain suspects alongside the ComfyUI and comfy-aimdo update.


Prepared by Claude Code from the minidumps, the dxgmms2.sys binary, ComfyUI and comfy-aimdo source and git history, Windows event and device-install logs, and ComfyUI logs on this machine.

Carasibana avatar Sep 26 '26 19:09 Carasibana

I'm also getting this BSOD, twice today, on a RTX 3060 12gb, while using Minimax H3 workflows. I'm on ComfyUI 0.37.0, aimdo 0.5.5, Windows 11 Pro 25H2. I'll try --disable-comfy-compiler and see if I get any more BSODs.

Update: I disabled the Comfy Compiler 3 days ago, and have had no BSOD since running heavy H3 workflows. So, there does seem to be a bug in that compiler.

Update: It's been almost 2 weeks now, and no BSOD. So disabling the compiler seems to have worked.

Jonseed avatar Sep 30 '26 19:09 Jonseed

Another data point, plus a proposed fix that keeps dynamic VRAM and the compiler enabled.

Setup: RTX 4090 Laptop 16 GB, NVIDIA 617.42, Windows 11 build 26300 (dxgmms2 10.0.26100.9974), ComfyUI 0.45, comfy-aimdo 0.6.0. The crash happened during a MiniMax H3 ControlNet video run. GPU has a raised power limit / clock offsets, but the same signature is in this thread on stock cards.

Crash: 0x7E / c0000005, AV_dxgmms2!GetVidMmGlobalAllocFromOwner+0x12, NULL read of the owner pointer. Stack is the same as above: VidMmWorkerThreadProc → ProcessDeferredCommand → PageInOneAllocation → CommitVirtualAddressRangesInList → … → VIDMM_PAGE_DIRECTORY::CommitVirtualAddressRange → ExpandLargePagePte → GetVidMmGlobalAllocFromOwner.

Before the BSOD, the same session had two Fault failed: 2 errors (comfy-aimdo#100). That is cuMemSetAccess returning the undocumented CUDA_ERROR_NOT_READY right after cuMemMap. At that point aimdo immediately unmaps and releases the brand-new allocation (three_stooges → fail_access, and the same in malloc-graph map_reference), possibly while WDDM is still paging it in. That is the "destroyed while VidMm pages it in" pattern in the dump. Separately, malloc_graph_destroy unmaps and releases its pages without synchronizing, while queued kernels or graph replays may still reference them. Every other eviction path in model-vbar.c syncs first.

Cost of the current workarounds on this 16 GB card (H3-Image T2I with the Qwen3.5 prompt enhancer):

Launch flags Time
default 82 s
--disable-comfy-compiler --disable-cuda-malloc 391 s
--disable-dynamic-vram > 25 min

The prompt-enhancer LLM drops from about 61 tok/s to about 15 tok/s, so these flags aren't practical here.

Proposed fix: Comfy-Org/comfy-aimdo#134 (draft). It waits out NOT_READY with backoff instead of tearing the mapping down (a superset of #127), and adds a cuCtxSynchronize() before malloc-graph teardown. The normal path is unchanged apart from one sync per graph teardown. I'm running a before/after soak on Windows (H3 video + H3-Image, with a second process forcing WDDM paging) and will post the results on the PR. Happy to share the minidump with maintainers privately.

Elvis-Luo avatar Nov 17 '26 04:11 Elvis-Luo