From edb0918fb8182cf9ef1dd8055c571d2ebfbbc3a0 Mon Sep 17 00:00:00 2001 From: TokenSpender Date: Sun, 3 May 2026 07:11:17 -0400 Subject: [PATCH] Fix deprecated ui.js import in model-manager.js --- js/model-manager.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/model-manager.js b/js/model-manager.js index d01c5399..db0e16b3 100644 --- a/js/model-manager.js +++ b/js/model-manager.js @@ -1,5 +1,4 @@ import { app } from "../../scripts/app.js"; -import { $el } from "../../scripts/ui.js"; import { manager_instance, rebootAPI, fetchData, md5, icons, show_message, customAlert, infoToast, showTerminal, @@ -11,6 +10,14 @@ import { api } from "../../scripts/api.js"; import TG from "./turbogrid.esm.js"; import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.js"; +// === SHIM FOR NEW COMFYUI (removes ui.js warning) === +let $el; +if (window?.comfyAPI?.ui) { + ({ $el } = window.comfyAPI.ui); +} else { + ({ $el } = await import("../../scripts/ui.js")); +} + loadCss("./model-manager.css"); const gridId = "model";