From bcc537a8b3eff79e97ec756e71c19a652a579b5a Mon Sep 17 00:00:00 2001 From: Jairo Correa Date: Mon, 6 Nov 2023 00:16:03 -0300 Subject: [PATCH] Multi plataform get_extension_calling --- comfy/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy/utils.py b/comfy/utils.py index a867398716d..3ef66d23a52 100644 --- a/comfy/utils.py +++ b/comfy/utils.py @@ -5,12 +5,13 @@ import safetensors.torch import numpy as np import inspect +import os import re from PIL import Image def get_extension_calling(): for frame in inspect.stack(): - if "/custom_nodes/" in frame.filename or "\\custom_nodes\\" in frame.filename: + if os.sep + "custom_nodes" + os.sep in frame.filename: stack_module = inspect.getmodule(frame[0]) if stack_module: return re.sub(r".*\.?custom_nodes\.([^\.]+).*", r"\1", stack_module.__name__.replace("\\", ".").replace("/", ".")).split(".")[0]