FIXED: torch.load issue
https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/754
This commit is contained in:
@@ -7,6 +7,8 @@ import numpy as np
|
||||
from torchvision.transforms.functional import to_pil_image
|
||||
import torch
|
||||
|
||||
orig_torch_load = torch.load
|
||||
|
||||
try:
|
||||
from ultralytics import YOLO
|
||||
except Exception as e:
|
||||
@@ -14,6 +16,9 @@ except Exception as e:
|
||||
print(f"\n!!!!!\n\n[ComfyUI-Impact-Subpack] If this error occurs, please check the following link:\n\thttps://github.com/ltdrdata/ComfyUI-Impact-Pack/blob/Main/troubleshooting/TROUBLESHOOTING.md\n\n!!!!!\n")
|
||||
raise e
|
||||
|
||||
# HOTFIX: https://github.com/ltdrdata/ComfyUI-Impact-Pack/issues/754
|
||||
# importing YOLO breaking original torch.load capabilities
|
||||
torch.load = orig_torch_load
|
||||
|
||||
def load_yolo(model_path: str):
|
||||
try:
|
||||
|
||||
@@ -4,9 +4,9 @@ import impact.core as core
|
||||
import impact.subcore as subcore
|
||||
from impact.utils import add_folder_path_and_extensions
|
||||
|
||||
version_code = 22
|
||||
version_code = 23
|
||||
|
||||
print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.6)")
|
||||
print(f"### Loading: ComfyUI-Impact-Pack (Subpack: V0.7)")
|
||||
|
||||
model_path = folder_paths.models_dir
|
||||
add_folder_path_and_extensions("ultralytics_bbox", [os.path.join(model_path, "ultralytics", "bbox")], folder_paths.supported_pt_extensions)
|
||||
|
||||
Reference in New Issue
Block a user