File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ from comfy_api .latest import ComfyExtension , io
2+ from typing_extensions import override
3+ # If you write a node that is so useless that it breaks ComfyUI it will be featured in this exclusive list
4+
5+ # "native" block swap nodes are placebo at best and break the ComfyUI memory management system.
6+ # They are also considered harmful because instead of users reporting issues with the built in
7+ # memory management they install these stupid nodes and complain even harder. Now it completely
8+ # breaks with some of the new ComfyUI memory optimizations so I have made the decision to NOP it
9+ # out of all workflows.
10+ class wanBlockSwap (io .ComfyNode ):
11+ @classmethod
12+ def define_schema (cls ):
13+ return io .Schema (
14+ node_id = "wanBlockSwap" ,
15+ category = "" ,
16+ description = "NOP" ,
17+ inputs = [
18+ io .Model .Input ("model" ),
19+ ],
20+ outputs = [
21+ io .Model .Output (),
22+ ],
23+ is_deprecated = True ,
24+ )
25+
26+ @classmethod
27+ def execute (cls , model ) -> io .NodeOutput :
28+ return io .NodeOutput (model )
29+
30+
31+ class NopExtension (ComfyExtension ):
32+ @override
33+ async def get_node_list (self ) -> list [type [io .ComfyNode ]]:
34+ return [
35+ wanBlockSwap
36+ ]
37+
38+ async def comfy_entrypoint () -> NopExtension :
39+ return NopExtension ()
Original file line number Diff line number Diff line change @@ -2330,6 +2330,7 @@ async def init_builtin_extra_nodes():
23302330 "nodes_easycache.py" ,
23312331 "nodes_audio_encoder.py" ,
23322332 "nodes_rope.py" ,
2333+ "nodes_nop.py" ,
23332334 ]
23342335
23352336 import_failed = []
You can’t perform that action at this time.
0 commit comments