mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-16 08:16:38 +08:00
Free more vram for upscale models.
This commit is contained in:
parent
e7cd70ed48
commit
28cb4e1b8b
@ -39,7 +39,7 @@ class ImageUpscaleWithModel:
|
||||
device = model_management.get_torch_device()
|
||||
|
||||
memory_required = model_management.module_size(upscale_model)
|
||||
memory_required += (512 * 512 * 3) * image.element_size() * max(upscale_model.scale, 1.0) * 256.0 #The 256.0 is an estimate of how much some of these models take, TODO: make it more accurate
|
||||
memory_required += (512 * 512 * 3) * image.element_size() * max(upscale_model.scale, 1.0) * 384.0 #The 384.0 is an estimate of how much some of these models take, TODO: make it more accurate
|
||||
memory_required += image.nelement() * image.element_size()
|
||||
model_management.free_memory(memory_required, device)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user