Compare commits

..
Author SHA1 Message Date
EmmanuelMr18 bcd9ab40d3 fix(setup): reload the app after adding the localstorage values
The current problem is that if you do `localsStorage.setItem()` the
value is changed, but comfyUI doesn't detect the change because
`ComfyActionbar` was already mounted.

This is a quick fix where we basically trigger a reload of the app
after docking the menu position.
2024-12-17 02:04:09 -06:00
2 changed files with 10 additions and 9 deletions
+9 -9
View File
@@ -1280,7 +1280,7 @@ async def send_json_override(self, event, data, sid=None):
if prompt_id in prompt_metadata:
prompt_metadata[prompt_id].start_time = time.perf_counter()
asyncio.create_task(update_run(prompt_id, Status.RUNNING))
await update_run(prompt_id, Status.RUNNING)
if event == "executing" and data and CURRENT_START_EXECUTION_DATA:
@@ -1320,10 +1320,10 @@ async def send_json_override(self, event, data, sid=None):
])
prompt_id = data.get("prompt_id")
asyncio.create_task(update_run_with_output(
await update_run_with_output(
prompt_id,
node_execution_array, # Send the array instead of the OrderedDict
))
)
print(node_execution_array)
@@ -1342,11 +1342,11 @@ async def send_json_override(self, event, data, sid=None):
if prompt_metadata[prompt_id].start_time is not None:
elapsed_time = current_time - prompt_metadata[prompt_id].start_time
logger.info(f"Elapsed time: {elapsed_time} seconds")
asyncio.create_task(send(
await send(
"elapsed_time",
{"prompt_id": prompt_id, "elapsed_time": elapsed_time},
sid=sid,
))
)
if event == "executing" and data.get("node") is not None:
node = data.get("node")
@@ -1370,7 +1370,7 @@ async def send_json_override(self, event, data, sid=None):
prompt_metadata[prompt_id].last_updated_node = node
class_type = prompt_metadata[prompt_id].workflow_api[node]["class_type"]
logger.info(f"At: {round(calculated_progress * 100)}% - {class_type}")
asyncio.create_task(send(
await send(
"live_status",
{
"prompt_id": prompt_id,
@@ -1378,10 +1378,10 @@ async def send_json_override(self, event, data, sid=None):
"progress": calculated_progress,
},
sid=sid,
))
asyncio.create_task(update_run_live_status(
)
await update_run_live_status(
prompt_id, "Executing " + class_type, calculated_progress
))
)
if event == "execution_cached" and data.get("nodes") is not None:
if prompt_id in prompt_metadata:
+1
View File
@@ -755,6 +755,7 @@ const ext = {
"right",
);
localStorage.setItem("Comfy.MenuPosition.Docked", "true");
window.location.reload();
console.log("native mode manmanman");
} catch (error) {
console.error("Error setting validation to false", error);