Revert "Beta UI by pythongosssss (#70)" (#72)

This reverts commit 0d084e2cb0.
This commit is contained in:
Chenlei Hu
2024-07-01 12:58:45 -04:00
committed by GitHub
parent 0d084e2cb0
commit b69f15e5d7
37 changed files with 470 additions and 4135 deletions

View File

@@ -64,10 +64,6 @@ const comfyBaseSchema = z.object({
["border-color"]: z.string(),
["tr-even-bg-color"]: z.string(),
["tr-odd-bg-color"]: z.string(),
["content-bg"]: z.string(),
["content-fg"]: z.string(),
["content-hover-bg"]: z.string(),
["content-hover-fg"]: z.string(),
});
const colorsSchema = z.object({

23
src/types/comfy.d.ts vendored
View File

@@ -1,4 +1,4 @@
import { LGraphNode, IWidget } from "./litegraph";
import { LGraphNode, IWidget, LGraph } from "./litegraph";
import { ComfyApp } from "../../scripts/app";
export interface ComfyExtension {
@@ -10,24 +10,24 @@ export interface ComfyExtension {
* Allows any initialisation, e.g. loading resources. Called after the canvas is created but before nodes are added
* @param app The ComfyUI app instance
*/
init?(app: ComfyApp): Promise<void>;
init(app: ComfyApp): Promise<void>;
/**
* Allows any additonal setup, called after the application is fully set up and running
* @param app The ComfyUI app instance
*/
setup?(app: ComfyApp): Promise<void>;
setup(app: ComfyApp): Promise<void>;
/**
* Called before nodes are registered with the graph
* @param defs The collection of node definitions, add custom ones or edit existing ones
* @param app The ComfyUI app instance
*/
addCustomNodeDefs?(defs: Record<string, ComfyObjectInfo>, app: ComfyApp): Promise<void>;
addCustomNodeDefs(defs: Record<string, ComfyObjectInfo>, app: ComfyApp): Promise<void>;
/**
* Allows the extension to add custom widgets
* @param app The ComfyUI app instance
* @returns An array of {[widget name]: widget data}
*/
getCustomWidgets?(
getCustomWidgets(
app: ComfyApp
): Promise<
Record<string, (node, inputName, inputData, app) => { widget?: IWidget; minWidth?: number; minHeight?: number }>
@@ -38,12 +38,12 @@ export interface ComfyExtension {
* @param nodeData The original node object info config object
* @param app The ComfyUI app instance
*/
beforeRegisterNodeDef?(nodeType: typeof LGraphNode, nodeData: ComfyObjectInfo, app: ComfyApp): Promise<void>;
beforeRegisterNodeDef(nodeType: typeof LGraphNode, nodeData: ComfyObjectInfo, app: ComfyApp): Promise<void>;
/**
* Allows the extension to register additional nodes with LGraph after standard nodes are added
* @param app The ComfyUI app instance
*/
registerCustomNodes?(app: ComfyApp): Promise<void>;
registerCustomNodes(app: ComfyApp): Promise<void>;
/**
* Allows the extension to modify a node that has been reloaded onto the graph.
* If you break something in the backend and want to patch workflows in the frontend
@@ -51,13 +51,13 @@ export interface ComfyExtension {
* @param node The node that has been loaded
* @param app The ComfyUI app instance
*/
loadedGraphNode?(node: LGraphNode, app: ComfyApp);
loadedGraphNode(node: LGraphNode, app: ComfyApp);
/**
* Allows the extension to run code after the constructor of the node
* @param node The node that has been created
* @param app The ComfyUI app instance
*/
nodeCreated?(node: LGraphNode, app: ComfyApp);
nodeCreated(node: LGraphNode, app: ComfyApp);
}
export type ComfyObjectInfo = {
@@ -74,3 +74,8 @@ export type ComfyObjectInfo = {
};
export type ComfyObjectInfoConfig = [string | any[]] | [string | any[], any];
declare global {
const app: ComfyApp;
const graph: LGraph;
}