bizydraft 0.2.52__py3-none-any.whl → 0.2.53__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of bizydraft might be problematic. Click here for more details.
- bizydraft/static/js/postEvent.js +26 -25
- {bizydraft-0.2.52.dist-info → bizydraft-0.2.53.dist-info}/METADATA +1 -1
- {bizydraft-0.2.52.dist-info → bizydraft-0.2.53.dist-info}/RECORD +5 -5
- {bizydraft-0.2.52.dist-info → bizydraft-0.2.53.dist-info}/WHEEL +0 -0
- {bizydraft-0.2.52.dist-info → bizydraft-0.2.53.dist-info}/top_level.txt +0 -0
bizydraft/static/js/postEvent.js
CHANGED
|
@@ -519,21 +519,31 @@ app.registerExtension({
|
|
|
519
519
|
}, '*');
|
|
520
520
|
return graph.workflow;
|
|
521
521
|
},
|
|
522
|
+
getWorkflowNotSave: async function () {
|
|
523
|
+
const graph = await app.graphToPrompt();
|
|
524
|
+
// 规范化工作流,移除不影响逻辑的视觉字段,避免颜色等样式变化影响校验
|
|
525
|
+
const normalizeWorkflow = (workflow) => {
|
|
526
|
+
const json = JSON.stringify(workflow, (key, value) => {
|
|
527
|
+
if (key === 'color' || key === 'bgcolor' || key === 'extra') return undefined;
|
|
528
|
+
return value;
|
|
529
|
+
});
|
|
530
|
+
return JSON.parse(json);
|
|
531
|
+
};
|
|
532
|
+
const normalized = normalizeWorkflow(graph.workflow);
|
|
533
|
+
window.parent.postMessage({
|
|
534
|
+
type: 'functionResult',
|
|
535
|
+
method: 'getWorkflowNotSave',
|
|
536
|
+
result: normalized
|
|
537
|
+
}, '*');
|
|
538
|
+
return normalized;
|
|
539
|
+
},
|
|
522
540
|
// 新增:获取 workflow 和 output
|
|
523
541
|
getWorkflowWithOutput: async function () {
|
|
524
542
|
const graph = await app.graphToPrompt();
|
|
525
|
-
graph.
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
graph.output[key]._meta = {};
|
|
530
|
-
}
|
|
531
|
-
graph.output[key]._meta.id = node.id;
|
|
532
|
-
graph.output[key]._meta.class_type = graph.output[key].class_type;
|
|
533
|
-
break; // 找到匹配的就跳出循环
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
});
|
|
543
|
+
for (const key in graph.output) {
|
|
544
|
+
graph.output[key]._meta.id = Number(key);
|
|
545
|
+
graph.output[key]._meta.class_type =graph.output[key].class_type
|
|
546
|
+
}
|
|
537
547
|
window.parent.postMessage({
|
|
538
548
|
type: 'functionResult',
|
|
539
549
|
method: 'getWorkflowWithOutput',
|
|
@@ -613,19 +623,10 @@ app.registerExtension({
|
|
|
613
623
|
}
|
|
614
624
|
|
|
615
625
|
if (Object.keys(resPromptJson.node_errors).length) return
|
|
616
|
-
graph.
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
graph.output[key]._meta = {};
|
|
621
|
-
}
|
|
622
|
-
graph.output[key]._meta.id = node.id;
|
|
623
|
-
graph.output[key]._meta.class_type = graph.output[key].class_type;
|
|
624
|
-
break; // 找到匹配的就跳出循环
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
});
|
|
628
|
-
|
|
626
|
+
for (const key in graph.output) {
|
|
627
|
+
graph.output[key]._meta.id = Number(key);
|
|
628
|
+
graph.output[key]._meta.class_type = graph.output[key].class_type;
|
|
629
|
+
}
|
|
629
630
|
for (let i in graph.output) {
|
|
630
631
|
if (graph.output[i].class_type == 'LoadImage') {
|
|
631
632
|
graph.output[i].inputs.image = graph.output[i].inputs.image.replace('pasted/http', 'http')
|
|
@@ -18,11 +18,11 @@ bizydraft/static/js/hookLoadModel.js,sha256=ovNvz4FRYNcOKJTueotugzIeGQDYAivYB5EQ
|
|
|
18
18
|
bizydraft/static/js/main.js,sha256=oEsVEUZSo8ipx93oqs2WFQSRgp46XQ_D-Xao-wen2S8,121
|
|
19
19
|
bizydraft/static/js/nodeFocusHandler.js,sha256=24xXbS4Q-GjJdRqf11i-1pBo8MkOJ24F7MHFV44EG6Q,4683
|
|
20
20
|
bizydraft/static/js/nodeParamsFilter.js,sha256=H7lBB0G8HNqoGhOCH1hNXqPU-rPlrFyTxg_f_JgLEMk,4168
|
|
21
|
-
bizydraft/static/js/postEvent.js,sha256=
|
|
21
|
+
bizydraft/static/js/postEvent.js,sha256=met19YcUlC8ttKQl9tHJ66NnfltBeOeq28TZBmIGhlM,39249
|
|
22
22
|
bizydraft/static/js/socket.js,sha256=VE3fTAgEfM0FZhL526Skt7OCRokOa3mzTCAjAomI_tE,2432
|
|
23
23
|
bizydraft/static/js/tool.js,sha256=VupamUuh7tYiDnBTrL5Z_yLmhJinskhzRXwE3zfsKZM,2901
|
|
24
24
|
bizydraft/static/js/uploadFile.js,sha256=WvglKzHMeOzDhOH3P-fLcPHxCLbKOJpo4DntoRxeJtI,4908
|
|
25
|
-
bizydraft-0.2.
|
|
26
|
-
bizydraft-0.2.
|
|
27
|
-
bizydraft-0.2.
|
|
28
|
-
bizydraft-0.2.
|
|
25
|
+
bizydraft-0.2.53.dist-info/METADATA,sha256=-ZSjsUBtmMEJL52o9Io5S_MO8kcwqhjZBxKGyy36rjw,162
|
|
26
|
+
bizydraft-0.2.53.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
27
|
+
bizydraft-0.2.53.dist-info/top_level.txt,sha256=XtoBq6hjZhXIM7aas4GtPDtAiKo8FdLzMABXW8qqQ8M,10
|
|
28
|
+
bizydraft-0.2.53.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|