ComfyUI first-generation corruption occurs only on first image generation after launch.
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
System:
Windows 11
RTX 3070 Ti Laptop GPU (8GB)
ComfyUI 0.17.2 rev 4905
Torch 2.9.1+cu130
Behaviour:
First generation after launch is corrupted
Second generation with identical settings is clean
Testing:
--cuda-malloc alone: does not fix
--disable-cuda-malloc alone: does not fix
--cuda-malloc --disable-cuda-malloc together: fixes the issue consistently
Important:
Order appears relevant
Working launch command:
.\python_embeded\python.exe -s ComfyUI\main.py --disable-api-nodes --windows-standalone-build --cuda-malloc --disable-cuda-malloc
This suggests allocator initialisation differs from final allocator selection, and both flags together change first-run startup behaviour in a way neither flag alone does.
Contributor guide
Research direction
Start by reproducing the first-generation corruption with the reported Windows command and ComfyUI\main.py entry point, comparing runs with each allocator flag alone and both together. Trace where allocator initialization and final selection occur during startup; done means the first generation is clean without requiring both conflicting flags.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- ai, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100