From 38df58a78c363ef2657011893d4d811676b1c664 Mon Sep 17 00:00:00 2001 From: melMass Date: Wed, 4 Oct 2023 15:00:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=91=B7=20user=20folder=5Fpaths=20t?= =?UTF-8?q?o=20retrieve=20comfy=20root?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils.py b/utils.py index ee76a7b..69461f5 100644 --- a/utils.py +++ b/utils.py @@ -13,6 +13,7 @@ from queue import Empty, Queue from typing import List, Optional, Union +import folder_paths import numpy as np import requests import torch @@ -261,7 +262,7 @@ def import_install(package_name): here = Path(__file__).parent.absolute() # - Construct the absolute path to the ComfyUI directory -comfy_dir = here.parent.parent +comfy_dir = Path(folder_paths.base_path) styles_dir = comfy_dir / "styles" @@ -396,7 +397,7 @@ def create_uv_map_tensor(width=512, height=512): # region ANIMATION Utilities def apply_easing(value, easing_type): if value < 0 or value > 1: - raise ValueError("The value should be between 0 and 1.") + raise ValueError(f"The value should be between 0 and 1. (value is {value})") if easing_type == "Linear": return value