misc cleanup

This commit is contained in:
Rattus 2026-01-13 19:40:52 +10:00
parent 2c554a112e
commit 94a709d813
3 changed files with 5 additions and 10 deletions

View File

@ -14,14 +14,10 @@ def pin_memory(module):
#FIXME: This is a RAM cache trigger event
params = [ module.weight, module.bias ]
size = comfy.memory_management.vram_aligned_size(params)
try:
pin = torch.empty((size,), dtype=torch.uint8)
if comfy.model_management.pin_memory(pin):
module._pin = pin
else:
module.pin_failed = True
return False
except:
pin = torch.empty((size,), dtype=torch.uint8)
if comfy.model_management.pin_memory(pin):
module._pin = pin
else:
module.pin_failed = True
return False
return True

View File

@ -14,7 +14,6 @@ from contextlib import nullcontext
import torch
import comfy.pinned_memory
import comfy.memory_management
import comfy.model_management
from latent_preview import set_preview_method

View File

@ -22,7 +22,7 @@ alembic
SQLAlchemy
av>=14.2.0
comfy-kitchen>=0.2.6
comfy-aimdo>=0.1.0
comfy-aimdo>=0.1.1
#non essential dependencies:
kornia>=0.7.1