Open Lia-C opened 1 week ago
I have debugged this and concluded that SD15 errors out for max pixel size > 2**21.
The rule is: H x W x N <= 2**21, where H=height, W=width, N=batch_size.
So: Batch size of 1: Works up to 1408p. Anything above this fails: 1472p and above Batch size of 2: Works up to 960p. Anything above this fails: 1024p and above
Here are some examples of ones that fail with the above torch.nn.functional.scaled_dot_product_attention
error:
(1472, 1472 1)
(1536, 1536, 1)
(2048, 2048, 1)
And here are ones that work: (344, 1344, 1) (1408, 1408, 1) (1408, 1472, 1) (960, 1024, 2) (960, 960, 2) (512, 512, 2)
What happened?
I am using SD15. When the batch size on "Empty Latent Image" is set to 2, I get a CUDA error with
torch.nn.functional.scaled_dot_product_attention
from attention_sharing.py and attention_pytorch.When the batch size is 1 with SD15, there is no issue.
It's fine for SDXL models--- for both "SDXL Conv Injection" as well as "SDXL Attention Injection", there is no error with larger batch sizes.
Steps to reproduce the problem
What should have happened?
SD15 with transparency should have run with batch size 2, and produced 2 transparent images.
Commit where the problem happens
ComfyUI: 7718ada4eddf101d088b69e159011e4108286b5b ComfyUI-layerdiffuse: 6e4aeb2da78ba48c519367608a61bf47ea6249b4
Sysinfo
Linux, NVIDIA L4 from google cloud console:
Console logs
Workflow json file
workflow (2).json
Additional information
No response