diff --git a/web-plugin/index.js b/web-plugin/index.js
index ff01aa8..f3bef7f 100644
--- a/web-plugin/index.js
+++ b/web-plugin/index.js
@@ -50,11 +50,22 @@ const ext = {
})
.then(async (res) => {
const data = await res.json();
- const { workflow, error } = data;
+ const { workflow, workflow_id, error } = data;
if (error) {
infoDialog.showMessage("Unable to load this workflow", error);
return;
}
+
+ // Adding a delay to wait for the intial graph to load
+ await new Promise((resolve) => setTimeout(resolve, 2000));
+
+ workflow?.nodes.forEach((x) => {
+ if (x?.type === "ComfyDeploy") {
+ x.widgets_values[1] = workflow_id;
+ // x.widgets_values[2] = workflow_version.version;
+ }
+ });
+
/** @type {LGraph} */
app.loadGraphData(workflow);
})
@@ -682,16 +693,19 @@ export class ConfigDialog extends ComfyDialog {