mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-25 15:55:18 +00:00
jankyness fix : do not wait for the server response to restore prompt
This commit is contained in:
parent
f6df7ce075
commit
e7d664c137
@ -418,10 +418,6 @@ function promptPosted(data)
|
|||||||
wid.to_randomize.value = Math.floor(Math.random() * 1125899906842624);
|
wid.to_randomize.value = Math.floor(Math.random() * 1125899906842624);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// restore initial values replaced by dynamic prompting
|
|
||||||
if (wid.dynamic_prompt && wid.dynamic_prompt === true)
|
|
||||||
wid.value = wid.value_initial;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -451,6 +447,16 @@ function postPrompt(number) {
|
|||||||
|
|
||||||
// console.log(JSON.stringify(prompt));
|
// console.log(JSON.stringify(prompt));
|
||||||
// console.log(JSON.stringify(graph.serialize()));
|
// console.log(JSON.stringify(graph.serialize()));
|
||||||
|
|
||||||
|
// restore initial values replaced by dynamic prompting
|
||||||
|
for (let x in graph._nodes_by_id) {
|
||||||
|
let n = graph._nodes_by_id[x];
|
||||||
|
for (let w in n.widgets) {
|
||||||
|
let wid = n.widgets[w];
|
||||||
|
if (wid.dynamic_prompt && wid.dynamic_prompt === true)
|
||||||
|
wid.value = wid.value_initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user