mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
Make default workflow use an existing checkpoint if no SD1.5 checkpoint.
This commit is contained in:
parent
0aa667ed33
commit
b04e16ef5a
@ -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 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user