Skip to content

Commit

Permalink
Merge branch 'extension-device' into beta
Browse files Browse the repository at this point in the history
  • Loading branch information
jn-jairo committed Nov 6, 2023
2 parents eab2c06 + bcc537a commit b53d76b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion comfy/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit b53d76b

Please sign in to comment.