mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-24 05:10:18 +08:00
del hook breaker
This commit is contained in:
parent
2b293de1b1
commit
3bf0b01e47
@ -1,17 +0,0 @@
|
|||||||
# Prevent custom nodes from hooking anything important
|
|
||||||
from .. import model_management
|
|
||||||
|
|
||||||
HOOK_BREAK = [(model_management, "cast_to")]
|
|
||||||
|
|
||||||
|
|
||||||
SAVED_FUNCTIONS = []
|
|
||||||
|
|
||||||
|
|
||||||
def save_functions():
|
|
||||||
for f in HOOK_BREAK:
|
|
||||||
SAVED_FUNCTIONS.append((f[0], f[1], getattr(f[0], f[1])))
|
|
||||||
|
|
||||||
|
|
||||||
def restore_functions():
|
|
||||||
for f in SAVED_FUNCTIONS:
|
|
||||||
setattr(f[0], f[1], f[2])
|
|
||||||
Loading…
Reference in New Issue
Block a user