From ea34d753c1e9283d79230b9b2ae11bbdbf0bf96c Mon Sep 17 00:00:00 2001 From: Will Miao <13051207myq@gmail.com> Date: Fri, 18 Apr 2025 21:52:26 +0800 Subject: [PATCH] refactor: Remove unnecessary workflow data logging and streamline saveRecipeDirectly function for legacy loras widget --- web/comfyui/legacy_loras_widget.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/web/comfyui/legacy_loras_widget.js b/web/comfyui/legacy_loras_widget.js index 6b05e35d..bec337da 100644 --- a/web/comfyui/legacy_loras_widget.js +++ b/web/comfyui/legacy_loras_widget.js @@ -927,10 +927,6 @@ export function addLorasWidget(node, name, opts, callback) { // Function to directly save the recipe without dialog async function saveRecipeDirectly(widget) { try { - // Get the workflow data from the ComfyUI app - const prompt = await app.graphToPrompt(); - console.log('Prompt:', prompt); - // Show loading toast if (app && app.extensionManager && app.extensionManager.toast) { app.extensionManager.toast.add({ @@ -941,14 +937,9 @@ async function saveRecipeDirectly(widget) { }); } - // Prepare the data - only send workflow JSON - const formData = new FormData(); - formData.append('workflow_json', JSON.stringify(prompt.output)); - // Send the request const response = await fetch('/api/recipes/save-from-widget', { - method: 'POST', - body: formData + method: 'POST' }); const result = await response.json();