attempt at memory management and remove unnecessary req

This commit is contained in:
kijai
2023-11-22 23:41:00 +02:00
parent be13a14b64
commit fd0cf2790b
2 changed files with 6 additions and 1 deletions
+6
View File
@@ -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
View File
@@ -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