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
b04e16ef
Commit
b04e16ef
authored
Apr 30, 2023
by
comfyanonymous
Browse files
Make default workflow use an existing checkpoint if no SD1.5 checkpoint.
parent
0aa667ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
web/scripts/app.js
web/scripts/app.js
+9
-0
No files found.
web/scripts/app.js
View file @
b04e16ef
...
@@ -971,8 +971,10 @@ export class ComfyApp {
...
@@ -971,8 +971,10 @@ export class ComfyApp {
loadGraphData
(
graphData
)
{
loadGraphData
(
graphData
)
{
this
.
clean
();
this
.
clean
();
let
reset_invalid_values
=
false
;
if
(
!
graphData
)
{
if
(
!
graphData
)
{
graphData
=
structuredClone
(
defaultGraph
);
graphData
=
structuredClone
(
defaultGraph
);
reset_invalid_values
=
true
;
}
}
const
missingNodeTypes
=
[];
const
missingNodeTypes
=
[];
...
@@ -1058,6 +1060,13 @@ export class ComfyApp {
...
@@ -1058,6 +1060,13 @@ export class ComfyApp {
}
}
}
}
}
}
if
(
reset_invalid_values
)
{
if
(
widget
.
type
==
"
combo
"
)
{
if
(
!
widget
.
options
.
values
.
includes
(
widget
.
value
)
&&
widget
.
options
.
values
.
length
>
0
)
{
widget
.
value
=
widget
.
options
.
values
[
0
];
}
}
}
}
}
}
}
...
...
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