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 #FIXME: This is a RAM cache trigger event
params = [ module.weight, module.bias ] params = [ module.weight, module.bias ]
size = comfy.memory_management.vram_aligned_size(params) size = comfy.memory_management.vram_aligned_size(params)
try: pin = torch.empty((size,), dtype=torch.uint8)
pin = torch.empty((size,), dtype=torch.uint8) if comfy.model_management.pin_memory(pin):
if comfy.model_management.pin_memory(pin): module._pin = pin
module._pin = pin else:
else:
module.pin_failed = True
return False
except:
module.pin_failed = True module.pin_failed = True
return False return False
return True return True

View File

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

View File

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