Merge branch 'comfyanonymous:master' into feature/maskpainting

This commit is contained in:
ltdrdata 2023-05-01 11:53:41 +09:00 committed by GitHub
commit 2f943e6f23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1009,8 +1009,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 = [];
@ -1096,6 +1098,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];
}
}
}
} }
} }