Skip to content

Commit 6d677cc

Browse files
christian-byrnegithub-actions
authored andcommitted
designate canvasOnly on runtime-generated virtual widgets so they are hidden in Vue renderer (#5831)
## Summary Added `canvasOnly` flag to runtime-generated widgets to prevent Vue renderer from displaying them while keeping canvas functionality intact. ## Changes - **What**: Added `canvasOnly` widget option to hide upload, webcam, and refresh widgets from Vue renderer In the Canvas (LiteGraph) system, there was a small set of widgets with strictly defined components. There, if we wanted some unique or relatively complex behavior (like an upload butotn), we needed to create a separate widget that would be coupled to the original widget at runtime (and would not be serialized). In the Vue renderer system, we can simply add flags to the inputSpec or widget options and conditionally render complex UI additions -- i.e., there is no need for the hard-to-maintain runtime widget associations. Expressing such things entirely in the view layer simplifies business logic related to graph state, as we no longer need to account for preserving the connections between runtime widgets and their special siblings -- we also do not need to worry about the implications for state serialization. ## Related - #5798 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5831-designate-canvasOnly-on-runtime-generated-virtual-widgets-so-they-are-hidden-in-Vue-ren-27c6d73d365081fb8641feec010190df) by [Unito](https://www.unito.io) --------- Co-authored-by: github-actions <[email protected]>
1 parent 9d609d9 commit 6d677cc

File tree

22 files changed

+260
-9
lines changed

22 files changed

+260
-9
lines changed
Lines changed: 221 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,221 @@
1+
{
2+
"id": "e74f5af9-b886-4a21-abbf-ed535d12e2fb",
3+
"revision": 0,
4+
"last_node_id": 8,
5+
"last_link_id": 0,
6+
"nodes": [
7+
{
8+
"id": 1,
9+
"type": "LoadAudio",
10+
"pos": [
11+
41.52964782714844,
12+
16.930862426757812
13+
],
14+
"size": [
15+
444,
16+
125
17+
],
18+
"flags": {},
19+
"order": 0,
20+
"mode": 0,
21+
"inputs": [],
22+
"outputs": [
23+
{
24+
"name": "AUDIO",
25+
"type": "AUDIO",
26+
"links": null
27+
}
28+
],
29+
"properties": {
30+
"Node name for S&R": "LoadAudio"
31+
},
32+
"widgets_values": [
33+
null,
34+
null,
35+
""
36+
]
37+
},
38+
{
39+
"id": 2,
40+
"type": "LoadVideo",
41+
"pos": [
42+
502.28570556640625,
43+
16.857147216796875
44+
],
45+
"size": [
46+
444,
47+
525
48+
],
49+
"flags": {},
50+
"order": 1,
51+
"mode": 0,
52+
"inputs": [],
53+
"outputs": [
54+
{
55+
"name": "VIDEO",
56+
"type": "VIDEO",
57+
"links": null
58+
}
59+
],
60+
"properties": {
61+
"Node name for S&R": "LoadVideo"
62+
},
63+
"widgets_values": [
64+
"Dying for the right cause, is the most human thing we can do [sOBtQofXPDA].mp4",
65+
"image"
66+
]
67+
},
68+
{
69+
"id": 3,
70+
"type": "DevToolsLoadAnimatedImageTest",
71+
"pos": [
72+
41.71427917480469,
73+
188.0000457763672
74+
],
75+
"size": [
76+
444,
77+
553
78+
],
79+
"flags": {},
80+
"order": 2,
81+
"mode": 0,
82+
"inputs": [],
83+
"outputs": [
84+
{
85+
"name": "IMAGE",
86+
"type": "IMAGE",
87+
"links": null
88+
},
89+
{
90+
"name": "MASK",
91+
"type": "MASK",
92+
"links": null
93+
}
94+
],
95+
"properties": {
96+
"Node name for S&R": "DevToolsLoadAnimatedImageTest"
97+
},
98+
"widgets_values": [
99+
"l0isitzgugt41.webp",
100+
"image"
101+
]
102+
},
103+
{
104+
"id": 5,
105+
"type": "LoadImage",
106+
"pos": [
107+
958.285888671875,
108+
16.57145118713379
109+
],
110+
"size": [
111+
444,
112+
553
113+
],
114+
"flags": {},
115+
"order": 3,
116+
"mode": 0,
117+
"inputs": [],
118+
"outputs": [
119+
{
120+
"name": "IMAGE",
121+
"type": "IMAGE",
122+
"links": null
123+
},
124+
{
125+
"name": "MASK",
126+
"type": "MASK",
127+
"links": null
128+
}
129+
],
130+
"properties": {
131+
"Node name for S&R": "LoadImage"
132+
},
133+
"widgets_values": [
134+
"ComfyUI_00084_.png",
135+
"image"
136+
]
137+
},
138+
{
139+
"id": 6,
140+
"type": "LoadImageMask",
141+
"pos": [
142+
503.4285888671875,
143+
588
144+
],
145+
"size": [
146+
444,
147+
563
148+
],
149+
"flags": {},
150+
"order": 4,
151+
"mode": 0,
152+
"inputs": [],
153+
"outputs": [
154+
{
155+
"name": "MASK",
156+
"type": "MASK",
157+
"links": null
158+
}
159+
],
160+
"properties": {
161+
"Node name for S&R": "LoadImageMask"
162+
},
163+
"widgets_values": [
164+
"01. a lot.mp3",
165+
"alpha",
166+
"image"
167+
]
168+
},
169+
{
170+
"id": 7,
171+
"type": "LoadImageOutput",
172+
"pos": [
173+
965.1429443359375,
174+
612
175+
],
176+
"size": [
177+
444,
178+
553
179+
],
180+
"flags": {},
181+
"order": 5,
182+
"mode": 0,
183+
"inputs": [],
184+
"outputs": [
185+
{
186+
"name": "IMAGE",
187+
"type": "IMAGE",
188+
"links": null
189+
},
190+
{
191+
"name": "MASK",
192+
"type": "MASK",
193+
"links": null
194+
}
195+
],
196+
"properties": {
197+
"Node name for S&R": "LoadImageOutput"
198+
},
199+
"widgets_values": [
200+
"ComfyUI_00509_.png [output]",
201+
false,
202+
"refresh",
203+
"image"
204+
]
205+
}
206+
],
207+
"links": [],
208+
"groups": [],
209+
"config": {},
210+
"extra": {
211+
"ds": {
212+
"scale": 1,
213+
"offset": [
214+
0,
215+
0
216+
]
217+
},
218+
"frontendVersion": "1.28.3"
219+
},
220+
"version": 0.4
221+
}
736 Bytes
Loading
-3.38 KB
Loading
38 Bytes
Loading
128 Bytes
Loading
-2.83 KB
Loading
704 Bytes
Loading
882 Bytes
Loading
1010 Bytes
Loading
1.24 KB
Loading

0 commit comments

Comments
 (0)