after install pytorch stable 2.8, having problems with OOM
Custom Node Testing
- [x] I have tried disabling custom nodes and the issue persists (see how to disable custom nodes if you need help)
Your question
Python 3.12.9 comfyui 0.3.49 cuda 12.8 torch 2.8
Today I installed torch 2.8 and updated these to match new torch version. triton 3.4 sage 2.2 nunchaku 3.1 And I also updated the gguf node
I ran wan2.2 hoping it would be a bit faster and got OOM. I tried running it without --use-sage-attention, Turn off torch compile too. It was very slow and, as expected, OOM.
I tried reducing the number of frames generated to use less RAM, and it worked fine.
triton, sage, nunchaku doesn't matter, right? I didn't use it. The only custom node used is gguf. So, the conclusion is that torch2.8 uses more memory?
Logs
Other
No response
me too
To determine whether this is an issue with the gguf custom node, or with pytorch / ComfyUI itself, are you able to reproduce any errors using --disable-all-custom-nodes?
A new version came out, so I tested it. I used the default workflow (lora bypassed)
old: The version described above. but torch2.71 new: downloaded a v0.3.50 portable zip.
wan2.2 has two passes, high and low. using fp8.
1pass only old and new: ok 2pass old and new: OOM when second sampling. Error saying more page files are needed. (Memory management is Windows default auto, 32g system RAM, and 30g page file is being used.)
Now use the gguf custom node. 1pass only old and new: ok 2pass old: ok. (There was no freeze even when increasing the video length and using GPU shared memory.) new: Windows freezes while decoding. and black screen, got error. "Fatal: Memory allocation error" Similar to this. (There is a some of free memory in Task Manager)
In a similar situation, the KJ workflow ran to OOM during secondary sampling. I also tried 秋叶aaaki latest portable package (pytorch 2.8+cu12.9), which was the same.
Sorry, just to confirm, when you tested the default workflow, were you testing with --disable-all-custom-nodes? If not, that's the first thing we need to try. Then we can start to isolate the part of ComfyUI, or the custom node, that is causing the issue.
That it works on one core version and not another doesn't necessarily mean it's a core problem that needs to be fixed; it could just as easily be code in a custom node that is relying on formerly bugged behaviour (that has now been patched).
As you can see, testing is impossible in the default environment without gguf.
So, --disable-all-custom-nodes is nonsense.
So, let's fix the page file to an appropriate size, find the maximum video length that can be run on torch2.7, and test it again on torch2.8?
The page file error is due to running out of RAM and needing to start using disk space for ram (paging file). Things getting interrupted may be your OS trying to save itself.
As for the first error, can you try to temporarily set --reserve-vram to 5? This should hopefully keep you from rolling over into shared VRAM.
Okay, I fixed the paging file to 32G (auto is 30G) and ran the following: (--disable-all-custom-nodes)
2.8 OOM 2.7 OK 2.8 OOM 2.8 OOM 2.7 OK 2.7 OK
So does 2.8 really need more memory?
Yeah that is rather odd that it worked with 2.7 and not 2.8. I will say, 32GB for Wan is surprising that it worked in 2.7, since ComfyUI doesn't really have any mechanisms implemented to manage system RAM. Can you set the page file to something more ridiculous like 64GB and see if 2.8 is happy?
Yes, it works fine.
I don't know much about the technical details, but 2.7 shuts down silently, while 2.8 tends to display an error message.
So, perhaps 2.8 checks memory first or manages it more strictly. (This may be a Python difference, but it's clear that 2.8 required more memory even in 3.12.)
Same thing happened to me after upgrading torch from 2.7+cuda12.8 to 2.8+cuda12.8. the exact same wan workflow that used to work now freeze and quit without warning (no OOM messages). I noticed the RAM in task manager getting 100% on my 64 gb RAM before comfyui freezes and quit itself.
I just tested this and was able to run WAN 2.2 with Pytorch 2.7.1 whereas with 2.8 I get OOM crash. Had to downgrade xformers to v0.0.31. My launch arguments are:
--use-sage-attention --lowvram --disable-smart-memory
Sage attention didn't work since I have Blackwell GPU but it generated and did not crash.
i have the same problem with rtx 5090 and 64gb ddr4 without downgrading to pytorch 2.7.1 i solved it by using --cache-none i don't know if this will kill my ssd soon though