Comfy-Org / Comfy-Org/ComfyUI

32 GB RAM, 16 GB VRAM: When I switch to run between different workflows, I get an Kaggle kernel crashed issue

Open
#9,709 2 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [x] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

Run without issue

### Actual Behavior

Kaggle Kernel just saying "trying to allocate more memory but could not...", and crashed

### Steps to Reproduce

My environment: 32 GB RAM, 16 GB VRAM (Tesla T4, Kaggle Kernel).

If I consistently use the Qwen Image workflow, everything works fine.
If I consistently use the Flux workflow, that also works without any issues.

However, if I run the Qwen Image workflow first and then try to run the Flux workflow, I get "trying to allocate more memory but could not..." and Kaggle kernel crashed.
Conversely, if I run the Flux workflow first and then switch to the Qwen Image workflow, I also get "trying to allocate more memory but could not..." and Kaggle kernel crashed.

It seems there's an issue with memory management or unloading the memory when a workflow completes and a different one is loaded.

### Debug Logs

```powershell
No error log. Kaggle Kernel just saying "trying to allocate more memory but could not...", and crashed
```

### Other

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.