attempt at memory management and remove unnecessary req
This commit is contained in:
@@ -3,6 +3,7 @@ from omegaconf import OmegaConf
|
||||
import math
|
||||
import torch
|
||||
import importlib
|
||||
import comfy.model_management
|
||||
|
||||
def get_obj_from_str(string, reload=False, invalidate_cache=True):
|
||||
module, cls = string.rsplit(".", 1)
|
||||
@@ -127,6 +128,11 @@ class SVDimg2vid:
|
||||
|
||||
def generate(self, image, version, num_frames, num_steps, fps_id, motion_bucket_id, cond_aug, seed, decoding_t, lowvram_mode):
|
||||
|
||||
#since this is so memory intensive, try to get everything free
|
||||
comfy.model_management.cleanup_models()
|
||||
torch.cuda.empty_cache()
|
||||
torch.cuda.ipc_collect()
|
||||
|
||||
device: str = "cuda"
|
||||
|
||||
model_config = f"custom_nodes/ComfyUI-SVD/svd/configs/{version}.yaml"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
einops
|
||||
omegaconf
|
||||
math
|
||||
pytorch-lightning==2.0.1
|
||||
open-clip-torch>=2.20.0
|
||||
sgm @ git+https://github.com/Stability-AI/generative-models
|
||||
Reference in New Issue
Block a user