mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-02 19:49:58 +00:00
Add Comfy.Workflow.SortNodeIdOnSave setting (#502)
* Update litegraph (Sort order) * nit * Add sort node on save setting * nit
This commit is contained in:
@@ -1925,7 +1925,10 @@ export class ComfyApp {
|
||||
|
||||
// Save current workflow automatically
|
||||
setInterval(() => {
|
||||
const workflow = JSON.stringify(this.graph.serialize())
|
||||
const sortNodes =
|
||||
this.vueAppReady &&
|
||||
useSettingStore().get('Comfy.Workflow.SortNodeIdOnSave')
|
||||
const workflow = JSON.stringify(this.graph.serialize({ sortNodes }))
|
||||
localStorage.setItem('workflow', workflow)
|
||||
if (api.clientId) {
|
||||
sessionStorage.setItem(`workflow:${api.clientId}`, workflow)
|
||||
@@ -2396,7 +2399,10 @@ export class ComfyApp {
|
||||
}
|
||||
}
|
||||
|
||||
const workflow = graph.serialize()
|
||||
const sortNodes =
|
||||
this.vueAppReady &&
|
||||
useSettingStore().get('Comfy.Workflow.SortNodeIdOnSave')
|
||||
const workflow = graph.serialize({ sortNodes })
|
||||
const output = {}
|
||||
// Process nodes in order of execution
|
||||
for (const outerNode of graph.computeExecutionOrder(false)) {
|
||||
|
||||
Reference in New Issue
Block a user