Closed SERGEYDJUM closed 8 months ago
I had not isolated this to the Lora yet, but that does seem to work without it.
Allocation on device 0 would exceed allowed memory. (out of memory) Currently allocated : 9.57 GiB Requested : 25.00 MiB Device limit : 11.76 GiB Free (according to CUDA): 41.81 MiB PyTorch limit (set by user-supplied memory fraction) : 17179869184.00 GiB
Line 179 of comfy/model_patcher.py
if key not in self.backup:
- self.backup[key] = weight.to(device=device_to, copy=inplace_update)
+ self.backup[key] = weight.to(device=self.offload_device, copy=inplace_update)
Now LoRA works
should be fixed now.
ComfyUI applied SDXL LoRAs or LCM LoRA fine before 4a8a839b40fcae9960a6107200b89dce6675895d, but after that it shows message below during generation. With some combinations of checkpoints and loras it works, but memory usage goes from 6GB to 12GB.
Context
GPU: RTX 4060 Laptop (8GB VRAM) Workflow: default, but with SDXL LoRA and empty latent size set to 1024x1024 Args: --use-pytorch-cross-attention