Fix issue and unpin spandrel package.

This commit is contained in:
comfyanonymous 2024-05-26 13:44:47 -04:00
parent 8cfd677cc0
commit 9a151b7def
2 changed files with 4 additions and 2 deletions

View File

@ -42,7 +42,7 @@ class ImageUpscaleWithModel:
def upscale(self, upscale_model, image):
device = model_management.get_torch_device()
memory_required = model_management.module_size(upscale_model)
memory_required = model_management.module_size(upscale_model.model)
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)

View File

@ -10,5 +10,7 @@ Pillow
scipy
tqdm
psutil
#non essential dependencies:
kornia>=0.7.1
spandrel==0.3.1
spandrel