mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-16 09:10:50 +08:00
misc cleanup
This commit is contained in:
parent
2c554a112e
commit
94a709d813
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user