Dynamic VRAM streaming crashes all generations with HostBuffer.read_file_slice failed → CUDA OOM (regression after Aug 3 2026 update) (CORE-398)
Mod Note:
This is a Cuda error and has been reported to NVIDIA
To workaround, please start comfy with --cuda-device 0 (or a higher number) to restrict comfy to a single GPU or use --disable-pinned-memory for multi GPU functionality
Please start from https://github.com/Comfy-Org/ComfyUI/issues/15255#issuecomment-5202173878 for the latest.
original report
Custom Node Testing
- [ ] I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Expected Behavior
Dynamic VRAM streaming should work as it did prior to today's update, or fail gracefully without crashing the whole queue.
Actual Behavior
Environment:
ComfyUI version: 0.30.1 comfy-aimdo version: 0.4.11 comfy-kitchen version: 0.2.26 PyTorch: 2.10.0+cu130 OS: Windows (ComfyUI Desktop) GPUs: RTX 5060 Ti (16GB, primary) + RTX 3060 (12GB, secondary) Driver: NVIDIA 610.88, CUDA UMD 13.3
Summary: After updating ComfyUI Desktop today (Aug 3, 2026), every generation — regardless of model (tested with Krea 2) — fails immediately during sampling with a host buffer read failure that cascades into a CUDA OOM error. This worked correctly before today's update.
Steps to reproduce:
Launch ComfyUI Desktop (dynamic VRAM enabled by default — log shows DynamicVRAM support detected and enabled) Run any generation (tested: Krea 2 text-to-image) Sampler starts, model loads and stages into VRAM normally Crashes ~immediately with: [ERROR] !!! Exception during processing !!! CUDA error: out of memory ... File "...\comfy\ops.py", line 228, in cast_modules_with_vbar handle_pin(s, pin, xfer_source, xfer_dest, subset=subset, size=dest_size) ... File "...\comfy_aimdo\host_buffer.py", line 109, in read_file_slice raise RuntimeError("HostBuffer.read_file_slice failed") RuntimeError: HostBuffer.read_file_slice failed
During handling of the above exception, another exception occurred: ... File "...\comfy\model_management.py", line 2005, in synchronize torch.cuda.synchronize() torch.AcceleratorError: CUDA error: out of memory
Notes:
nvidia-smi confirms this is not a real memory shortage — GPU 0 shows only ~2GB used out of 16.3GB before launch, 14+ GB free. The crash is not model-size dependent — small and large models both fail identically. Workaround confirmed: launching with --disable-dynamic-vram fixes it completely; all generations succeed normally with this flag. This strongly points to a regression in comfy-aimdo's host-buffer/dynamic-VRAM-streaming layer introduced in today's update, since disabling that specific subsystem resolves the issue entirely.
Steps to Reproduce
Image generation in official Comfyui Krea2 turbo / z-image turbo workflows
Debug Logs
File "D:\ComfyUI\standalone-env\Lib\threading.py", line 995, in run
self._target(*self._args, **self._kwargs)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\main.py", line 372, in prompt_worker
e.execute(item[2], prompt_id, extra_data, item[4])
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 728, in execute
asyncio.run(self.execute_async(prompt, prompt_id, extra_data, execute_outputs))
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\standalone-env\Lib\asyncio\runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "D:\ComfyUI\standalone-env\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "D:\ComfyUI\standalone-env\Lib\asyncio\base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "D:\ComfyUI\ComfyUI\execution.py", line 789, in execute_async
result, error, ex = await execute(self.server, dynamic_prompt, self.caches, node_id, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes, ui_node_outputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\execution.py", line 645, in execute
comfy.model_management.unload_all_models()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "D:\ComfyUI\ComfyUI\comfy\model_management.py", line 2027, in unload_all_models
free_memory(1e30, device)
~~~~~~~~~~~^^^^^^^^^^^^^^
File "D:\ComfyUI\ComfyUI\comfy\model_management.py", line 875, in free_memory
memory_to_free = 0 if device is None else memory_required - get_free_memory(device)
~~~~~~~~~~~~~~~^^^^^^^^
File "D:\ComfyUI\ComfyUI\comfy\model_management.py", line 1747, in get_free_memory
mem_free_cuda, _ = torch.cuda.mem_get_info(dev)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^
File "D:\ComfyUI\ComfyUI\.venv\Lib\site-packages\torch\cuda\memory.py", line 897, in mem_get_info
return torch.cuda.cudart().cudaMemGetInfo(device)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^
torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
[INFO] FETCH ComfyRegistry Data [DONE]
[INFO] [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
FETCH DATA from: D:\ComfyUI\ComfyUI\user\__manager\cache\1514988643_custom-node-list.json [DONE]
[INFO] [ComfyUI-Manager] All startup tasks have been completed.
Other
No response
Comfy-Org/ComfyUI#14215 - Avoid ROCm Conv3d crash in Qwen35 vision patch embedding by using equivalent linear projection [open]
Comfy-Org/ComfyUI#15215 - comfy-aimdo 0.4.11 [merged]
Comfy-Org/ComfyUI#15299 - Fix OOM_EXCEPTION fallback and guard mem_get_info in get_free_memory (⚠️ Possible Duplicate Issue(s)
🔗 Related PRs
#15255) [open]
Comfy-Org/ComfyUI#15348 - fix: Graceful fallback for dynamic VRAM init failures (closes #15255) [open]
Comfy-Org/ComfyUI#15349 - Add MiniMax H3 RTX 3060 Turbo profile [closed]
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your .coderabbit.yaml:
issue_enrichment:
auto_enrich:
enabled: false
💬 Have feedback or questions? Drop into our discord!
i get this too, on any workflow with v30.1,disabling dynamic vram or pinned memory gets it to work now.
Same. Had do downgrade to 0.29.2.
The same error. I did ZImage generations ok until this update. Now RAM consumption has become colossal! It goes over 80% and then gives me that error. I have 24GB RAM and 16GB VRAM. As SirWidebottom said
disabling dynamic vram or pinned memory gets it to work now.
It helped. (RAM consumption is 37%, btw)
I am experiencing what appears to be the exact same issue, but specifically with Z-Image-Turbo on ComfyUI v0.30.0. The first generation always succeeds without any issues, but the second generation gets stuck indefinitely at the KSampler stage — it never completes, and the process hangs. Real-time VRAM monitoring shows persistently high VRAM usage after the first generation, which never gets released properly. Downgrading ComfyUI from v0.30.0 to v0.29.0 completely resolves the issue; both generations work flawlessly after the downgrade. My hardware is an RTX 4080 with 16GB VRAM and 64GB system RAM. I have reproduced this multiple times with a completely clean v0.30.0 ComfyUI environment, running only Z-Image-Turbo with no other custom nodes or models loaded, and the issue persists every single time on the second generation. nvidia-smi shows plenty of free VRAM (around 14+ GB available), yet the sampler still gets stuck, which strongly suggests that the DynamicVRAM / comfy-aimdo 0.4.11 memory management regression is the root cause — exactly as described in this issue. Thank you for your work on this.
我遇到了几乎完全相同的问题,不过是在 Z-Image-Turbo 模型上,环境是 ComfyUI v0.30.0。第一张图总是能正常生成,但第二张图会无限卡在 KSampler 阶段,进度无法继续,整个流程卡死。实时显存监控显示,第一张图生成后显存占用一直居高不下,没有被正确释放。将 ComfyUI 从 v0.30.0 降级到 v0.29.0 后问题完全消失,两张图都能正常生成。我的硬件是 RTX 4080 16GB 显存和 64GB 系统内存。我在完全干净的 v0.30.0 ComfyUI 环境中多次复现了这个问题,仅加载 Z-Image-Turbo,没有任何其他自定义节点或模型,每次都在第二张图生成时卡住。nvidia-smi 显示显存仍有大量空闲(约 14GB 以上可用),但采样器仍然卡死,这强烈表明 DynamicVRAM / comfy-aimdo 0.4.11 的内存管理回归问题是根本原因,与本 issue 的描述完全一致。感谢开发者的辛勤工作。
After updating to 0.30.1 have the same troubles with LTX and Minimax render. Infinite OOM. Z-Image works well.
The same error. I did ZImage generations ok until this update. Now RAM consumption has become colossal! It goes over 80% and then gives me that error. I have 24GB RAM and 16GB VRAM. As SirWidebottom said
disabling dynamic vram or pinned memory gets it to work now.
It helped. (RAM consumption is 37%, btw)
Paste of our new RAM usage strategy - this is unlikely related to your crash:
TLDR: RAM management in comfy 0.30.0 has changed and uses more RAM than before to avoid loads from disks. If this is slower for you, start comfy with --fast-disk to change back to a lower RAM, but more disk intensive loading strategy. This is generally better for high speed NVME users.
In comfy 0.23.0 RAM management was changed to facilitate faster loads of models from disks and to unlock async offload to fast NVME disks. However some users, particularly with slower disks noticed performance issues with the new strategy and certain configurations would load models from disk when they previously wouldn't. In version 0.30 a new algorithm for balancing RAM allocation across models and workflows is implement to increase Comfys claim over the system RAM while also minimize RAM churn and disk reload for common usage patterns. To do this comfy now allocates and commits to as much RAM usage as it can get away with based on measured system RAM availability. It will still dynamically avoid swap/pagefile use as much as possible. This algorithm can be slightly slower for users with very fast disks due to extra RAM traffic or can put more pressure on system ram in general. --fast-disk can be added to the comfy startup args to prefer some extra disk loading over a lot of RAM allocation and traffic.
The performance improvement for users with slow disks is significantly larger than the performance loss for high speed disk usage which is why we are making this the new default mode.
Some users also have a fast C: and slow model disk. In this case the use of the pagefile/swap to buffer models can be an advantage over optimized original disk load. So if this is you, start comfy with --high-ram to fully avoid comfys anti-pagefile logic.
We are investigating options to auto-detect these variables and choose the best fit automatically in a future comfy release.
Does --fask-disk solve it for people?
Does --fask-disk solve it for people?
@rattus128 for me, --fast disk worked, so did disabling dynamic vram or pinned memory. High vram got an OOM error.
Ok @SirWidebottom and everyone else, are you able to help me out and put it back in the bad state and install this comfy-aimdo version? https://github.com/Comfy-Org/comfy-aimdo/actions/runs/30872550472. Download the wheel for your platform and pip install it.
It adds extra information that helps us distinguish possible root causes. We are having trouble reproducing this issue so the increased information will bring us closer to the variable that matters and a fix.
I will merge that to comfy-aimdo 0.4.12 anyway, but its immediately testable for those with this problem. Please paste the whole crash log from the first error. If in doubt, paste everything from "got prompt".
Please include your system information. If in doubt, paste entire comfy startup log.
@rattus128 here is the error after i installed the comfy-aimdo wheel ComfyError.txt
@rattus128 Ran the 0.4.12.dev3 wheel. New ERROR line plus a controlled A/B that isolates the
trigger to the second GPU being visible. Your question on #14250 — "do you have a second GPU
installed by any chance?" — looks right.
Diagnostic line
0%| | 0/20 [00:00<?, ?it/s, Model Initializing ... ]
aimdo: src/hostbuf.c:283:ALL:hostbuf_read_file_slice: device copy failed result=2 device_ptr=0000001A7786C000 device=0 stream=0000017A154D1CA0 size=67108864
0%| | 0/20 [00:03<?, ?it/s, Model Initializing ... ]
[ERROR] !!! Exception during processing !!! CUDA error: out of memory
Device copy, result=2 (cudaErrorMemoryAllocation), first block of the first sampler step.
On a smaller workflow the same failure occurs on a 19 MiB transfer:
aimdo: src/hostbuf.c:283:ALL:hostbuf_read_file_slice: device copy failed result=2 device_ptr=000000137F86C000 device=0 stream=000001D6D4F95EA0 size=19922944
A 19 MiB host→device copy failing on a 16 GB card while torch holds 1,248 MiB reserved.
The A/B
Tightest pair — 10 minutes apart, same workflow (euler, latent
[(1,24,37,22,38),(1,32,2,207)]), same machine state, nothing else touched:
| 11:24:49 | 11:34:39 | |
|---|---|---|
| 2nd GPU | visible (cuda:0 5080 + cuda:1 3060) |
hidden (cuda:0 only, via --cuda-device <5080 UUID>) |
| Result | crash, result=2, 19 MiB |
success, 20/20 in 48s |
Supporting pair on a larger workflow (res_multistep, latent [(1,24,37,30,54),…]), with host
commit measured before launch:
| 2nd GPU | Commit at launch | Result |
|---|---|---|
| hidden | 25,427 / 69,530 MB | success, 20/20 in 154s |
| visible | 22,468 / 98,202 MB — 75.7 GB free | crash, 64 MiB |
That crash was after a clean reboot with a fixed 32 GB pagefile; pagefile peak across the whole run was 42 MB. No host-memory pressure of any kind.
Honest note on that first pair: the crash ran aimdo 0.4.12.dev3 and the success 0.4.11,
because my debug launcher and normal launcher differ. That is covered separately — a run on
0.4.11 with the 3060 visible also crashed, so within 0.4.11 alone it is visible → crash,
hidden → success (twice). The failure reproduces on both aimdo versions.
Torch's allocator never sees pressure in any crash: CUDA OOMs: 0, cudaMalloc retries: 0, peak
1,104–2,169 MiB reserved on a 16 GB card.
Ruled out
- Host RAM / commit pressure — 75.7 GB free commit, pagefile peak 42 MB. I chased this first; my earlier "every crash at 95%+ commit" readings were taken after each crash, when the dead-but-resident ComfyUI process still held ~31 GB. Enlarging the pagefile from 4 GB to a fixed 32 GB changed nothing.
- Workload size — fails at 19 MiB and 64 MiB, and at half the latent volume.
- Sampler — reproduced with
eulerandres_multistep. - Attention backend — crashes identically with and without KJNodes' Patch Sage Attention
(controlled pair, same workflow). Expected: the crash is in
prefetch_queue_popfor block 0, before any attention executes. - ComfyUI version —
v0.30.0-1-g14b05228andv0.30.0-4-g9a9fdb10(latter includese377e263and16e3f303). - aimdo version — 0.4.11 and 0.4.12.dev3.
- Custom nodes — reproduced with and without KJNodes / SolAttn loaded.
- A recent update — no ComfyUI update occurred in the window where it started failing (verified via reflog; last pull was that morning).
Possible lead on the device index
device=0 comes from destination2.device.index in comfy/memory_management.py:74 — a torch
index. On this box torch and NVML disagree about which GPU that is:
# torch / CUDA runtime (CUDA_DEVICE_ORDER unset -> FASTEST_FIRST)
[INFO] Device: cuda:0 NVIDIA GeForce RTX 5080
[INFO] Device: cuda:1 NVIDIA GeForce RTX 3060
# nvidia-smi (PCI_BUS_ID order) -- inverted
0, NVIDIA GeForce RTX 3060, 00000000:0B:00.0
1, NVIDIA GeForce RTX 5080, 00000000:0C:00.0
device=0 is the 5080 to torch and the 3060 to NVML. If anything on the aimdo side resolves that
integer through NVML or a DXGI/WDDM adapter table rather than the CUDA runtime ordering, it lands on
the wrong GPU. I can't tell which from outside.
Possibly relevant asymmetry: my displays are on the 3060; the 5080 is headless.
index, name, memory.used, display_active, driver_model
0, NVIDIA GeForce RTX 3060, 1660 MiB, Enabled, WDDM
1, NVIDIA GeForce RTX 5080, 10520 MiB, Disabled, WDDM
aimdo enumerates in torch order (5080 first), the opposite of NVML's:
aimdo: src-win/shmem-detect.c:80:INFO:comfy-aimdo WDDM adapter match: NVIDIA GeForce RTX 5080 runtime_luid=00000000:00017141 dxgi_luid=00000000:00017141
aimdo: src/control.c:277:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 5080 (VRAM: 16302 MB)
aimdo: src-win/shmem-detect.c:80:INFO:comfy-aimdo WDDM adapter match: NVIDIA GeForce RTX 3060 runtime_luid=00000000:000134b1 dxgi_luid=00000000:000134b1
aimdo: src/control.c:277:INFO:comfy-aimdo inited for GPU: NVIDIA GeForce RTX 3060 (VRAM: 8191 MB)
Happy to run any further instrumented build — logging which adapter or context the copy actually targets would settle it.
One thing I can't explain
This exact workflow (euler, 0.2 MP) ran fine 24 times on Aug 3 with both GPUs visible — always launched the same way, no device restriction — then began failing that evening and has failed every time since with the 3060 visible (6/6), while succeeding every time with it hidden (17/17). No code change in that window. So there may be a latent state or ordering dependency rather than a hard deterministic fault — worth knowing if you try to reproduce and it works first time.
Note: this thread may hold two different problems
Several reporters here are single-GPU and describe RAM climbing to 80%+ before the error, which matches the 0.30.0 RAM strategy you described rather than this. Mine is not that — 75.7 GB of free commit and a 42 MB pagefile peak. Might be worth splitting so the multi-GPU signal isn't lost.
Separately: e377e263 skips Windows
The swap-aware pinning clamp is on the non-Windows branch only; Windows keeps a flat ram * 0.40.
A small or system-managed pagefile is the exact Windows analogue of a swapless Linux box — commit
limit = RAM + pagefile, and pinned memory is non-pageable and charges commit.
GlobalMemoryStatusEx's ullTotalPageFile gives the commit limit directly, so the same clamp is
expressible there. Not the cause of my crash, but it looks like the same class of bug and may be
what some of the single-GPU reporters above are hitting.
System
ComfyUI : v0.30.0-4-g9a9fdb10 (also reproduced on v0.30.0-1-g14b05228)
comfy-aimdo : 0.4.12.dev3 and 0.4.11
comfy-kitchen : 0.2.26
torch : 2.13.0+cu132
Python : 3.13.12, Windows 11 Pro 26200
GPUs : RTX 5080 16GB (cuda:0, headless) + RTX 3060 8GB (cuda:1, displays), driver 610.88
RAM : 65,434 MB, fixed 32 GB pagefile (crash reproduces regardless)
Models : minimax_h3_ref2va_pruned_int8_convrot 21 GB
qwen3vl_32b_minimax_h3_nvfp4_awq TE 15.7 GB
minimax_h3_video_vae_fp16 5.2 GB
-> "Staged" 19,995 + 14,956 + 4,965 MB
Process note: after this crash the prompt_worker thread dies but the process stays alive holding
~31 GB. Users who retry without restarting will see every subsequent prompt fail, which is probably
why this reads as "all generations broken" once it starts.
Full log
Complete run log (DEBUG level, ANSI stripped) from the 64 MiB crash: https://gist.github.com/akashzeno/b1bdbf2650273e84ef1ecd0aa4d55fcc
The aimdo: lines are written to stderr by the native layer and don't go through Python logging, so
they aren't in that file — the ones that matter are quoted at the top. Happy to capture stderr to a
file if that's more useful.
My log
ComfyUIError.txt If it helps, I have Windows 10 pro 64bit, Ryzen 5 5600, RTX 5060 Ti 16GB VRAM, 24GB RAM (8GB+16GB) Btw, your --fast-disk also works (as did --disable-pinned-memory)
For what it's worth, I tried downgrading both Comfy-Kitchen and Comfy-Aimdo to the versions used in 0.29.2 and that didn't change anything.
Ok getting warmer, @Pombaroom @akashzeno (and anyone else) can you try with just --disable-cuda-malloc and let me know? Can I also get your cuda versions?
For transparency, that error 2 is not a documented error from the API in question (cuMemCpyH2DAsync) which leads to the theory of deferred async errors. The most suspicious thing is obviously the cuda async memory allocator however that is also documented as synchronous WRT to OOM accounting (despite the actual actioning of allocation being async if that makes sense) but worth a shot. I actually had a report of this a while back that was never resolvable as there is no documented way to produce this with the only unique variable being the user was on cuda13.2 only days after release.
The majority of memory allocation APIs after that are synchronous and already guarded for discard.
can you try with just --disable-cuda-malloc and let me know? Can I also get your cuda versions?
pytorch version: 2.13.0+cu132 Still the error:
I also can't run Minimax H3, Sometimes I get that error:
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
[INFO] Requested to load MiniMaxH3TEModel_
[INFO] Model MiniMaxH3TEModel_ prepared for dynamic VRAM loading. 25882MB Staged. 0 patches attached. Force pre-loaded 310 weights: 1272 KB.
Fatal Python error: Aborted
Stack (most recent call first):
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 581 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 614 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 782 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen3vl.py", line 100 in forward
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 96 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 279 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 306 in encode
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 45 in encode_token_weights
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 110 in encode_token_weights
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 743 in encode_token_weights
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 405 in encode_from_tokens
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 336 in encode_from_tokens_scheduled
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_minimax_h3.py", line 142 in execute
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\latest\_io.py", line 1935 in EXECUTE_NORMALIZED
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\internal\__init__.py", line 149 in wrapped_func
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 306 in process_inputs
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 318 in _async_map_node_over_list
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 344 in get_output_data
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 545 in execute
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 789 in execute_async
File "asyncio\events.py", line 88 in _run
File "asyncio\base_events.py", line 1999 in _run_once
File "asyncio\base_events.py", line 645 in run_forever
File "asyncio\windows_events.py", line 322 in run_forever
File "asyncio\base_events.py", line 678 in run_until_complete
File "asyncio\runners.py", line 118 in run
File "asyncio\runners.py", line 195 in run
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 728 in execute
File "D:\ComfyUI_windows_portable\ComfyUI\main.py", line 372 in prompt_worker
File "threading.py", line 1012 in run
File "threading.py", line 1075 in _bootstrap_inner
File "threading.py", line 1032 in _bootstrap
Extension modules: sqlalchemy.cyextension.collections, sqlalchemy.cyextension.immutabledict, sqlalchemy.cyextension.processors, sqlalchemy.cyextension.resultproxy, sqlalchemy.cyextension.util, greenlet._greenlet, markupsafe._speedups, yaml._yaml, PIL._imaging, multidict._multidict, yarl._quoting_c, propcache._helpers_c, _brotli, aiohttp._http_writer, aiohttp._http_parser, aiohttp._websocket.mask, aiohttp._websocket.reader_c, frozenlist._frozenlist, zstandard.backend_c, charset_normalizer.md, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, torch._C, torch._C._dynamo.autograd_compiler, torch._C._dynamo.eval_frame, torch._C._dynamo.guards, torch._C._dynamo.utils, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, psutil._psutil_windows, PIL._imagingft, scipy._lib._ccallback_c, scipy.ndimage._nd_image, scipy.ndimage._rank_filter_1d, scipy.special._ufuncs_cxx, scipy.special._ellip_harm_2, scipy.special._special_ufuncs, scipy.special._gufuncs, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, scipy.linalg._fblas, scipy.linalg._flapack, _cyutility, scipy._cyutility, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_schur_sqrtm, scipy.linalg._matfuncs_expm, scipy.linalg._linalg_pythran, scipy.linalg.cython_blas, scipy.linalg._decomp_update, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, _ni_label, scipy.ndimage._ni_label, av._core, av.logging, av.bytesource, av.buffer, av.audio.format, av.error, av.dictionary, av.container.pyio, av.option, av.descriptor, av.format, av.utils, av.stream, av.container.streams, av.sidedata.motionvectors, av.sidedata.sidedata, av.opaque, av.packet, av.container.input, av.container.output, av.container.core, av.codec.context, av.video.format, av.video.reformatter, av.plane, av.video.plane, av.video.frame, av.video.stream, av.codec.hwaccel, av.codec.codec, av.frame, av.audio.layout, av.audio.plane, av.audio.frame, av.audio.stream, av.filter.link, av.filter.context, av.filter.graph, av.filter.filter, av.filter.loudnorm, av.audio.resampler, av.audio.codeccontext, av.audio.fifo, av.bitstream, av.video.codeccontext, regex._regex, scipy.integrate._odepack, scipy.integrate._quadpack, scipy.integrate._vode, scipy.integrate._dop, scipy.integrate._lsoda, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.linalg._propack._spropack, scipy.sparse.linalg._propack._dpropack, scipy.sparse.linalg._propack._cpropack, scipy.sparse.linalg._propack._zpropack, scipy.optimize._group_columns, scipy._lib.messagestream, scipy.optimize._trlib._trlib, scipy.optimize._lbfgsb, _moduleTNC, scipy.optimize._moduleTNC, scipy.optimize._slsqplib, scipy.optimize._minpack, scipy.optimize._lsq.givens_elimination, scipy.optimize._zeros, scipy._lib._uarray._uarray, scipy.linalg._decomp_interpolative, scipy.optimize._bglu_dense, scipy.optimize._lsap, scipy.spatial._ckdtree, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._hausdorff, scipy.spatial._distance_wrap, scipy.spatial.transform._rotation, scipy.spatial.transform._rigid_transform, scipy.optimize._direct, scipy.interpolate._fitpack, scipy.interpolate._dfitpack, scipy.interpolate._dierckx, scipy.interpolate._ppoly, scipy.interpolate._interpnd, scipy.interpolate._rbfinterp_pythran, scipy.interpolate._rgi_cython, scipy.special.cython_special, scipy.stats._stats, scipy.stats._biasedurn, scipy.stats._stats_pythran, scipy.stats._levy_stable.levyst, scipy.stats._ansari_swilk_statistics, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.stats._sobol, scipy.stats._qmc_cy, scipy.stats._rcont.rcont, scipy.stats._qmvnt_cy, av.subtitles.stream, scipy.signal._sigtools, scipy.signal._max_len_seq_inner, scipy.signal._upfirdn_apply, scipy.signal._spline, scipy.signal._sosfilt, scipy.signal._peak_finding_utils, cupy_backends.cuda._softlink, cupy_backends.cuda.api._runtime_enum, cupy_backends.cuda.api.runtime, cupy._util, cupy.cuda.device, cupy.cuda.memory_hook, cupy_backends.cuda.stream, cupy.cuda.graph, cupy.cuda.stream, cupy_backends.cuda.api._driver_enum, cupy_backends.cuda.api.driver, cupy.cuda.memory, cupy._core.internal, cupy._core._carray, cupy._core._dtype, cupy._core._scalar, cupy.cuda.texture, cupy.cuda.function, cupy_backends.cuda.libs.nvrtc, cupy.cuda.pinned_memory, cupy.cuda.common, cupy.cuda.cub, cupy_backends.cuda.libs.nvtx, cupy.cuda.thrust, cupy._core._accelerator, cupy._core._memory_range, cupy._core._fusion_thread_local, cupy._core._kernel, cupy._core._routines_manipulation, cupy._core._routines_binary, cupy._core._optimize_config, cupy._core._cub_reduction, cupy._core._reduction, cupy._core._routines_math, cupy._core._routines_indexing, cupy._core._routines_linalg, cupy._core._routines_logic, cupy._core._routines_sorting, cupy._core._routines_statistics, cupy._core.dlpack, cupy._core.flags, cupy._core.core, cupy._core._fusion_variable, cupy._core._fusion_trace, cupy._core._fusion_kernel, cupy._core.new_fusion, cupy._core.fusion, cupy._core.raw, cupy.fft._cache, cupy.fft._callback, cupy.random._generator_api, cupy.random._bit_generator, cupy.lib._polynomial, sentencepiece._sentencepiece, _cffi_backend, sklearn.__check_build._check_build, pandas._libs.tslibs.ccalendar, pandas._libs.tslibs.np_datetime, pandas._libs.tslibs.dtypes, pandas._libs.tslibs.base, pandas._libs.tslibs.nattype, pandas._libs.tslibs.timezones, pandas._libs.tslibs.fields, pandas._libs.tslibs.timedeltas, pandas._libs.tslibs.tzconversion, pandas._libs.tslibs.timestamps, pandas._libs.properties, pandas._libs.tslibs.offsets, pandas._libs.tslibs.strptime, pandas._libs.tslibs.parsing, pandas._libs.tslibs.conversion, pandas._libs.tslibs.period, pandas._libs.tslibs.vectorized, pandas._libs.ops_dispatch, pandas._libs.missing, pandas._libs.hashtable, pandas._libs.algos, pandas._libs.interval, pandas._libs.lib, pandas._libs.ops, pandas._libs.hashing, pandas._libs.arrays, pandas._libs.tslib, pandas._libs.sparse, pandas._libs.internals, pandas._libs.indexing, pandas._libs.index, pandas._libs.writers, pandas._libs.join, pandas._libs.window.aggregations, pandas._libs.window.indexers, pandas._libs.reshape, pandas._libs.groupby, pandas._libs.json, pandas._libs.parsers, pandas._libs.testing, sklearn._cyutility, sklearn.utils._isfinite, sklearn.utils.sparsefuncs_fast, sklearn.utils.murmurhash, sklearn.utils._openmp_helpers, sklearn.metrics.cluster._expected_mutual_info_fast, sklearn.preprocessing._csr_polynomial_expansion, sklearn.preprocessing._target_encoder_fast, sklearn.metrics._dist_metrics, sklearn.metrics._pairwise_distances_reduction._datasets_pair, sklearn.utils._cython_blas, sklearn.metrics._pairwise_distances_reduction._base, sklearn.metrics._pairwise_distances_reduction._middle_term_computer, sklearn.utils._heap, sklearn.utils._sorting, sklearn.metrics._pairwise_distances_reduction._argkmin, sklearn.metrics._pairwise_distances_reduction._argkmin_classmode, sklearn.utils._vector_sentinel, sklearn.metrics._pairwise_distances_reduction._radius_neighbors, sklearn.metrics._pairwise_distances_reduction._radius_neighbors_classmode, sklearn.metrics._pairwise_fast, _win32sysloader, win32api, win32com.shell.shell, sklearn.utils._fast_dict, sklearn.cluster._hierarchical_fast, sklearn.cluster._k_means_common, sklearn.cluster._k_means_elkan, sklearn.cluster._k_means_lloyd, sklearn.cluster._k_means_minibatch, sklearn.neighbors._partition_nodes, sklearn.neighbors._ball_tree, sklearn.neighbors._kd_tree, sklearn.utils.arrayfuncs, sklearn.utils._random, sklearn.utils._seq_dataset, sklearn.linear_model._cd_fast, _loss, sklearn._loss._loss, sklearn.svm._liblinear, sklearn.svm._libsvm, sklearn.svm._libsvm_sparse, sklearn.linear_model._sag_fast, sklearn.utils._weight_vector, sklearn.linear_model._sgd_fast, sklearn.decomposition._online_lda_fast, sklearn.decomposition._cdnmf_fast, sklearn.cluster._dbscan_inner, sklearn.cluster._hdbscan._tree, sklearn.cluster._hdbscan._linkage, sklearn.cluster._hdbscan._reachability, sklearn._isotonic, sklearn.tree._utils, sklearn.tree._tree, sklearn.tree._partitioner, sklearn.tree._splitter, sklearn.tree._criterion, sklearn.neighbors._quad_tree, sklearn.manifold._barnes_hut_tsne, sklearn.manifold._utils, google._upb._message, grpc._cython.cygrpc, pywt._extensions._dwt, pywt._extensions._cwt, pywt._extensions._pywt, pywt._extensions._swt, kiwisolver._cext, numba.core.typeconv._typeconv, numba._helperlib, numba._dynfunc, numba._dispatcher, numba.core.runtime._nrt_python, numba.np.ufunc._internal, numba.experimental.jitclass._box, PIL._imagingmath, PIL._avif, PIL._webp (total: 355)
And sometimes I get that one:
[ERROR] !!! Exception during processing !!! CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
[ERROR] Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\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 "D:\ComfyUI_windows_portable\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 "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 318, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 306, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\latest\_io.py", line 1935, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_minimax_h3.py", line 142, in execute
cond = clip.encode_from_tokens_scheduled(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 336, in encode_from_tokens_scheduled
pooled_dict = self.encode_from_tokens(tokens, return_pooled=return_pooled, return_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 405, in encode_from_tokens
o = self.cond_stage_model.encode_token_weights(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 743, in encode_token_weights
out = getattr(self, self.clip).encode_token_weights(token_weight_pairs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 110, in encode_token_weights
out = super().encode_token_weights(token_weight_pairs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 45, in encode_token_weights
o = self.encode(to_encode)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 306, in encode
return self(tokens)
^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 279, in forward
outputs = self.transformer(None, attention_mask_model, embeds=embeds, num_tokens=num_tokens, intermediate_output=intermediate_output, final_layer_norm_intermediate=self.layer_norm_hidden_state, dtype=torch.float32, embeds_info=embeds_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 96, in forward
return super().forward(input_ids, attention_mask=attention_mask, embeds=embeds,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen3vl.py", line 100, in forward
return self.model(
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 782, in forward
x, current_kv = layer(
^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 614, in forward
x = self.mlp(x)
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 581, in forward
return self.down_proj(self.activation(self.gate_proj(x)) * self.up_proj(x))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 1407, in forward
output = self.forward_comfy_cast_weights(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 1337, in forward_comfy_cast_weights
weight, bias, offload_stream = cast_bias_weight(
^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 371, in cast_bias_weight
offload_stream = cast_modules_with_vbar([s], dtype, device, bias_dtype, non_blocking)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 230, in cast_modules_with_vbar
handle_pin(s, pin, xfer_source, xfer_dest, subset=subset, size=dest_size)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 228, in handle_pin
cast_maybe_lowvram_patch(source, pin, offload_stream, xfer_dest2=dest)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 219, in cast_maybe_lowvram_patch
comfy.model_management.cast_to_gathered(xfer_source, xfer_dest, non_blocking=non_blocking, stream=stream, r2=xfer_dest2)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1500, in cast_to_gathered
if comfy.memory_management.read_tensor_file_slice_into(tensor, dest_view, stream=stream, destination2=dest2_view):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\memory_management.py", line 21, in read_tensor_file_slice_into
if not read_tensor_file_slice_into(tensor._qdata,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\memory_management.py", line 70, in read_tensor_file_slice_into
hostbuf.read_file_slice(file_obj, info.offset, info.size,
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\comfy_aimdo\host_buffer.py", line 109, in read_file_slice
raise RuntimeError("HostBuffer.read_file_slice failed")
RuntimeError: HostBuffer.read_file_slice failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 550, in execute
comfy.model_management.reset_cast_buffers()
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1413, in reset_cast_buffers
offload_stream.synchronize()
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\streams.py", line 106, in synchronize
super().synchronize()
torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
[INFO] Memory summary:
|===========================================================================|
| PyTorch CUDA memory summary, device ID 0 |
|---------------------------------------------------------------------------|
| CUDA OOMs: 0 | cudaMalloc retries: 0 |
|===========================================================================|
| Metric | Cur Usage | Peak Usage | Tot Alloc | Tot Freed |
|---------------------------------------------------------------------------|
| Allocated memory | 141284 KiB | 1137 MiB | 0 B | 0 B |
| from large pool | 0 KiB | 0 MiB | 0 B | 0 B |
| from small pool | 0 KiB | 0 MiB | 0 B | 0 B |
|---------------------------------------------------------------------------|
| Active memory | 141284 KiB | 1137 MiB | 0 B | 0 B |
| from large pool | 0 KiB | 0 MiB | 0 B | 0 B |
| from small pool | 0 KiB | 0 MiB | 0 B | 0 B |
|---------------------------------------------------------------------------|
| Requested memory | 0 B | 0 B | 0 B | 0 B |
| from large pool | 0 B | 0 B | 0 B | 0 B |
| from small pool | 0 B | 0 B | 0 B | 0 B |
|---------------------------------------------------------------------------|
| GPU reserved memory | 1472 MiB | 1472 MiB | 0 B | 0 B |
| from large pool | 0 MiB | 0 MiB | 0 B | 0 B |
| from small pool | 0 MiB | 0 MiB | 0 B | 0 B |
|---------------------------------------------------------------------------|
| Non-releasable memory | 0 B | 0 B | 0 B | 0 B |
| from large pool | 0 B | 0 B | 0 B | 0 B |
| from small pool | 0 B | 0 B | 0 B | 0 B |
|---------------------------------------------------------------------------|
| Allocations | 0 | 0 | 0 | 0 |
| from large pool | 0 | 0 | 0 | 0 |
| from small pool | 0 | 0 | 0 | 0 |
|---------------------------------------------------------------------------|
| Active allocs | 0 | 0 | 0 | 0 |
| from large pool | 0 | 0 | 0 | 0 |
| from small pool | 0 | 0 | 0 | 0 |
|---------------------------------------------------------------------------|
| GPU reserved segments | 0 | 0 | 0 | 0 |
| from large pool | 0 | 0 | 0 | 0 |
| from small pool | 0 | 0 | 0 | 0 |
|---------------------------------------------------------------------------|
| Non-releasable allocs | 0 | 0 | 0 | 0 |
| from large pool | 0 | 0 | 0 | 0 |
| from small pool | 0 | 0 | 0 | 0 |
|---------------------------------------------------------------------------|
| Oversize allocations | 0 | 0 | 0 | 0 |
|---------------------------------------------------------------------------|
| Oversize GPU segments | 0 | 0 | 0 | 0 |
|===========================================================================|
[ERROR] Got an OOM, unloading all loaded models.
Exception in thread Thread-17 (prompt_worker):
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\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 "D:\ComfyUI_windows_portable\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 "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 318, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 306, in process_inputs
result = f(**inputs)
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func
return method(locked_class, **inputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_api\latest\_io.py", line 1935, in EXECUTE_NORMALIZED
to_return = cls.execute(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_minimax_h3.py", line 142, in execute
cond = clip.encode_from_tokens_scheduled(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 336, in encode_from_tokens_scheduled
pooled_dict = self.encode_from_tokens(tokens, return_pooled=return_pooled, return_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 405, in encode_from_tokens
o = self.cond_stage_model.encode_token_weights(tokens)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 743, in encode_token_weights
out = getattr(self, self.clip).encode_token_weights(token_weight_pairs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 110, in encode_token_weights
out = super().encode_token_weights(token_weight_pairs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 45, in encode_token_weights
o = self.encode(to_encode)
^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 306, in encode
return self(tokens)
^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 279, in forward
outputs = self.transformer(None, attention_mask_model, embeds=embeds, num_tokens=num_tokens, intermediate_output=intermediate_output, final_layer_norm_intermediate=self.layer_norm_hidden_state, dtype=torch.float32, embeds_info=embeds_info)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\minimax.py", line 96, in forward
return super().forward(input_ids, attention_mask=attention_mask, embeds=embeds,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen3vl.py", line 100, in forward
return self.model(
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 782, in forward
x, current_kv = layer(
^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 614, in forward
x = self.mlp(x)
^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 581, in forward
return self.down_proj(self.activation(self.gate_proj(x)) * self.up_proj(x))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 1407, in forward
output = self.forward_comfy_cast_weights(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 1337, in forward_comfy_cast_weights
weight, bias, offload_stream = cast_bias_weight(
^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 371, in cast_bias_weight
offload_stream = cast_modules_with_vbar([s], dtype, device, bias_dtype, non_blocking)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 230, in cast_modules_with_vbar
handle_pin(s, pin, xfer_source, xfer_dest, subset=subset, size=dest_size)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 228, in handle_pin
cast_maybe_lowvram_patch(source, pin, offload_stream, xfer_dest2=dest)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 219, in cast_maybe_lowvram_patch
comfy.model_management.cast_to_gathered(xfer_source, xfer_dest, non_blocking=non_blocking, stream=stream, r2=xfer_dest2)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1500, in cast_to_gathered
if comfy.memory_management.read_tensor_file_slice_into(tensor, dest_view, stream=stream, destination2=dest2_view):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\memory_management.py", line 21, in read_tensor_file_slice_into
if not read_tensor_file_slice_into(tensor._qdata,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\memory_management.py", line 70, in read_tensor_file_slice_into
hostbuf.read_file_slice(file_obj, info.offset, info.size,
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\comfy_aimdo\host_buffer.py", line 109, in read_file_slice
raise RuntimeError("HostBuffer.read_file_slice failed")
RuntimeError: HostBuffer.read_file_slice failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 550, in execute
comfy.model_management.reset_cast_buffers()
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1413, in reset_cast_buffers
offload_stream.synchronize()
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\streams.py", line 106, in synchronize
super().synchronize()
torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "threading.py", line 1075, in _bootstrap_inner
File "threading.py", line 1012, in run
File "D:\ComfyUI_windows_portable\ComfyUI\main.py", line 372, in prompt_worker
e.execute(item[2], prompt_id, extra_data, item[4])
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 728, in execute
asyncio.run(self.execute_async(prompt, prompt_id, extra_data, execute_outputs))
File "asyncio\runners.py", line 195, in run
File "asyncio\runners.py", line 118, in run
File "asyncio\base_events.py", line 691, in run_until_complete
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 789, in execute_async
result, error, ex = await execute(self.server, dynamic_prompt, self.caches, node_id, extra_data, executed, prompt_id, execution_list, pending_subgraph_results, pending_async_nodes, ui_node_outputs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\execution.py", line 645, in execute
comfy.model_management.unload_all_models()
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 2045, in unload_all_models
free_memory(1e30, device)
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 875, in free_memory
memory_to_free = 0 if device is None else memory_required - get_free_memory(device)
^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\model_management.py", line 1765, in get_free_memory
mem_free_cuda, _ = torch.cuda.mem_get_info(dev)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\cuda\memory.py", line 883, in mem_get_info
return torch.cuda.cudart().cudaMemGetInfo(device)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
torch.AcceleratorError: CUDA error: out of memory
Search for `cudaErrorMemoryAllocation' in https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__TYPES.html for more information.
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
I have those
pytorch version: 2.11.0.dev20260106+cu130 [INFO] Python version: 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)] [INFO] ComfyUI version: 0.30.0 [INFO] comfy-aimdo version: 0.4.11 [INFO] comfy-kitchen version: 0.2.26 [INFO] comfyui-frontend-package version: 1.47.12 [INFO] comfyui-workflow-templates version: 0.11.27 [INFO] comfyui-embedded-docs version: 0.5.9 [INFO] comfy-kitchen version: 0.2.26 [INFO] comfy-aimdo version: 0.4.11
It only works if I add the --disable-pinned-memory flag
@rattus128 Answers to your questions, plus results from an automated repeat harness. Headline:
--disable-cuda-malloc does not help, and CUDA_LAUNCH_BLOCKING=1 does not move the error.
CUDA version (you asked)
torch : 2.13.0+cu132 (CUDA build 13.2)
driver : 610.88
comfy-aimdo : 0.4.13 (also reproduced on 0.4.11 and 0.4.12.dev3)
comfy-kitchen : 0.2.26
ComfyUI : v0.30.0-12-g6f7cd7fc
OS : Windows 11 Pro 26200, Python 3.13.12
GPUs : RTX 5080 16GB (cuda:0, headless) + RTX 3060 8GB (cuda:1, drives displays)
RAM : 65,434 MB, pagefile 32 GB initial / 64 GB max
So yes — CUDA 13.2, matching the one prior report you mentioned that was never resolvable.
Results
Controlled set — all on aimdo 0.4.13, identical workflow (MiniMax-H3, euler, 20 steps, latent
[(1,24,37,22,38),(1,32,2,207)]), fresh process and fresh seed per run:
| Configuration | Success rate |
|---|---|
2nd GPU visible, default (cudaMallocAsync) |
1 / 10 |
2nd GPU visible, --disable-cuda-malloc |
0 / 4 |
2nd GPU visible, CUDA_LAUNCH_BLOCKING=1 |
0 / 2 |
2nd GPU hidden (--cuda-device <5080 UUID>) |
2 / 2 |
Consistent with, but not part of, that set: on 0.4.11 / 0.4.12.dev3 over the preceding two days I had at least 7 further crashes with the 2nd GPU visible and 17 successful renders with it hidden. Those were my normal working sessions rather than controlled runs — mixed resolutions and samplers — so I have separated them rather than pooling them into the table above.
Every failure identical:
aimdo: src/hostbuf.c:283:ERROR:hostbuf_read_file_slice: device copy failed result=2 device_ptr=... device=0 stream=... size=67108864
--disable-cuda-malloc: no effect
0/4, matching @Pombaroom. Being straight about the statistics: at a ~10% base success rate, 0/4 cannot exclude a small effect — but there is no sign of improvement, so it does not fix this.
CUDA_LAUNCH_BLOCKING=1: the error does not move
This one seems more informative. I ran with CUDA_LAUNCH_BLOCKING=1 and CUDA_LOG_FILE=stderr
(verified the child process actually inherited both). With every CUDA call forced synchronous, the
failure still surfaces at exactly the same place — hostbuf.c:283, same result=2, same
size=67108864, same Python traceback through prefetch_queue_pop → cast_to_gathered →
read_file_slice.
If an earlier call had queued a deferred async error, blocking mode should have exposed it at that
earlier call. It didn't. That looks like evidence against the deferred-async theory, though you'd
know better whether CUDA_LAUNCH_BLOCKING actually covers the path in question.
aimdo 0.4.13 does not fix it
1 success in 10 on 0.4.13. That single success was a genuine render (a real video was written), from a fresh process — it is just the base rate. Worth knowing because a one-off "it works now" report on this bug is very easy to produce by accident.
The 2nd GPU changes the rate, not the outcome
I previously reported this as "always fails with the second GPU visible." That was too strong. On
0.4.13 it is 1/10 visible vs 2/2 hidden, and across the preceding two days on 0.4.11 hiding it
did not fail in 17 working sessions. So --cuda-device looks like a reliable workaround, but I would
not claim the second GPU is the root cause on this evidence — only that it strongly affects the rate.
A ~10% success rate probably explains why this has been hard to reproduce, and why several reports here read as intermittent. On my machine it also explains a 24-render streak that worked before this started.
Method
Because the base rate is low, single runs are close to meaningless. I automated it:
- extract the API-format prompt from an output
.mp4,POST /prompt, poll/history/<id> - randomise the seed every run — with an identical prompt ComfyUI's cache skips the sampler entirely and every repeat "succeeds"
- fresh process per run, killed between runs
- detect the crash from the aimdo
ERRORline, success fromPrompt executed in
A manual GUI run interleaved with the automated ones produced identical results, so the harness is not introducing anything.
Happy to run any instrumented build. On 0.4.13 the aimdo: lines come through Python logging and
land in --verbose DEBUG log files, which makes collecting these easy — on 0.4.12.dev3 they were
still stderr-only, so that changed somewhere between the two.
Similar in my case too. Since today's update, my ComfyUI crashes with CUDA OOM or following error unlike yesterday. (I tried disabling all custom nodes and enabling --fast-disk which of course didnt fixed error)
Fatal Python error: Aborted
Stack (most recent call first): File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\llama.py", line 581 in forward File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\llama.py", line 614 in forward File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\llama.py", line 782 in forward File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\qwen3vl.py", line 100 in forward File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\minimax.py", line 96 in forward File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd1_clip.py", line 279 in forward File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl File "C:\Users\resc8\ComfyUI\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in wrapped_call_impl File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd1_clip.py", line 306 in encode File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd1_clip.py", line 45 in encode_token_weights File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\text_encoders\minimax.py", line 110 in encode_token_weights File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd1_clip.py", line 743 in encode_token_weights File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd.py", line 405 in encode_from_tokens File "C:\Users\resc8\ComfyUI\ComfyUI\comfy\sd.py", line 336 in encode_from_tokens_scheduled File "C:\Users\resc8\ComfyUI\ComfyUI\comfy_extras\nodes_minimax_h3.py", line 277 in execute File "C:\Users\resc8\ComfyUI\ComfyUI\comfy_api\latest_io.py", line 1935 in EXECUTE_NORMALIZED File "C:\Users\resc8\ComfyUI\ComfyUI\comfy_api\internal_init.py", line 149 in wrapped_func File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 306 in process_inputs File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 318 in _async_map_node_over_list File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 344 in get_output_data File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 545 in execute File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 789 in execute_async File "asyncio\events.py", line 89 in _run File "asyncio\base_events.py", line 2050 in _run_once File "asyncio\base_events.py", line 683 in run_forever File "asyncio\base_events.py", line 712 in run_until_complete File "asyncio\runners.py", line 118 in run File "asyncio\runners.py", line 195 in run File "C:\Users\resc8\ComfyUI\ComfyUI\execution.py", line 728 in execute File "C:\Users\resc8\ComfyUI\ComfyUI\main.py", line 372 in prompt_worker File "threading.py", line 994 in run File "threading.py", line 1043 in _bootstrap_inner File "threading.py", line 1014 in _bootstrap
Extension modules: sqlalchemy.cyextension.collections, sqlalchemy.cyextension.immutabledict, sqlalchemy.cyextension.processors, sqlalchemy.cyextension.resultproxy, sqlalchemy.cyextension.util, greenlet._greenlet, markupsafe._speedups, yaml._yaml, PIL._imaging, multidict._multidict, yarl._quoting_c, propcache._helpers_c, aiohttp._http_writer, aiohttp._http_parser, aiohttp._websocket.mask, aiohttp._websocket.reader_c, frozenlist._frozenlist, charset_normalizer.md, numpy._core._multiarray_umath, numpy.linalg._umath_linalg, torch._C, torch._C._dynamo.autograd_compiler, torch._C._dynamo.eval_frame, torch._C._dynamo.guards, torch._C._dynamo.utils, torch._C._fft, torch._C._linalg, torch._C._nested, torch._C._nn, torch._C._sparse, torch._C._special, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._pcg64, numpy.random._generator, numpy.random._mt19937, numpy.random._philox, numpy.random._sfc64, numpy.random.mtrand, psutil._psutil_windows, PIL._imagingft, _cyutility, scipy._cyutility, scipy._lib._ccallback_c, scipy.ndimage._nd_image, scipy.ndimage._rank_filter_1d, scipy.special._ufuncs_cxx, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg._batched_linalg, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._internal_matfuncs, scipy.linalg._linalg_pythran, scipy.linalg.cython_blas, scipy.linalg.cython_lapack, scipy.linalg._decomp_update, scipy.special._ellip_harm_2, scipy.special._special_ufuncs, scipy.special._gufuncs, scipy.special._ufuncs, scipy.special._specfun, scipy.special._comb, _ni_label, scipy.ndimage._ni_label, regex._regex, scipy.integrate._odepack, scipy.integrate._quadpack, scipy.integrate._vode, scipy.integrate._dop, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpacklib, scipy.sparse.linalg._propack, scipy.optimize._group_columns, scipy._lib.messagestream, scipy.optimize._trlib._trlib, scipy.optimize._lbfgsb, _moduleTNC, scipy.optimize._moduleTNC, scipy.optimize._slsqplib, scipy.optimize._minpack, scipy.optimize._lsq.givens_elimination, scipy.optimize._zeros, scipy._lib._uarray._uarray, scipy.linalg._decomp_interpolative, scipy.optimize._bglu_dense, scipy.optimize._lsap, scipy.spatial._ckdtree, scipy.spatial._hausdorff, scipy.spatial._distance_wrap, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial.transform._rotation_cy, scipy.spatial.transform._rigid_transform_cy, scipy.optimize._direct, scipy.interpolate._fitpack, scipy.interpolate._dierckx, scipy.interpolate._ppoly, scipy.interpolate._interpnd, scipy.interpolate._rbfinterp_pythran, scipy.interpolate._rgi_cython, scipy.special.cython_special, scipy.stats._stats, scipy.stats._biasedurn, scipy.stats._levy_stable.levyst, scipy.stats._stats_pythran, scipy.stats._ansari_swilk_statistics, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.stats._sobol, scipy.stats._qmc_cy, scipy.stats._rcont.rcont, scipy.stats._qmvnt_cy, av._core, av.logging, av.buffer, av.audio.format, av.error, av.dictionary, av.container.pyio, av.format, av.index, av.utils, av.stream, av.container.streams, av.sidedata.encparams, av.sidedata.motionvectors, av.sidedata.sidedata, av.opaque, av.packet, av.container.input, av.bitstream, av.container.output, av.container.core, av.codec.context, av.video.format, av.video.reformatter, av.plane, av.video.plane, av.video.frame, av.video.stream, av.codec.hwaccel, av.codec.codec, av.frame, av.audio.layout, av.audio.plane, av.audio.frame, av.audio.stream, av.filter.link, av.filter.context, av.filter.graph, av.filter.filter, av.filter.loudnorm, av.audio.resampler, av.audio.codeccontext, av.audio.fifo, av.device, av.video.codeccontext, av.subtitles.stream, scipy.signal._sigtools, scipy.signal._max_len_seq_inner, scipy.signal._upfirdn_apply, scipy.signal._spline, scipy.signal._sosfilt, scipy.signal._peak_finding_utils (total: 174)
C:\Users\resc8\ComfyUI>echo If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest. If you see this and ComfyUI did not start try updating your Nvidia Drivers to the latest.
C:\Users\resc8\ComfyUI>pause
@resc863 @BigStationW you have a different error (and anyone else with the llama.py 581 abort).
Stack (most recent call first):
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 581 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 614 in forward
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1789 in _call_impl
File "D:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1778 in _wrapped_call_impl
File "D:\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 782 in forward
Im looking into the issue now as a completely separate thing. If this one gets any bigger we will split the issue report.