mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-05-13 18:37:25 +08:00
Merge 85a189e225 into 8d5c12037f
This commit is contained in:
commit
a4602aec5a
@ -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) {
|
function normalizeContent(content) {
|
||||||
const tmp = document.createElement('div');
|
const tmp = document.createElement('div');
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
import { api } from "../../scripts/api.js";
|
import { api } from "../../scripts/api.js";
|
||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { $el, ComfyDialog } from "../../scripts/ui.js";
|
|
||||||
import {
|
import {
|
||||||
SUPPORTED_OUTPUT_NODE_TYPES,
|
SUPPORTED_OUTPUT_NODE_TYPES,
|
||||||
ShareDialog,
|
ShareDialog,
|
||||||
@ -22,6 +21,27 @@ import { ModelManager } from "./model-manager.js";
|
|||||||
import { SnapshotManager } from "./snapshot.js";
|
import { SnapshotManager } from "./snapshot.js";
|
||||||
import { buildGuiFrame, createSettingsCombo } from "./comfyui-gui-builder.js";
|
import { buildGuiFrame, createSettingsCombo } from "./comfyui-gui-builder.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js, button.js + buttonGroup.js warnings) ===
|
||||||
|
let $el, ComfyDialog, ComfyButton, ComfyButtonGroup;
|
||||||
|
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window?.comfyAPI?.button) {
|
||||||
|
ComfyButton = window.comfyAPI.button.ComfyButton;
|
||||||
|
} else {
|
||||||
|
ComfyButton = (await import("../../scripts/ui/components/button.js")).ComfyButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (window?.comfyAPI?.buttonGroup?.ComfyButtonGroup) {
|
||||||
|
ComfyButtonGroup = window.comfyAPI.buttonGroup.ComfyButtonGroup;
|
||||||
|
} else {
|
||||||
|
ComfyButtonGroup = (await import("../../scripts/ui/components/buttonGroup.js")).ComfyButtonGroup;
|
||||||
|
}
|
||||||
|
|
||||||
let manager_version = await getVersion();
|
let manager_version = await getVersion();
|
||||||
|
|
||||||
var docStyle = document.createElement('style');
|
var docStyle = document.createElement('style');
|
||||||
@ -1567,8 +1587,9 @@ app.registerExtension({
|
|||||||
try {
|
try {
|
||||||
// new style Manager buttons
|
// new style Manager buttons
|
||||||
// unload models button into new style Manager button
|
// unload models button into new style Manager button
|
||||||
let cmGroup = new (await import("../../scripts/ui/components/buttonGroup.js")).ComfyButtonGroup(
|
// Use hoisted ComfyButton + ComfyButtonGroup from shim at top of file
|
||||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
let cmGroup = new ComfyButtonGroup(
|
||||||
|
new ComfyButton({
|
||||||
icon: "puzzle",
|
icon: "puzzle",
|
||||||
action: () => {
|
action: () => {
|
||||||
if(!manager_instance)
|
if(!manager_instance)
|
||||||
@ -1579,7 +1600,7 @@ app.registerExtension({
|
|||||||
content: "Manager",
|
content: "Manager",
|
||||||
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
classList: "comfyui-button comfyui-menu-mobile-collapse primary"
|
||||||
}).element,
|
}).element,
|
||||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
new ComfyButton({
|
||||||
icon: "star",
|
icon: "star",
|
||||||
action: () => {
|
action: () => {
|
||||||
if(!manager_instance)
|
if(!manager_instance)
|
||||||
@ -1592,21 +1613,21 @@ app.registerExtension({
|
|||||||
},
|
},
|
||||||
tooltip: "Show favorite custom node list"
|
tooltip: "Show favorite custom node list"
|
||||||
}).element,
|
}).element,
|
||||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
new ComfyButton({
|
||||||
icon: "vacuum-outline",
|
icon: "vacuum-outline",
|
||||||
action: () => {
|
action: () => {
|
||||||
free_models();
|
free_models();
|
||||||
},
|
},
|
||||||
tooltip: "Unload Models"
|
tooltip: "Unload Models"
|
||||||
}).element,
|
}).element,
|
||||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
new ComfyButton({
|
||||||
icon: "vacuum",
|
icon: "vacuum",
|
||||||
action: () => {
|
action: () => {
|
||||||
free_models(true);
|
free_models(true);
|
||||||
},
|
},
|
||||||
tooltip: "Free model and node cache"
|
tooltip: "Free model and node cache"
|
||||||
}).element,
|
}).element,
|
||||||
new(await import("../../scripts/ui/components/button.js")).ComfyButton({
|
new ComfyButton({
|
||||||
icon: "share",
|
icon: "share",
|
||||||
action: () => {
|
action: () => {
|
||||||
if (share_option === 'openart') {
|
if (share_option === 'openart') {
|
||||||
|
|||||||
@ -1,11 +1,18 @@
|
|||||||
import { api } from "../../scripts/api.js";
|
import { api } from "../../scripts/api.js";
|
||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { $el, ComfyDialog } from "../../scripts/ui.js";
|
|
||||||
import { CopusShareDialog } from "./comfyui-share-copus.js";
|
import { CopusShareDialog } from "./comfyui-share-copus.js";
|
||||||
import { OpenArtShareDialog } from "./comfyui-share-openart.js";
|
import { OpenArtShareDialog } from "./comfyui-share-openart.js";
|
||||||
import { YouMLShareDialog } from "./comfyui-share-youml.js";
|
import { YouMLShareDialog } from "./comfyui-share-youml.js";
|
||||||
import { customAlert } from "./common.js";
|
import { customAlert } from "./common.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let $el, ComfyDialog;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
export const SUPPORTED_OUTPUT_NODE_TYPES = [
|
export const SUPPORTED_OUTPUT_NODE_TYPES = [
|
||||||
"PreviewImage",
|
"PreviewImage",
|
||||||
"SaveImage",
|
"SaveImage",
|
||||||
|
|||||||
@ -1,7 +1,14 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { $el, ComfyDialog } from "../../scripts/ui.js";
|
|
||||||
import { customAlert } from "./common.js";
|
import { customAlert } from "./common.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let $el, ComfyDialog;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
const env = "prod";
|
const env = "prod";
|
||||||
|
|
||||||
let DEFAULT_HOMEPAGE_URL = "https://copus.io";
|
let DEFAULT_HOMEPAGE_URL = "https://copus.io";
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
import {app} from "../../scripts/app.js";
|
import {app} from "../../scripts/app.js";
|
||||||
import {api} from "../../scripts/api.js";
|
import {api} from "../../scripts/api.js";
|
||||||
import {ComfyDialog, $el} from "../../scripts/ui.js";
|
|
||||||
import { customAlert } from "./common.js";
|
import { customAlert } from "./common.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let $el, ComfyDialog;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
const LOCAL_STORAGE_KEY = "openart_comfy_workflow_key";
|
const LOCAL_STORAGE_KEY = "openart_comfy_workflow_key";
|
||||||
const DEFAULT_HOMEPAGE_URL = "https://openart.ai/workflows/dev?developer=true";
|
const DEFAULT_HOMEPAGE_URL = "https://openart.ai/workflows/dev?developer=true";
|
||||||
//const DEFAULT_HOMEPAGE_URL = "http://localhost:8080/workflows/dev?developer=true";
|
//const DEFAULT_HOMEPAGE_URL = "http://localhost:8080/workflows/dev?developer=true";
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
import {app} from "../../scripts/app.js";
|
import {app} from "../../scripts/app.js";
|
||||||
import {api} from "../../scripts/api.js";
|
import {api} from "../../scripts/api.js";
|
||||||
import {ComfyDialog, $el} from "../../scripts/ui.js";
|
|
||||||
import { customAlert } from "./common.js";
|
import { customAlert } from "./common.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let $el, ComfyDialog;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
const BASE_URL = "https://youml.com";
|
const BASE_URL = "https://youml.com";
|
||||||
//const BASE_URL = "http://localhost:3000";
|
//const BASE_URL = "http://localhost:3000";
|
||||||
const DEFAULT_HOMEPAGE_URL = `${BASE_URL}/?from=comfyui`;
|
const DEFAULT_HOMEPAGE_URL = `${BASE_URL}/?from=comfyui`;
|
||||||
|
|||||||
@ -1,8 +1,15 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { api } from "../../scripts/api.js";
|
import { api } from "../../scripts/api.js";
|
||||||
import { $el, ComfyDialog } from "../../scripts/ui.js";
|
|
||||||
import { getBestPosition, getPositionStyle, getRect } from './popover-helper.js';
|
import { getBestPosition, getPositionStyle, getRect } from './popover-helper.js';
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let $el, ComfyDialog;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ $el, ComfyDialog } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ $el, ComfyDialog } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function internalCustomConfirm(message, confirmMessage, cancelMessage) {
|
function internalCustomConfirm(message, confirmMessage, cancelMessage) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
|
|||||||
@ -1,8 +1,22 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { api } from "../../scripts/api.js"
|
import { api } from "../../scripts/api.js"
|
||||||
import { sleep, show_message, customConfirm, customAlert } from "./common.js";
|
import { sleep, show_message, customConfirm, customAlert } from "./common.js";
|
||||||
import { GroupNodeConfig, GroupNodeHandler } from "../../extensions/core/groupNode.js";
|
|
||||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
// === SHIM FOR NEW COMFYUI (removes groupNode.js warning) ===
|
||||||
|
let GroupNodeConfig, GroupNodeHandler;
|
||||||
|
if (window?.comfyAPI?.groupNode) {
|
||||||
|
({ GroupNodeConfig, GroupNodeHandler } = window.comfyAPI.groupNode);
|
||||||
|
} else {
|
||||||
|
({ GroupNodeConfig, GroupNodeHandler } = await import("../../extensions/core/groupNode.js"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let ComfyDialog, $el;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ ComfyDialog, $el } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ ComfyDialog, $el } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
const SEPARATOR = ">"
|
const SEPARATOR = ">"
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
|
||||||
import { api } from "../../scripts/api.js";
|
import { api } from "../../scripts/api.js";
|
||||||
import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.js";
|
import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.js";
|
||||||
|
|
||||||
@ -14,6 +13,14 @@ import {
|
|||||||
// https://cenfun.github.io/turbogrid/api.html
|
// https://cenfun.github.io/turbogrid/api.html
|
||||||
import TG from "./turbogrid.esm.js";
|
import TG from "./turbogrid.esm.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let ComfyDialog, $el;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ ComfyDialog, $el } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ ComfyDialog, $el } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
loadCss("./custom-nodes-manager.css");
|
loadCss("./custom-nodes-manager.css");
|
||||||
|
|
||||||
const gridId = "node";
|
const gridId = "node";
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { $el } from "../../scripts/ui.js";
|
|
||||||
import {
|
import {
|
||||||
manager_instance, rebootAPI,
|
manager_instance, rebootAPI,
|
||||||
fetchData, md5, icons, show_message, customAlert, infoToast, showTerminal,
|
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 TG from "./turbogrid.esm.js";
|
||||||
import { buildGuiFrameCustomHeader, createSettingsCombo } from "./comfyui-gui-builder.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");
|
loadCss("./model-manager.css");
|
||||||
|
|
||||||
const gridId = "model";
|
const gridId = "model";
|
||||||
|
|||||||
@ -1,9 +1,16 @@
|
|||||||
import { app } from "../../scripts/app.js";
|
import { app } from "../../scripts/app.js";
|
||||||
import { api } from "../../scripts/api.js"
|
import { api } from "../../scripts/api.js"
|
||||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
|
||||||
import { manager_instance, rebootAPI, show_message, handle403Response, loadCss } from "./common.js";
|
import { manager_instance, rebootAPI, show_message, handle403Response, loadCss } from "./common.js";
|
||||||
import { buildGuiFrame } from "./comfyui-gui-builder.js";
|
import { buildGuiFrame } from "./comfyui-gui-builder.js";
|
||||||
|
|
||||||
|
// === SHIM FOR NEW COMFYUI (removes ui.js warning) ===
|
||||||
|
let ComfyDialog, $el;
|
||||||
|
if (window?.comfyAPI?.ui) {
|
||||||
|
({ ComfyDialog, $el } = window.comfyAPI.ui);
|
||||||
|
} else {
|
||||||
|
({ ComfyDialog, $el } = await import("../../scripts/ui.js"));
|
||||||
|
}
|
||||||
|
|
||||||
loadCss("./snapshot.css");
|
loadCss("./snapshot.css");
|
||||||
|
|
||||||
async function restore_snapshot(target) {
|
async function restore_snapshot(target) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user