Skip to content

Commit 5cb1e0c

Browse files
Disable guards on transformer_options when torch.compile (#11317)
1 parent 51347f9 commit 5cb1e0c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

comfy_extras/nodes_torch_compile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
from comfy_api.latest import ComfyExtension, io
33
from comfy_api.torch_helpers import set_torch_compile_wrapper
44

5+
def skip_torch_compile_dict(guard_entries):
6+
return [("transformer_options" not in entry.name) for entry in guard_entries]
57

68
class TorchCompileModel(io.ComfyNode):
79
@classmethod
@@ -23,7 +25,7 @@ def define_schema(cls) -> io.Schema:
2325
@classmethod
2426
def execute(cls, model, backend) -> io.NodeOutput:
2527
m = model.clone()
26-
set_torch_compile_wrapper(model=m, backend=backend)
28+
set_torch_compile_wrapper(model=m, backend=backend, options={"guard_filter_fn": skip_torch_compile_dict})
2729
return io.NodeOutput(m)
2830

2931

0 commit comments

Comments
 (0)