Comfy-Org / Comfy-Org/ComfyUI

ComfyUI KSamplerAdvanced Tensor Size Mismatch and Out of Memory Errors

Open
#3,350 2 comments 0 reactions 0 assignees View on GitHub
User Support
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 6h
Merged PRs (30d)
155

Description

Hello everyone,

I've been working with ComfyUI and have encountered a series of errors that I'm unable to resolve. The main issues are as follows:

I receive a "tensor size mismatch" error stating, "The size of tensor a (8) must match the size of tensor b (0) at non-singleton dimension 0."
Subsequently, I encounter an "out of memory" error with details indicating that the allocation on device 0 would exceed allowed memory.
These errors persist despite attempting various fixes, such as adjusting batch sizes and ensuring that all nodes and dependencies are up to date. It appears that somewhere along the line, the tensors being processed are not aligning correctly, and my system is running out of allocatable memory to execute the tasks.

![Ekran görüntüsü 2024-04-26 121708](https://github.com/comfyanonymous/ComfyUI/assets/70207888/00b4da1d-e631-4f1f-94d5-8970e92cadef)

![Ekran görüntüsü 2024-04-26 122954](https://github.com/comfyanonymous/ComfyUI/assets/70207888/a6a3c6eb-1321-4c58-aef8-c4d387c7bdd7)

I'm reaching out to see if anyone has insights into which specific nodes or settings within ComfyUI could be tweaked to address these issues, or any tips on memory management for large tensor operations within this context.

Any guidance or suggestions would be greatly appreciated!

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.