Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
39308487
Commit
39308487
authored
Mar 28, 2023
by
Farid Safi
Browse files
clean state when loading another workflow
parent
31dd6c05
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
web/scripts/app.js
web/scripts/app.js
+7
-0
web/scripts/ui.js
web/scripts/ui.js
+9
-2
No files found.
web/scripts/app.js
View file @
39308487
...
...
@@ -903,6 +903,13 @@ class ComfyApp {
}
}
}
/**
* Clean current state
*/
clean
()
{
this
.
nodeOutputs
=
{};
}
}
export
const
app
=
new
ComfyApp
();
web/scripts/ui.js
View file @
39308487
...
...
@@ -306,6 +306,7 @@ export class ComfyUI {
style
:
{
display
:
"
none
"
},
parent
:
document
.
body
,
onchange
:
()
=>
{
app
.
clean
();
app
.
handleFile
(
fileInput
.
files
[
0
]);
},
});
...
...
@@ -388,8 +389,14 @@ export class ComfyUI {
}),
$el
(
"
button
"
,
{
textContent
:
"
Load
"
,
onclick
:
()
=>
fileInput
.
click
()
}),
$el
(
"
button
"
,
{
textContent
:
"
Refresh
"
,
onclick
:
()
=>
app
.
refreshComboInNodes
()
}),
$el
(
"
button
"
,
{
textContent
:
"
Clear
"
,
onclick
:
()
=>
app
.
graph
.
clear
()
}),
$el
(
"
button
"
,
{
textContent
:
"
Load Default
"
,
onclick
:
()
=>
app
.
loadGraphData
()
}),
$el
(
"
button
"
,
{
textContent
:
"
Clear
"
,
onclick
:
()
=>
{
app
.
clean
();
app
.
graph
.
clear
();
}}),
$el
(
"
button
"
,
{
textContent
:
"
Load Default
"
,
onclick
:
()
=>
{
app
.
clean
();
app
.
loadGraphData
();
}}),
]);
dragElement
(
this
.
menuContainer
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment