mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-20 19:30:20 +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
|
#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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user