-
-
Notifications
You must be signed in to change notification settings - Fork 77
Description
Hey,
I've received some reports these nodes breaking torchscript model functionality, and quickly looking as to why, I came upon this:
ComfyUI-RMBG/AILab_SAM2Segment.py
Line 35 in 9c382cc
| torch.jit.script = patched_jit_script |
This is a very bad practice as it disables Jit globally for everything in Comfy if the user simply have these nodes installed.
Also forcing torch.load to always be unsafe here:
ComfyUI-RMBG/AILab_SAM2Segment.py
Line 49 in 9c382cc
| torch.load = patched_torch_load |
Is potentially even dangerous.
Please look into ways to do this without globally changing things, such as using context managers, as otherwise I will currently just have to tell people to uninstall these nodes.
Edit:
Also seems it's setting the torch._C._jit_set_profiling_executor(False) that is breaking things for me, this isn't the only node that does this too.