1 Commits
Author SHA1 Message Date
kijai d312c62982 Possible import error fix 2025-06-02 14:48:59 +03:00
3 changed files with 7 additions and 4 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ class DownloadAndLoadDynamiCrafterModel:
'ckpt_name': model, 'ckpt_name': model,
'fp8_unet': fp8_unet 'fp8_unet': fp8_unet
} }
if not hasattr(self, 'model') or self.model == None or custom_config != self.current_config: if not hasattr(self, 'model') or self.model is None or custom_config != self.current_config:
self.current_config = custom_config self.current_config = custom_config
download_path = os.path.join(folder_paths.models_dir, "checkpoints", "dynamicrafter") download_path = os.path.join(folder_paths.models_dir, "checkpoints", "dynamicrafter")
model_path = os.path.join(download_path, model) model_path = os.path.join(download_path, model)
+1 -1
View File
@@ -1,7 +1,7 @@
[project] [project]
name = "comfyui-dynamicrafterwrapper" name = "comfyui-dynamicrafterwrapper"
description = "Wrapper nodes to use Dynami/ToonCrafter image2video and frame interpolation models in ComfyUI" description = "Wrapper nodes to use Dynami/ToonCrafter image2video and frame interpolation models in ComfyUI"
version = "1.0.2" version = "1.0.3"
license = "Apache-2.0" license = "Apache-2.0"
dependencies = ["einops>=0.3.0", "numpy>=1.24.2", "omegaconf>=2.1.1", "pytorch_lightning>=2.2.1", "tqdm>=4.65.0", "transformers>=4.25.1", "timm"] dependencies = ["einops>=0.3.0", "numpy>=1.24.2", "omegaconf>=2.1.1", "pytorch_lightning>=2.2.1", "tqdm>=4.65.0", "transformers>=4.25.1", "timm"]
+5 -2
View File
@@ -34,12 +34,15 @@ def instantiate_from_config(config):
def get_obj_from_str(string, reload=False): def get_obj_from_str(string, reload=False):
package_directory_name = os.path.basename(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
module, cls = string.rsplit(".", 1) module, cls = string.rsplit(".", 1)
if reload: if reload:
module_imp = importlib.import_module(module) module_imp = importlib.import_module(module)
importlib.reload(module_imp) importlib.reload(module_imp)
return getattr(importlib.import_module(module, package=package_directory_name), cls) try:
obj = getattr(importlib.import_module(module, package=os.path.basename(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))), cls)
except:
obj = getattr(importlib.import_module(module, package=os.path.dirname(os.path.dirname(os.path.abspath( __file__ )))), cls)
return obj
def load_npz_from_dir(data_dir): def load_npz_from_dir(data_dir):