diff --git a/js/comfyui-gui-builder.js b/js/comfyui-gui-builder.js index e6de81c6..c9da77a1 100644 --- a/js/comfyui-gui-builder.js +++ b/js/comfyui-gui-builder.js @@ -1,4 +1,9 @@ -import { $el } from "../../scripts/ui.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")); function normalizeContent(content) { const tmp = document.createElement('div'); @@ -224,4 +229,4 @@ export function buildGuiFrameCustomHeader(dialogId, customHeader, content, owner }); return dialog_mask; -} \ No newline at end of file +}