From b09defd1e4f7f6fe0e2ead852f2686194ad13d02 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 12 Jul 2024 22:10:54 +0800 Subject: [PATCH 01/23] bugfix inputs --- .../context-menu-item-change-input.tsx | 17 ++++++++++------- .../reactflow-context-menu.tsx | 6 +++++- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/context-menu-item-change-input.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/context-menu-item-change-input.tsx index 0c70ddfa..21e637d4 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/context-menu-item-change-input.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/context-menu-item-change-input.tsx @@ -17,11 +17,14 @@ const ChangeInputMenuItem = (props: NodeMenuProps) => { const currentInputs = node.inputs || []; const arr: InputArray = []; const inputKeys = currentInputs.map(input => input.name); - for (const [property, input] of Object.entries(widget.input.required)) { + for (const [property, input] of Object.entries({ + ...(widget.input.required || {}), + ...(widget.input.optional || {}) + })) { const type = Input.getTypeName(input); if (!Input.isParameterOrList(input)) { - arr.push({ - property, + arr.push({ + property, type, disabled: true, enable: true @@ -60,10 +63,10 @@ const ChangeInputMenuItem = (props: NodeMenuProps) => { const handleInputChange = useCallback((property: string, enable: boolean) => { const newInputItems = [...inputItems]; const index = newInputItems.findIndex(item => item.property === property); - if (index) { + if (index > -1) { newInputItems[index].enable = enable; setInputItems(newInputItems); - const inputs = newInputItems.filter(item => item.enable).map(item => ({name: item.property, type: item.type})); + const inputs = newInputItems.filter(item => item.enable).map(item => ({ name: item.property, type: item.type })); onNodeAttributeChange(props.id, { inputs }); } setTimeout(() => { @@ -84,7 +87,7 @@ const ChangeInputMenuItem = (props: NodeMenuProps) => {
{ handleInputChange(item.property, val); - }}/> + }} />
) @@ -103,7 +106,7 @@ const ChangeInputMenuItem = (props: NodeMenuProps) => { placement='right' onOpenChange={handleVisibleChange} > -
Convert to input
+
Convert to input
); }; diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/reactflow-context-menu.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/reactflow-context-menu.tsx index 3a953589..49e9e508 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/reactflow-context-menu.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-context-menu/reactflow-context-menu.tsx @@ -137,7 +137,11 @@ function NodeMenu(props: NodeMenuProps) { } }; - const hasInputs = node.inputs && node.inputs.length > 0; + const hasInputs = Object.keys({ + ...(widget.input.required || {}), + ...(widget.input.optional || {}), + }).length > 0; + const items: MenuItem[] = [ getMenuItem(
Duplicate
, 'MENU_ITEM_DUPLICATE_NODE', null, null), getMenuItem((), 'MENU_ITEM_CHANGE_TITLE', null, null), From 440c91304641fe3c10d1623150eab78891508a13 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 12 Jul 2024 23:29:02 +0800 Subject: [PATCH 02/23] add custom python config --- .../src/components/bootstrap/setup-config.tsx | 60 ++++++++++++----- apps/node/src/app.ts | 2 +- apps/node/src/modules/comfyui/bootstrap.ts | 3 + apps/node/src/modules/utils/conda.ts | 10 ++- apps/node/src/routes/api/bootstrap.ts | 7 ++ packages/common/store/dashboard-state.ts | 66 ++++++++++--------- .../common/types/comflowy-bootstrap.types.ts | 7 +- 7 files changed, 102 insertions(+), 53 deletions(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 0e03d6a9..785a88b3 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -16,6 +16,8 @@ export function SetupConfig() { const [selectedIfInstalledComfyUI, setSelectedIfInstalledComfyUI] = useState(false); const [installedComfyUI, setInstalledComfyUI] = useState(false); + const [pythonPath, setPythonPath] = useState(""); + useEffect(() => { track('bootstrap-setup-config'); trackNewUser(); @@ -48,6 +50,17 @@ export function SetupConfig() { } }, []); + const selectPythonPath = useCallback(async () => { + try { + const ret = await comfyElectronApi.selectDirectory("file"); + const pythonPath = ret[0]; + setPythonPath(pythonPath); + } catch (err) { + console.log(err); + message.error(err); + } + }, []); + const useDefaultFolder = useCallback(() => { setValue(defaultValue); }, [value, defaultValue]); @@ -55,10 +68,22 @@ export function SetupConfig() { const [loading, setLoading] = useState(false); const saveValue = useCallback(async () => { + if (value.trim() === "") { + message.error("Please select comfyui folder"); + return; + } + + if (selectedIfInstalledComfyUI && pythonPath.trim() === "") { + message.error("Please select python path"); + return; + } + const config = { comfyUIDir: value.trim(), + pythonPath: pythonPath.trim(), stableDiffusionDir: sdwebuiPath.trim() }; + const api = getBackendUrl('/api/setup_config'); try { setLoading(true); @@ -93,7 +118,7 @@ export function SetupConfig() { message.error(err); } setLoading(false); - }, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI]); + }, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI, pythonPath]); if (!selectedIfInstalledComfyUI) { return ( @@ -161,6 +186,21 @@ export function SetupConfig() { +
+
Select python path
+
+ Select the python enviroment to reuse packages installed for comfyui +
+
+ +
+ + {electronEnv && } + +
+
) -} - -/* -
-
SD WebUI Path:
-
- If Stable Diffusion WebUI is already installed, you can opt for the SD path to utilize existing models -
-
- -
- - {electronEnv && } - -
*/ \ No newline at end of file +} \ No newline at end of file diff --git a/apps/node/src/app.ts b/apps/node/src/app.ts index 0d48483c..1c5303ec 100644 --- a/apps/node/src/app.ts +++ b/apps/node/src/app.ts @@ -94,7 +94,7 @@ export async function startAppServer(params: { ComflowyConsole.serve(app, server, wss); channelService.serve(app, server, wss); server.listen(port, () => { - logger.info(`Server is running at http://localhost:${port}`); + console.log(`Server is running at http://localhost:${port}`); }); setTimeout(() => { diff --git a/apps/node/src/modules/comfyui/bootstrap.ts b/apps/node/src/modules/comfyui/bootstrap.ts index d92a9bcc..3c7d26bf 100644 --- a/apps/node/src/modules/comfyui/bootstrap.ts +++ b/apps/node/src/modules/comfyui/bootstrap.ts @@ -26,9 +26,11 @@ export async function checkBasicRequirements() { isTorchInstalled = false, isComfyUIInstalled = false, isComfyUIStarted = false, + isCustomComfyEnv = false, isGitInstalled = false; if (isSetupedConfig) { isComfyUIInstalled = await checkIfInstalledComfyUI(); + isCustomComfyEnv = appConfigManager.get(CONFIG_KEYS.appSetupConfig)?.isCustomComfyEnv ?? false; /** * if user delete ComfyUI, user should re-setup the config */ @@ -48,6 +50,7 @@ export async function checkBasicRequirements() { return { isCondaInstalled, isPythonInstalled, + isCustomComfyEnv, isGitInstalled, isTorchInstalled, isComfyUIInstalled, diff --git a/apps/node/src/modules/utils/conda.ts b/apps/node/src/modules/utils/conda.ts index cd521e05..ddb2bccb 100644 --- a/apps/node/src/modules/utils/conda.ts +++ b/apps/node/src/modules/utils/conda.ts @@ -1,7 +1,7 @@ import { execSync } from "child_process"; import { OS_HOME_DIRECTORY, SHELL_ENV_PATH, getSystemPath, isWindows } from "./env"; import path from "path"; -import { CONDA_ENV_NAME } from "../config-manager"; +import { CONDA_ENV_NAME, CONFIG_KEYS, appConfigManager } from "../config-manager"; import logger from "./logger"; export const DEFAULT_CONDA_PATH = isWindows ? 'C:\\tools\\Miniconda3' : `${OS_HOME_DIRECTORY}/miniconda3`; @@ -34,10 +34,18 @@ class Conda { * Init conda env */ updateCondaInfo () { + // 如果有配置本地自定义的 python 环境,那么就简单设置 PYTHON 和 PIP 就好 this.info = getCondaInfo(); this.env = getCondaEnv(CONDA_ENV_NAME, this.info!); console.log("env", this.info, this.env); logger.info("update conda info" + JSON.stringify(this.info) + JSON.stringify(this.env)); + + const {pythonPath} = appConfigManager.getSetupConfig(); + if (pythonPath && pythonPath !== "") { + logger.info("use custom env python: ", pythonPath) + this.env!.PYTHON_PATH = pythonPath; + this.env!.PIP_PATH = `${pythonPath} -m pip`; + } } getCondaPaths(): CondaInfo & CondaEnvInfo { diff --git a/apps/node/src/routes/api/bootstrap.ts b/apps/node/src/routes/api/bootstrap.ts index 591bcaf0..f090fee6 100644 --- a/apps/node/src/routes/api/bootstrap.ts +++ b/apps/node/src/routes/api/bootstrap.ts @@ -22,6 +22,7 @@ import { modelManager } from 'src/modules/model-manager/model-manager'; */ export async function ApiEnvCheck(req: Request, res: Response) { try { + logger.info("start env check") const requirements = await checkBasicRequirements() res.send({ success: true, @@ -233,10 +234,16 @@ export async function ApiSetupConfig(req: Request, res: Response) { const setupString = JSON.stringify({ comfyUIDir: comfyUIPath, + pythonPath: data.pythonPath || undefined, + isCustomComfyEnv: !!data.pythonPath, stableDiffusionDir: stableDiffusionPath }); appConfigManager.set(CONFIG_KEYS.appSetupConfig, setupString); + + // if (data.pythonPath) { + // conda.updateCondaInfo(); + // } res.send({ success: true, diff --git a/packages/common/store/dashboard-state.ts b/packages/common/store/dashboard-state.ts index 4c35d39d..66d510b5 100644 --- a/packages/common/store/dashboard-state.ts +++ b/packages/common/store/dashboard-state.ts @@ -1,6 +1,7 @@ import { getComflowyAppConfig, getComfyUIEnvRequirements } from "../comfyui-bridge/bridge"; import { create } from "zustand"; import { AppConfigs, BootstrapError, ComfyUIRunFPMode, ComfyUIRunVAEMode, EnvRequirements } from "../types"; +import { isCustomModelField } from "../types/model.types"; type DashboardState = { loading: boolean; @@ -101,40 +102,43 @@ function checkEnvRequirements(env: EnvRequirements): BootstrapTask[] { const tasks: BootstrapTask[] = []; tasks.push({ type: BootStrapTaskType.setupConfig, - title: "Setup", + title: "Setup", description: "Considering network issue, you can setup a http_proxy url", finished: env.isSetupedConfig, }); - tasks.push({ - type: BootStrapTaskType.installConda, - title: "Install Conda", - description: "We use conda to manage python enviroment for comfyUI", - finished: env.isCondaInstalled - }); - tasks.push({ - type: BootStrapTaskType.installPython, - title: "Create Conda venv", - description: "ComfyUI need a safe and proper python enviroment to run. We will use conda to create virtual env called comflowy to manage your python & pip packages", - finished: env.isPythonInstalled - }); - tasks.push({ - type: BootStrapTaskType.installGit, - title: "Install Git", - description: "ComfyUI need a safe and proper git enviroment to run. We will use git to manage your git repository", - finished: env.isGitInstalled - }); - tasks.push({ - type: BootStrapTaskType.installTorch, - title: "Install Torch", - description: "ComfyUI need a safe and proper torch enviroment to run. We will use torch to manage your torch model", - finished: env.isTorchInstalled - }); - tasks.push({ - type: BootStrapTaskType.installComfyUI, - title: "Install ComfyUI", - description: "ComfyUI need a safe and proper comfyUI enviroment to run. We will use comfyUI to manage your comfyUI model", - finished: env.isComfyUIInstalled - }); + if (!env.isCustomComfyEnv) { + tasks.push({ + type: BootStrapTaskType.installConda, + title: "Install Conda", + description: "We use conda to manage python enviroment for comfyUI", + finished: env.isCondaInstalled + }); + tasks.push({ + type: BootStrapTaskType.installPython, + title: "Create Conda venv", + description: "ComfyUI need a safe and proper python enviroment to run. We will use conda to create virtual env called comflowy to manage your python & pip packages", + finished: env.isPythonInstalled + }); + tasks.push({ + type: BootStrapTaskType.installGit, + title: "Install Git", + description: "ComfyUI need a safe and proper git enviroment to run. We will use git to manage your git repository", + finished: env.isGitInstalled + }); + tasks.push({ + type: BootStrapTaskType.installTorch, + title: "Install Torch", + description: "ComfyUI need a safe and proper torch enviroment to run. We will use torch to manage your torch model", + finished: env.isTorchInstalled + }); + tasks.push({ + type: BootStrapTaskType.installComfyUI, + title: "Install ComfyUI", + description: "ComfyUI need a safe and proper comfyUI enviroment to run. We will use comfyUI to manage your comfyUI model", + finished: env.isComfyUIInstalled + }); + } + tasks.push({ type: BootStrapTaskType.installBasicModel, title: "Install Basic Model", diff --git a/packages/common/types/comflowy-bootstrap.types.ts b/packages/common/types/comflowy-bootstrap.types.ts index 49b2e29c..b6572bfc 100644 --- a/packages/common/types/comflowy-bootstrap.types.ts +++ b/packages/common/types/comflowy-bootstrap.types.ts @@ -9,17 +9,20 @@ export type EnvRequirements = { isBasicModelInstalled: boolean; isBasicExtensionInstalled: boolean; isComfyUIStarted: boolean; + isCustomComfyEnv: boolean; isSetupedConfig: boolean; comfyUIVersion: string; } export type AppConfigs = { - appSetupConfig?: { + appSetupConfig: { + pythonPath: string; + isCustomComfyEnv: boolean, comfyUIDir: string, stableDiffusionDir?: string civitaiToken?: string }, - runConfig?: ComfyUIRunConfig + runConfig: ComfyUIRunConfig }; export type BootstrapError = { From 619ba52b0d641845345dae119709847af51fbaa7 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Sat, 13 Jul 2024 00:18:37 +0800 Subject: [PATCH 03/23] user can use custom env --- .../src/components/bootstrap/setup-config.tsx | 8 ++++---- apps/node/src/modules/utils/logger.ts | 6 +++--- apps/node/src/modules/utils/run-command.ts | 2 +- apps/node/src/routes/api/bootstrap.ts | 3 +-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 785a88b3..3408c55d 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -52,7 +52,7 @@ export function SetupConfig() { const selectPythonPath = useCallback(async () => { try { - const ret = await comfyElectronApi.selectDirectory("file"); + const ret = await comfyElectronApi.selectDirectory(); const pythonPath = ret[0]; setPythonPath(pythonPath); } catch (err) { @@ -80,7 +80,7 @@ export function SetupConfig() { const config = { comfyUIDir: value.trim(), - pythonPath: pythonPath.trim(), + pythonPath: pythonPath.trim() + "/python", stableDiffusionDir: sdwebuiPath.trim() }; @@ -189,9 +189,9 @@ export function SetupConfig() {
Select python path
+ }}>Select python bin folder
- Select the python enviroment to reuse packages installed for comfyui + Select the python bin folder to reuse packages installed for comfyui
diff --git a/apps/node/src/modules/utils/logger.ts b/apps/node/src/modules/utils/logger.ts index 290f28db..77b13e81 100644 --- a/apps/node/src/modules/utils/logger.ts +++ b/apps/node/src/modules/utils/logger.ts @@ -33,9 +33,9 @@ const logger = winston.createLogger({ }); if (process.env.NODE_ENV !== 'production') { - // logger.add(new winston.transports.Console({ - // format: winston.format.simple(), - // })); + logger.add(new winston.transports.Console({ + format: winston.format.simple(), + })); } export default logger; \ No newline at end of file diff --git a/apps/node/src/modules/utils/run-command.ts b/apps/node/src/modules/utils/run-command.ts index a07f55a1..1e289208 100644 --- a/apps/node/src/modules/utils/run-command.ts +++ b/apps/node/src/modules/utils/run-command.ts @@ -14,7 +14,7 @@ export async function runCommand( }> { const { systemProxy, systemProxyString } = await getSystemProxy(); if (systemProxy) { - logger.info("run command with proxy:" + systemProxyString); + logger.info("run command with proxy:" + command + " " + systemProxyString); } else { logger.info("run command without proxy") } diff --git a/apps/node/src/routes/api/bootstrap.ts b/apps/node/src/routes/api/bootstrap.ts index f090fee6..2d6485e3 100644 --- a/apps/node/src/routes/api/bootstrap.ts +++ b/apps/node/src/routes/api/bootstrap.ts @@ -13,7 +13,6 @@ import { verifyIsTorchInstalled } from 'src/modules/comfyui/verify-torch'; import { runCommand } from '../../modules/utils/run-command'; import { systemProxyString } from '../../modules/utils/env'; import { conda } from '../../modules/utils/conda'; -import { modelManager } from 'src/modules/model-manager/model-manager'; /** * fetch all extensions @@ -144,7 +143,7 @@ export async function ApiBootstrap(req: Request, res: Response) { task = cloneComfyUI(newDispatcher); return await withTimeout(task, 1000 * 60 * 10, msgTemplate("Clone comfyUI")); case BootStrapTaskType.startComfyUI: - modelManager.tryUpdateMetaFromCivitAI(dispatcher); + // modelManager.tryUpdateMetaFromCivitAI(dispatcher); const isComfyUIStarted = await comfyuiService.isComfyUIAlive(); if (isComfyUIStarted) { return true; From 505c00c3a5aab03652ec4fc4838ce5caa9e52126 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Sat, 13 Jul 2024 00:21:35 +0800 Subject: [PATCH 04/23] add model check --- apps/node/src/routes/api/bootstrap.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/node/src/routes/api/bootstrap.ts b/apps/node/src/routes/api/bootstrap.ts index 2d6485e3..f64b2cce 100644 --- a/apps/node/src/routes/api/bootstrap.ts +++ b/apps/node/src/routes/api/bootstrap.ts @@ -13,6 +13,7 @@ import { verifyIsTorchInstalled } from 'src/modules/comfyui/verify-torch'; import { runCommand } from '../../modules/utils/run-command'; import { systemProxyString } from '../../modules/utils/env'; import { conda } from '../../modules/utils/conda'; +import { modelManager } from '../../modules/model-manager/model-manager'; /** * fetch all extensions @@ -143,7 +144,7 @@ export async function ApiBootstrap(req: Request, res: Response) { task = cloneComfyUI(newDispatcher); return await withTimeout(task, 1000 * 60 * 10, msgTemplate("Clone comfyUI")); case BootStrapTaskType.startComfyUI: - // modelManager.tryUpdateMetaFromCivitAI(dispatcher); + modelManager.tryUpdateMetaFromCivitAI(dispatcher); const isComfyUIStarted = await comfyuiService.isComfyUIAlive(); if (isComfyUIStarted) { return true; From ba48e8f144a3972ecb1ff4f1a136222d542322bf Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Tue, 16 Jul 2024 08:21:25 +0800 Subject: [PATCH 05/23] bugfix --- .../src/components/bootstrap/setup-config.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 3408c55d..6804d1a2 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -109,6 +109,22 @@ export function SetupConfig() { } else { track('bootstrap-setup-config-success-without-comfyui-installed'); } + + if (pythonPath.trim() !== "") { + bootstrapTasks.forEach(task => { + const skipTasks = [ + BootStrapTaskType.installPython, + BootStrapTaskType.installGit, + BootStrapTaskType.installTorch, + BootStrapTaskType.installComfyUI, + BootStrapTaskType.installConda + ]; + if (skipTasks.includes(task.type)) { + task.finished = true; + } + }); + } + setBootstrapTasks([...bootstrapTasks]); } else { message.error("Setup failed: " + data.error); From 823761a2bd8755102f4642b2526d57ea49b3f163 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Tue, 16 Jul 2024 23:00:26 +0800 Subject: [PATCH 06/23] bugfix --- .../electron-frontend/src/components/bootstrap/setup-config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 6804d1a2..bd056c1b 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -210,7 +210,7 @@ export function SetupConfig() { Select the python bin folder to reuse packages installed for comfyui
- +
{electronEnv && } From 560c39910303236e65f0ead50a6dfa15e77548c7 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Tue, 16 Jul 2024 23:01:21 +0800 Subject: [PATCH 07/23] bugfix --- .../electron-frontend/src/components/bootstrap/setup-config.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index bd056c1b..7d406471 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -210,7 +210,7 @@ export function SetupConfig() { Select the python bin folder to reuse packages installed for comfyui
- +
{electronEnv && } From 1a33948631fc9682a8abeaec42cd2fb89679200f Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Tue, 16 Jul 2024 23:03:34 +0800 Subject: [PATCH 08/23] bugfix --- .../src/components/bootstrap/setup-config.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 7d406471..8cd6537b 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -210,7 +210,9 @@ export function SetupConfig() { Select the python bin folder to reuse packages installed for comfyui
- + { + setPythonPath(v.target.value); + }}/>
{electronEnv && } From dd20c16f11f64a9c7e3f9e6dcf9d7bed64e4974c Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Wed, 17 Jul 2024 22:25:23 +0800 Subject: [PATCH 09/23] lint fix --- packages/common/store/dashboard-state.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/common/store/dashboard-state.ts b/packages/common/store/dashboard-state.ts index 66d510b5..dc0415ec 100644 --- a/packages/common/store/dashboard-state.ts +++ b/packages/common/store/dashboard-state.ts @@ -43,7 +43,6 @@ type DashboardAction = { const useDashboardState = create((set, get) => ({ docs: [], - appConfigs: {}, bootstraped: false, loading: true, bootstrapMessages: [], From 1888d47a525ad6b6d824e40e8f7993e5a804d177 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 19 Jul 2024 17:41:36 +0800 Subject: [PATCH 10/23] bugfix --- apps/node/src/modules/comfyui/bootstrap.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/node/src/modules/comfyui/bootstrap.ts b/apps/node/src/modules/comfyui/bootstrap.ts index 3c7d26bf..6795efff 100644 --- a/apps/node/src/modules/comfyui/bootstrap.ts +++ b/apps/node/src/modules/comfyui/bootstrap.ts @@ -30,7 +30,8 @@ export async function checkBasicRequirements() { isGitInstalled = false; if (isSetupedConfig) { isComfyUIInstalled = await checkIfInstalledComfyUI(); - isCustomComfyEnv = appConfigManager.get(CONFIG_KEYS.appSetupConfig)?.isCustomComfyEnv ?? false; + const appConfig = appConfigManager.getSetupConfig(); + isCustomComfyEnv = appConfig?.isCustomComfyEnv ?? false; /** * if user delete ComfyUI, user should re-setup the config */ From b0b8c3ef2fefcdbf679ec87febb4ae0da2090149 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Sun, 21 Jul 2024 10:02:55 +0800 Subject: [PATCH 11/23] bugfix for resolve default value --- packages/common/comfyui-bridge/prompt.ts | 25 +++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/common/comfyui-bridge/prompt.ts b/packages/common/comfyui-bridge/prompt.ts index 9c9edc25..cf29ea97 100644 --- a/packages/common/comfyui-bridge/prompt.ts +++ b/packages/common/comfyui-bridge/prompt.ts @@ -294,7 +294,9 @@ export function createPrompt(workflowSource: PersistedWorkflowDocument, widgets: } if (source.value.widget === NODE_PRIMITIVE) { - value = findPrimitiveNodeValue(source); + const targetNode = workflow.nodes[edge.target!]; + const targetHandle = edge.targetHandle!; + value = findPrimitiveNodeValue(source, targetNode, targetHandle); } return value; @@ -309,12 +311,21 @@ export function createPrompt(workflowSource: PersistedWorkflowDocument, widgets: } /** - * primitive value is the first field value - * @param node - */ - function findPrimitiveNodeValue(node: PersistedWorkflowNode): any { - const fieldKeys = Object.keys(node.value.fields).filter(it => it !== "undefined"); - const value = node.value.fields[fieldKeys[0]]; + * primitive value is the first field value + * @param node + */ + function findPrimitiveNodeValue(node: PersistedWorkflowNode, targetNode: PersistedWorkflowNode, targetHandle: string): any { + const fieldKey = targetHandle.toLocaleLowerCase(); + const targetWidget = widgets[targetNode.value.widget]; + + if (!targetWidget || !targetWidget.input) { + throw new Error("Invalid target widget or widget input"); + } + + const targetField = (targetWidget.input.required || {})[fieldKey] || (targetWidget.input.optional || {})[fieldKey]; + const defaultValue = Array.isArray(targetField) && (targetField[1] as any)?.default !== undefined ? (targetField[1] as any)?.default : undefined; + const value = node.value.fields[fieldKey] ?? defaultValue; + return value; } } From a8ee2ce0f7d4f3ba85e7676160d3e2b17a510daf Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Mon, 22 Jul 2024 10:20:31 +0800 Subject: [PATCH 12/23] seed auto --- .../app-state-create-workflow-execution-hooks.ts | 14 ++++++++++++++ .../common/workflow-editor/node-rendering.tsx | 16 ++++++++++++---- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/packages/common/store/app-state/app-state-create-workflow-execution-hooks.ts b/packages/common/store/app-state/app-state-create-workflow-execution-hooks.ts index ff56b2de..962726cf 100644 --- a/packages/common/store/app-state/app-state-create-workflow-execution-hooks.ts +++ b/packages/common/store/app-state/app-state-create-workflow-execution-hooks.ts @@ -39,6 +39,20 @@ export default function createHook(set: AppStateSetter, get: AppStateGetter): Pa let newSeed = Widget.getControlledSeedValue(control_after_generated, oldSeed); onNodeFieldChange(node.id, seedFieldName, newSeed); } + + // 如果是 PrimitNode 且有 control_after_generated 字段,则更新 control_after_generated 字段 + if (Widget.isPrimitive(widget?.name)) { + const control_after_generated = sdnode.fields.control_after_generated; + if (control_after_generated) { + const edge = state.edges.find(edge => edge.source === node.id); + if (edge && edge.targetHandle) { + const seedFieldName = edge.targetHandle.toLowerCase() + const oldSeed = sdnode.fields[seedFieldName]; + let newSeed = Widget.getControlledSeedValue(control_after_generated, oldSeed); + onNodeFieldChange(node.id, seedFieldName, newSeed); + } + } + } }); console.log("res", res); diff --git a/packages/common/workflow-editor/node-rendering.tsx b/packages/common/workflow-editor/node-rendering.tsx index d16f95bd..7757d8e3 100644 --- a/packages/common/workflow-editor/node-rendering.tsx +++ b/packages/common/workflow-editor/node-rendering.tsx @@ -188,10 +188,20 @@ export function getPrimitiveNodeRenderingInfo(node: SDNode, widget: Widget): Wor property: input[0], input: input[1] }) + + // if it has a seed, add seed control_after_generated param + if (input[0] === "seed" || input[0] === "noise_seed") { + refParams.push({ + property: "control_after_generated", + input: [ContrlAfterGeneratedValuesOptions, { + default: "" + }] + }); + } } } - const input = refParams[0]?.input; + const input = refParams[0]?.input as Input; let typeName = "*"; let name = "Connect to widget input"; if (input) { @@ -199,7 +209,6 @@ export function getPrimitiveNodeRenderingInfo(node: SDNode, widget: Widget): Wor name = typeName; } - return { title: `${title}${enabled ? " (Disabled)" : ""}`, widget, @@ -210,14 +219,13 @@ export function getPrimitiveNodeRenderingInfo(node: SDNode, widget: Widget): Wor links: [], slot_index: 0 }], - params: refParams, + params: refParams as any, nodeBgColor, nodeColor, enabled } } - export function useSubflowNodeRenderingInfo(node: NodeProps<{ value: SDNode; }>): SubflowNodeRenderingInfo | undefined { From 5fa5040e97709a630d17ec37867f467b5a3a3f26 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Mon, 22 Jul 2024 18:53:17 +0800 Subject: [PATCH 13/23] bugfix --- .../src/components/bootstrap/setup-config.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 8cd6537b..2e2a5e0d 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -73,7 +73,7 @@ export function SetupConfig() { return; } - if (selectedIfInstalledComfyUI && pythonPath.trim() === "") { + if (installedComfyUI && pythonPath.trim() === "") { message.error("Please select python path"); return; } @@ -134,7 +134,7 @@ export function SetupConfig() { message.error(err); } setLoading(false); - }, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI, pythonPath]); + }, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI, pythonPath, selectedIfInstalledComfyUI]); if (!selectedIfInstalledComfyUI) { return ( From 956edba17da90f16c7b362daaeb827e2203aab5d Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Mon, 22 Jul 2024 19:06:30 +0800 Subject: [PATCH 14/23] verify python --- apps/node/src/routes/api/bootstrap.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/node/src/routes/api/bootstrap.ts b/apps/node/src/routes/api/bootstrap.ts index f64b2cce..d3c98089 100644 --- a/apps/node/src/routes/api/bootstrap.ts +++ b/apps/node/src/routes/api/bootstrap.ts @@ -14,6 +14,7 @@ import { runCommand } from '../../modules/utils/run-command'; import { systemProxyString } from '../../modules/utils/env'; import { conda } from '../../modules/utils/conda'; import { modelManager } from '../../modules/model-manager/model-manager'; +import { verifyPythonPath } from '../../modules/utils/verify-python'; /** * fetch all extensions @@ -232,6 +233,10 @@ export async function ApiSetupConfig(req: Request, res: Response) { } } + if (data.pythonPath) { + await verifyPythonPath(data.pythonPath); + } + const setupString = JSON.stringify({ comfyUIDir: comfyUIPath, pythonPath: data.pythonPath || undefined, @@ -393,4 +398,4 @@ export async function ApiUpdateComfyUIAndRestart(req: Request, res: Response) { error: err.message }); } -} \ No newline at end of file +} From e37fdd9c805dfcff54012cbba24ab88a1d3611ac Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Mon, 22 Jul 2024 19:06:40 +0800 Subject: [PATCH 15/23] verify python --- apps/node/src/modules/utils/verify-python.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 apps/node/src/modules/utils/verify-python.ts diff --git a/apps/node/src/modules/utils/verify-python.ts b/apps/node/src/modules/utils/verify-python.ts new file mode 100644 index 00000000..b100992f --- /dev/null +++ b/apps/node/src/modules/utils/verify-python.ts @@ -0,0 +1,19 @@ +import { exec } from 'child_process'; +import { promisify } from 'util'; + +const execAsync = promisify(exec); + +export async function verifyPythonPath(pythonPath: string): Promise { + try { + const { stdout, stderr } = await execAsync(`${pythonPath} --version`); + if (stderr) { + throw new Error(stderr) + } + console.log(`Python found: ${stdout}`); + return true; + } catch (error: any) { + throw new Error(`Python not found at ${pythonPath}`); + } +} + +// verifyPythonPath("/Users/chenxuejia/comflowy/tmp/python"); \ No newline at end of file From 284be9c8f001ab3489cf2156aefa7acd2cb31be6 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Mon, 22 Jul 2024 20:04:00 +0800 Subject: [PATCH 16/23] verify error bugfix --- .../src/components/bootstrap/setup-config.tsx | 7 +++++-- apps/node/src/routes/api/bootstrap.ts | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx index 2e2a5e0d..3816a6aa 100644 --- a/apps/electron-frontend/src/components/bootstrap/setup-config.tsx +++ b/apps/electron-frontend/src/components/bootstrap/setup-config.tsx @@ -78,12 +78,15 @@ export function SetupConfig() { return; } - const config = { + const config:any = { comfyUIDir: value.trim(), - pythonPath: pythonPath.trim() + "/python", stableDiffusionDir: sdwebuiPath.trim() }; + if (installedComfyUI && pythonPath.trim() !== "") { + config.pythonPath = pythonPath.trim() + "/python"; + } + const api = getBackendUrl('/api/setup_config'); try { setLoading(true); diff --git a/apps/node/src/routes/api/bootstrap.ts b/apps/node/src/routes/api/bootstrap.ts index d3c98089..0f8884af 100644 --- a/apps/node/src/routes/api/bootstrap.ts +++ b/apps/node/src/routes/api/bootstrap.ts @@ -234,6 +234,7 @@ export async function ApiSetupConfig(req: Request, res: Response) { } if (data.pythonPath) { + console.log("python path", data.pythonPath) await verifyPythonPath(data.pythonPath); } From 2b3501f9128c405bd33c7df21a2cde7ac614c7df Mon Sep 17 00:00:00 2001 From: Jimmy Wong Date: Fri, 2 Aug 2024 15:50:15 +0800 Subject: [PATCH 17/23] update 0.2.2-alpha --- README.md | 6 +++--- apps/electron-backend/layers/main/src/index.ts | 4 ++-- apps/electron-backend/package.json | 2 +- apps/electron-frontend/.env.development | 2 +- apps/electron-frontend/.env.production | 2 +- .../src/components/setting-modal/setting-modal.tsx | 2 +- .../src/components/templates/data/Batch-image-workflow.json | 2 +- .../templates/data/Canny-ControlNet-workflow.json | 2 +- .../templates/data/Hi-res-fix-latent-upscale-workflow.json | 2 +- .../src/components/templates/data/Inpainting-workflow.json | 2 +- .../src/components/templates/data/LCM-LoRA-workflow.json | 2 +- .../src/components/templates/data/LoRA-workflow.json | 2 +- .../src/components/templates/data/Outpainting-workflow.json | 2 +- .../components/templates/data/Pose-ControlNet-workflow.json | 2 +- .../templates/data/SDXL-prompt-styler-workflow.json | 2 +- .../templates/data/Scribble-ControlNet-workflow.json | 2 +- .../components/templates/data/Simple-img2img-workflow.json | 2 +- .../src/components/templates/data/Style-model-workflow.json | 2 +- .../data/Upscale-pixel-and-Hi-res-fix-workflow.json | 2 +- .../templates/data/Upscale-pixel-by-algorithm-workflow.json | 2 +- .../templates/data/Upscale-pixel-by-model-workflow.json | 2 +- .../src/components/templates/data/default-workflow.json | 2 +- .../components/templates/data/unCLIP-model-workflow.json | 2 +- apps/electron-package/package-lock.json | 4 ++-- apps/electron-package/package.json | 2 +- 25 files changed, 29 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 7a1e70ce..45263ecc 100755 --- a/README.md +++ b/README.md @@ -20,9 +20,9 @@ If you like ComflowySpace, give our repo a [⭐ Star](https://github.com/6174/co ## Download * **MacOS:** - * [Mac Intel](https://github.com/6174/comflowyspace/releases/download/v0.2.1-alpha/comflowy-0.2.1-alpha.dmg) (Note that if you have an Intel Macbook, make sure it has AMD graphics before installing, otherwise it won't work!) - * [Mac M](https://github.com/6174/comflowyspace/releases/download/v0.2.1-alpha/comflowy-0.2.1-alpha-arm64.dmg) -* **[Windows](https://github.com/6174/comflowyspace/releases/download/v0.2.1-alpha/comflowy-0.2.1-alpha.zip)** + * [Mac Intel](https://github.com/6174/comflowyspace/releases/download/v0.2.2-alpha/comflowy-0.2.2-alpha.dmg) (Note that if you have an Intel Macbook, make sure it has AMD graphics before installing, otherwise it won't work!) + * [Mac M](https://github.com/6174/comflowyspace/releases/download/v0.2.2-alpha/comflowy-0.2.2-alpha-arm64.dmg) +* **[Windows](https://github.com/6174/comflowyspace/releases/download/v0.2.2-alpha/comflowy-0.2.2-alpha.zip)** ## Cloud Version If your computer's performance isn't sufficient for the local version, you can also try our [cloud version](https://www.comflowy.com). diff --git a/apps/electron-backend/layers/main/src/index.ts b/apps/electron-backend/layers/main/src/index.ts index b7fb8be1..dfce9f4a 100755 --- a/apps/electron-backend/layers/main/src/index.ts +++ b/apps/electron-backend/layers/main/src/index.ts @@ -20,8 +20,8 @@ log.transports.file.format = '{level} {text}'; app.setAboutPanelOptions({ applicationName: 'Comflowy', - applicationVersion: '0.2.1-alpha', - version: '0.2.1-alpha', + applicationVersion: '0.2.2-alpha', + version: '0.2.2-alpha', copyright: 'Copyright © 2024 https://www.comflowy.com', authors: ['@Marc Chen', '@Jimmy Wang'], website: 'https://www.comflowy.com', diff --git a/apps/electron-backend/package.json b/apps/electron-backend/package.json index 2954c326..9dec1a88 100644 --- a/apps/electron-backend/package.json +++ b/apps/electron-backend/package.json @@ -1,6 +1,6 @@ { "name": "comflowy", - "version": "0.2.1-alpha", + "version": "0.2.2-alpha", "private": true, "main": "layers/main/dist/index.js", "scripts": { diff --git a/apps/electron-frontend/.env.development b/apps/electron-frontend/.env.development index 49863eee..b1b60418 100644 --- a/apps/electron-frontend/.env.development +++ b/apps/electron-frontend/.env.development @@ -1,4 +1,4 @@ -NEXT_PUBLIC_APP_VERSION=0.2.1-alpha +NEXT_PUBLIC_APP_VERSION=0.2.2-alpha NEXT_PUBLIC_API_SERVER=http://localhost:3000 SENTRY_AUTH_TOKEN=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 NEXT_PUBLIC_APTABASE_API_KEY=A-SH-5854572926 diff --git a/apps/electron-frontend/.env.production b/apps/electron-frontend/.env.production index cefc3ec2..2d62f1ed 100644 --- a/apps/electron-frontend/.env.production +++ b/apps/electron-frontend/.env.production @@ -1,4 +1,4 @@ -NEXT_PUBLIC_APP_VERSION=0.2.1-alpha +NEXT_PUBLIC_APP_VERSION=0.2.2-alpha NEXT_PUBLIC_API_SERVER=https://www.comflowy.com SENTRY_AUTH_TOKEN=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 NEXT_PUBLIC_FG_ENABLE_SUBFLOW=disabled diff --git a/apps/electron-frontend/src/components/setting-modal/setting-modal.tsx b/apps/electron-frontend/src/components/setting-modal/setting-modal.tsx index 0ead7769..269ddc7e 100644 --- a/apps/electron-frontend/src/components/setting-modal/setting-modal.tsx +++ b/apps/electron-frontend/src/components/setting-modal/setting-modal.tsx @@ -384,7 +384,7 @@ function AboutComflowySpace() {
Comflowy
-
{t(KEYS.version)} 0.2.1-alpha
+
{t(KEYS.version)} 0.2.2-alpha
diff --git a/apps/electron-frontend/src/components/templates/data/Batch-image-workflow.json b/apps/electron-frontend/src/components/templates/data/Batch-image-workflow.json index 1a144cbc..60009d4e 100644 --- a/apps/electron-frontend/src/components/templates/data/Batch-image-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Batch-image-workflow.json @@ -1 +1 @@ -{"id":"abf9b0f9-6a08-47b9-937b-53173392b74e","title":"Batch image workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7,11],"slot_index":0}],"widgets_values":[369501923869898,"fixed",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[26,474],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["SDXL-v1.0-base.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[473,609],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,4],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[399.27614213197967,85.76040609137053],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[399.24162436548227,335.9319796954315],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LatentFromBatch","properties":{"Node name for S&R":"LatentFromBatch"},"pos":[1210,532],"size":[315,151],"inputs":[{"name":"samples","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[2,1],"order":0,"mode":0},{"id":"11","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1566,535],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":10},{"name":"vae","type":"VAE","link":13}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"12","type":"SaveImage","properties":{},"pos":[1823,537],"size":[315,270],"inputs":[{"name":"images","type":"IMAGE","link":12}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"11",0,"LATENT"],["11","3",0,"10",0,"LATENT"],["12","11",0,"12",0,"IMAGE"],["13","4",2,"11",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"abf9b0f9-6a08-47b9-937b-53173392b74e","title":"Batch image workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7,11],"slot_index":0}],"widgets_values":[369501923869898,"fixed",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[26,474],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["SDXL-v1.0-base.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[473,609],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,4],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[399.27614213197967,85.76040609137053],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[399.24162436548227,335.9319796954315],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LatentFromBatch","properties":{"Node name for S&R":"LatentFromBatch"},"pos":[1210,532],"size":[315,151],"inputs":[{"name":"samples","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[2,1],"order":0,"mode":0},{"id":"11","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1566,535],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":10},{"name":"vae","type":"VAE","link":13}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"12","type":"SaveImage","properties":{},"pos":[1823,537],"size":[315,270],"inputs":[{"name":"images","type":"IMAGE","link":12}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"11",0,"LATENT"],["11","3",0,"10",0,"LATENT"],["12","11",0,"12",0,"IMAGE"],["13","4",2,"11",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Canny-ControlNet-workflow.json b/apps/electron-frontend/src/components/templates/data/Canny-ControlNet-workflow.json index 1f06a49a..0a270cdd 100644 --- a/apps/electron-frontend/src/components/templates/data/Canny-ControlNet-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Canny-ControlNet-workflow.json @@ -1 +1 @@ -{"id":"b6ea4f06-ebb8-4067-84a7-cd021bc38c6c","title":"Canny ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1116.1725888324875,193.46192893401013],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":17},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[636250194499629,"fixed",25,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-173.86802030456852,-154.46192893401025],"size":[340,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[19],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[837.9137055837564,436.3401015228426],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[428.2690355329948,-322.1573604060914],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["a portrait photo of a female elf from Lord of the Rings, (Liv Tyler:1.1), (Cate Blanchett:0.9)\n\nhigh resolution, highly detailed, 4k, cinematic, dramatic lighting"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[689.6446700507614,185.18274111675123],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, horror, rendering, cosplay"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1456.1725888324872,193.46192893401016],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":19}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1677.7157360406093,190],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-42.34517766497464,81.07614213197967],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[13],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_portrait.jpg",null],"order":0,"mode":0},{"id":"13","type":"Canny","properties":{"Node name for S&R":"Canny"},"pos":[206.30964467005066,82.4609137055836],"size":[210,151],"inputs":[{"name":"image","type":"IMAGE","link":13}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[14,18],"shape":3,"slot_index":0}],"widgets_values":[0.29999999999999993,0.7],"order":0,"mode":0},{"id":"14","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[349.73096446700504,-76.88832487309655],"size":[453,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[15],"shape":3,"slot_index":0}],"widgets_values":["control_v11p_sd15_canny_fp16.safetensors"],"order":0,"mode":0},{"id":"16","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[838.4568527918781,-6.223350253807119],"size":[212,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":16},{"name":"control_net","type":"CONTROL_NET","link":15},{"name":"image","type":"IMAGE","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17],"shape":3,"slot_index":0}],"widgets_values":[0.8499999999999999],"order":0,"mode":0},{"id":"17","type":"PreviewImage","properties":{"Node name for S&R":"PreviewImage"},"pos":[451.50253807106594,89.73096446700497],"size":[210,246],"inputs":[{"name":"images","type":"IMAGE","link":18}],"outputs":[],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","12",0,"13",0,"IMAGE"],["14","13",0,"16",2,"IMAGE"],["15","14",0,"16",1,"CONTROL_NET"],["16","6",0,"16",0,"CONDITIONING"],["17","16",0,"3",1,"CONDITIONING"],["18","13",0,"17",0,"IMAGE"],["19","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"b6ea4f06-ebb8-4067-84a7-cd021bc38c6c","title":"Canny ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1116.1725888324875,193.46192893401013],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":17},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[636250194499629,"fixed",25,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-173.86802030456852,-154.46192893401025],"size":[340,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[19],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[837.9137055837564,436.3401015228426],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[428.2690355329948,-322.1573604060914],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["a portrait photo of a female elf from Lord of the Rings, (Liv Tyler:1.1), (Cate Blanchett:0.9)\n\nhigh resolution, highly detailed, 4k, cinematic, dramatic lighting"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[689.6446700507614,185.18274111675123],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, horror, rendering, cosplay"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1456.1725888324872,193.46192893401016],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":19}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1677.7157360406093,190],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-42.34517766497464,81.07614213197967],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[13],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_portrait.jpg",null],"order":0,"mode":0},{"id":"13","type":"Canny","properties":{"Node name for S&R":"Canny"},"pos":[206.30964467005066,82.4609137055836],"size":[210,151],"inputs":[{"name":"image","type":"IMAGE","link":13}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[14,18],"shape":3,"slot_index":0}],"widgets_values":[0.29999999999999993,0.7],"order":0,"mode":0},{"id":"14","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[349.73096446700504,-76.88832487309655],"size":[453,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[15],"shape":3,"slot_index":0}],"widgets_values":["control_v11p_sd15_canny_fp16.safetensors"],"order":0,"mode":0},{"id":"16","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[838.4568527918781,-6.223350253807119],"size":[212,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":16},{"name":"control_net","type":"CONTROL_NET","link":15},{"name":"image","type":"IMAGE","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17],"shape":3,"slot_index":0}],"widgets_values":[0.8499999999999999],"order":0,"mode":0},{"id":"17","type":"PreviewImage","properties":{"Node name for S&R":"PreviewImage"},"pos":[451.50253807106594,89.73096446700497],"size":[210,246],"inputs":[{"name":"images","type":"IMAGE","link":18}],"outputs":[],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","12",0,"13",0,"IMAGE"],["14","13",0,"16",2,"IMAGE"],["15","14",0,"16",1,"CONTROL_NET"],["16","6",0,"16",0,"CONDITIONING"],["17","16",0,"3",1,"CONDITIONING"],["18","13",0,"17",0,"IMAGE"],["19","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Hi-res-fix-latent-upscale-workflow.json b/apps/electron-frontend/src/components/templates/data/Hi-res-fix-latent-upscale-workflow.json index 12271fbb..35b65b55 100644 --- a/apps/electron-frontend/src/components/templates/data/Hi-res-fix-latent-upscale-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Hi-res-fix-latent-upscale-workflow.json @@ -1 +1 @@ -{"id":"9ca45931-28ce-4a84-8709-2a84655f544e","title":"Hi-res fix latent upscale workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-42.776773296244784,386.634909596662],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1,14],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["sd_xl_refiner_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[486.0118219749653,571.8233657858136],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[385.2586926286509,61.45827538247568],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4,12],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[381.3998609179415,309.0702364394993],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6,13],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1968,177],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":15},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[2246,178],"size":[240,363],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LatentUpscale","properties":{"Node name for S&R":"LatentUpscale"},"pos":[1223,183.56467315716273],"size":[315,227],"inputs":[{"name":"samples","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[11],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",1024,1024,"disabled"],"order":0,"mode":0},{"id":"11","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1591.1411682892908,186.2941585535466],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":12},{"name":"negative","type":"CONDITIONING","link":13},{"name":"latent_image","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[15],"shape":3,"slot_index":0}],"widgets_values":[0,"randomize",20,8,"dpmpp_2m","karras",0.5],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","3",0,"10",0,"LATENT"],["11","10",0,"11",3,"LATENT"],["12","6",0,"11",1,"CONDITIONING"],["13","7",0,"11",2,"CONDITIONING"],["14","4",0,"11",0,"MODEL"],["15","11",0,"8",0,"LATENT"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"9ca45931-28ce-4a84-8709-2a84655f544e","title":"Hi-res fix latent upscale workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-42.776773296244784,386.634909596662],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1,14],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["sd_xl_refiner_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[486.0118219749653,571.8233657858136],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[385.2586926286509,61.45827538247568],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4,12],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[381.3998609179415,309.0702364394993],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6,13],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1968,177],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":15},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[2246,178],"size":[240,363],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LatentUpscale","properties":{"Node name for S&R":"LatentUpscale"},"pos":[1223,183.56467315716273],"size":[315,227],"inputs":[{"name":"samples","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[11],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",1024,1024,"disabled"],"order":0,"mode":0},{"id":"11","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1591.1411682892908,186.2941585535466],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":12},{"name":"negative","type":"CONDITIONING","link":13},{"name":"latent_image","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[15],"shape":3,"slot_index":0}],"widgets_values":[0,"randomize",20,8,"dpmpp_2m","karras",0.5],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","3",0,"10",0,"LATENT"],["11","10",0,"11",3,"LATENT"],["12","6",0,"11",1,"CONDITIONING"],["13","7",0,"11",2,"CONDITIONING"],["14","4",0,"11",0,"MODEL"],["15","11",0,"8",0,"LATENT"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Inpainting-workflow.json b/apps/electron-frontend/src/components/templates/data/Inpainting-workflow.json index 0596c095..82aed561 100644 --- a/apps/electron-frontend/src/components/templates/data/Inpainting-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Inpainting-workflow.json @@ -1 +1 @@ -{"id":"f9ef8d91-db53-4917-ae7e-107678de7a9a","title":"Inpainting workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",0.85],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-27.255076142131998,419.2233502538071],"size":[377,170],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["DreamShaper-v8.0-Inpainting.safetensors"],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[407.39213197969536,129.70177664974617],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["red hair"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[408.4352791878173,372.26269035533],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, horror, distorted, wrong hands"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,113],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"VAEEncodeForInpaint","properties":{"Node name for S&R":"VAEEncodeForInpaint"},"pos":[517.0862944162436,653.2195431472081],"size":[315,161],"inputs":[{"name":"pixels","type":"IMAGE","link":11},{"name":"vae","type":"VAE","link":13},{"name":"mask","type":"MASK","link":12}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[8],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[167.255076142132,655.960659898477],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[11],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[12],"shape":3,"slot_index":1}],"widgets_values":["Rectangle 4135.png",null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"3",3,"LATENT"],["11","11",0,"10",0,"IMAGE"],["12","11",1,"10",2,"MASK"],["13","4",2,"10",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"f9ef8d91-db53-4917-ae7e-107678de7a9a","title":"Inpainting workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",0.85],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-27.255076142131998,419.2233502538071],"size":[377,170],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["DreamShaper-v8.0-Inpainting.safetensors"],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[407.39213197969536,129.70177664974617],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["red hair"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[408.4352791878173,372.26269035533],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, horror, distorted, wrong hands"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,113],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"VAEEncodeForInpaint","properties":{"Node name for S&R":"VAEEncodeForInpaint"},"pos":[517.0862944162436,653.2195431472081],"size":[315,161],"inputs":[{"name":"pixels","type":"IMAGE","link":11},{"name":"vae","type":"VAE","link":13},{"name":"mask","type":"MASK","link":12}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[8],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[167.255076142132,655.960659898477],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[11],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[12],"shape":3,"slot_index":1}],"widgets_values":["Rectangle 4135.png",null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"3",3,"LATENT"],["11","11",0,"10",0,"IMAGE"],["12","11",1,"10",2,"MASK"],["13","4",2,"10",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/LCM-LoRA-workflow.json b/apps/electron-frontend/src/components/templates/data/LCM-LoRA-workflow.json index 9bb19375..74b634b4 100644 --- a/apps/electron-frontend/src/components/templates/data/LCM-LoRA-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/LCM-LoRA-workflow.json @@ -1 +1 @@ -{"id":"17ace548-d59c-4fcd-8ac7-6aca20e085b2","title":"LCM LoRA workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":11},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1054042089559169,"randomize",5,1.8,"lcm","sgm_uniform",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-411,202],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[10],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[12],"slot_index":1},{"name":"VAE","type":"VAE","links":[16],"slot_index":2}],"widgets_values":["sd_xl_base_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[494.1897079276773,661.375521557719],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[1024,1024,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[385.6600834492351,135.2806675938804],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[386,395],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":16}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"12","type":"LoraLoader","properties":{"Node name for S&R":"LoraLoader"},"pos":[-26,203],"size":[315,213],"inputs":[{"name":"model","type":"MODEL","link":10},{"name":"clip","type":"CLIP","link":12}],"outputs":[{"name":"MODEL","type":"MODEL","links":[11],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,14],"shape":3,"slot_index":1}],"widgets_values":["lcm/SDXL/pytorch_lora_weights.safetensors",1,1],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","4",0,"12",0,"MODEL"],["11","12",0,"3",0,"MODEL"],["12","4",1,"12",1,"CLIP"],["13","12",1,"6",0,"CLIP"],["14","12",1,"7",0,"CLIP"],["16","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"17ace548-d59c-4fcd-8ac7-6aca20e085b2","title":"LCM LoRA workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":11},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1054042089559169,"randomize",5,1.8,"lcm","sgm_uniform",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-411,202],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[10],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[12],"slot_index":1},{"name":"VAE","type":"VAE","links":[16],"slot_index":2}],"widgets_values":["sd_xl_base_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[494.1897079276773,661.375521557719],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[1024,1024,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[385.6600834492351,135.2806675938804],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[386,395],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":16}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"12","type":"LoraLoader","properties":{"Node name for S&R":"LoraLoader"},"pos":[-26,203],"size":[315,213],"inputs":[{"name":"model","type":"MODEL","link":10},{"name":"clip","type":"CLIP","link":12}],"outputs":[{"name":"MODEL","type":"MODEL","links":[11],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,14],"shape":3,"slot_index":1}],"widgets_values":["lcm/SDXL/pytorch_lora_weights.safetensors",1,1],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","4",0,"12",0,"MODEL"],["11","12",0,"3",0,"MODEL"],["12","4",1,"12",1,"CLIP"],["13","12",1,"6",0,"CLIP"],["14","12",1,"7",0,"CLIP"],["16","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/LoRA-workflow.json b/apps/electron-frontend/src/components/templates/data/LoRA-workflow.json index 6c7d355a..83b831ea 100644 --- a/apps/electron-frontend/src/components/templates/data/LoRA-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/LoRA-workflow.json @@ -1 +1 @@ -{"id":"2d009605-c966-4e51-b041-6d6fd8ac147d","title":"LoRA workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":11},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[506015807837182,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-411,202],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[10],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[12],"slot_index":1},{"name":"VAE","type":"VAE","links":[],"slot_index":2}],"widgets_values":["anythingelseV4_v45.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[491.01974965229476,667.715438108484],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[384.0751043115439,95.65618915159942],"size":[423,263],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["masterpiece, best quality, 1girl, solo, long_hair,\nlooking_at_viewer, smile, bangs, skirt, shirt, long_sleeves, hat,\ndress, bow, holding, closed_mouth, flower, frills, hair_flower,\npetals, bouquet, holding_flower, center_frills, bonnet,\nholding_bouquet, flower field, flower field, lineart, monochrome,"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[386,395],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":15}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"12","type":"LoraLoader","properties":{"Node name for S&R":"LoraLoader"},"pos":[-26,203],"size":[315,213],"inputs":[{"name":"model","type":"MODEL","link":10},{"name":"clip","type":"CLIP","link":12}],"outputs":[{"name":"MODEL","type":"MODEL","links":[11],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,14],"shape":3,"slot_index":1}],"widgets_values":["animeoutlineV4_16.safetensors",1,1],"order":0,"mode":0},{"id":"13","type":"VAELoader","properties":{"Node name for S&R":"VAELoader"},"pos":[869.1699582753824,642.8931849791377],"size":[315,113],"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[15],"shape":3,"slot_index":0}],"widgets_values":["orangemix.vae.pt"],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","4",0,"12",0,"MODEL"],["11","12",0,"3",0,"MODEL"],["12","4",1,"12",1,"CLIP"],["13","12",1,"6",0,"CLIP"],["14","12",1,"7",0,"CLIP"],["15","13",0,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"2d009605-c966-4e51-b041-6d6fd8ac147d","title":"LoRA workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":11},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[506015807837182,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-411,202],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[10],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[12],"slot_index":1},{"name":"VAE","type":"VAE","links":[],"slot_index":2}],"widgets_values":["anythingelseV4_v45.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[491.01974965229476,667.715438108484],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[384.0751043115439,95.65618915159942],"size":[423,263],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["masterpiece, best quality, 1girl, solo, long_hair,\nlooking_at_viewer, smile, bangs, skirt, shirt, long_sleeves, hat,\ndress, bow, holding, closed_mouth, flower, frills, hair_flower,\npetals, bouquet, holding_flower, center_frills, bonnet,\nholding_bouquet, flower field, flower field, lineart, monochrome,"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[386,395],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":15}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"12","type":"LoraLoader","properties":{"Node name for S&R":"LoraLoader"},"pos":[-26,203],"size":[315,213],"inputs":[{"name":"model","type":"MODEL","link":10},{"name":"clip","type":"CLIP","link":12}],"outputs":[{"name":"MODEL","type":"MODEL","links":[11],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,14],"shape":3,"slot_index":1}],"widgets_values":["animeoutlineV4_16.safetensors",1,1],"order":0,"mode":0},{"id":"13","type":"VAELoader","properties":{"Node name for S&R":"VAELoader"},"pos":[869.1699582753824,642.8931849791377],"size":[315,113],"inputs":[],"outputs":[{"name":"VAE","type":"VAE","links":[15],"shape":3,"slot_index":0}],"widgets_values":["orangemix.vae.pt"],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","4",0,"12",0,"MODEL"],["11","12",0,"3",0,"MODEL"],["12","4",1,"12",1,"CLIP"],["13","12",1,"6",0,"CLIP"],["14","12",1,"7",0,"CLIP"],["15","13",0,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Outpainting-workflow.json b/apps/electron-frontend/src/components/templates/data/Outpainting-workflow.json index 5d105d6a..0667db6d 100644 --- a/apps/electron-frontend/src/components/templates/data/Outpainting-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Outpainting-workflow.json @@ -1 +1 @@ -{"id":"8c3cab96-fb1f-4198-aa1e-b3ec01de835b","title":"Outpainting workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[750333344894128,"randomize",20,8,"dpmpp_2m","karras",0.85],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[8.536802030456869,458.47715736040607],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["DreamShaper-v8.0-Inpainting.safetensors"],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[403.35786802030464,125.84898477157358],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["a fantastic colorful alien landscape with mountains and valleys with galaxy in the sky"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[403.2982233502538,379.2982233502538],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, horror, distorted, wrong hands"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[17],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"10","type":"VAEEncodeForInpaint","properties":{"Node name for S&R":"VAEEncodeForInpaint"},"pos":[511,673],"size":[315,161],"inputs":[{"name":"pixels","type":"IMAGE","link":16},{"name":"vae","type":"VAE","link":13},{"name":"mask","type":"MASK","link":15}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[16],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-305,819],"size":[313,482],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[14],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[],"shape":3,"slot_index":1}],"widgets_values":["ComfyUI_00297_.png",null],"order":0,"mode":0},{"id":"12","type":"ImagePadForOutpaint","properties":{"Node name for S&R":"ImagePadForOutpaint"},"pos":[97,733],"size":[315,289],"inputs":[{"name":"image","type":"IMAGE","link":14}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[16],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[15],"shape":3,"slot_index":1}],"widgets_values":[256,0,0,256,100],"order":0,"mode":0},{"id":"13","type":"SaveImage","properties":{},"pos":[1465,185],"size":[315,113],"inputs":[{"name":"images","type":"IMAGE","link":17}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["10","10",0,"3",3,"LATENT"],["13","4",2,"10",1,"VAE"],["14","11",0,"12",0,"IMAGE"],["15","12",1,"10",2,"MASK"],["16","12",0,"10",0,"IMAGE"],["17","8",0,"13",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"8c3cab96-fb1f-4198-aa1e-b3ec01de835b","title":"Outpainting workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":10}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[750333344894128,"randomize",20,8,"dpmpp_2m","karras",0.85],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[8.536802030456869,458.47715736040607],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,13],"slot_index":2}],"widgets_values":["DreamShaper-v8.0-Inpainting.safetensors"],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[403.35786802030464,125.84898477157358],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["a fantastic colorful alien landscape with mountains and valleys with galaxy in the sky"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[403.2982233502538,379.2982233502538],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, horror, distorted, wrong hands"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[17],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"10","type":"VAEEncodeForInpaint","properties":{"Node name for S&R":"VAEEncodeForInpaint"},"pos":[511,673],"size":[315,161],"inputs":[{"name":"pixels","type":"IMAGE","link":16},{"name":"vae","type":"VAE","link":13},{"name":"mask","type":"MASK","link":15}],"outputs":[{"name":"LATENT","type":"LATENT","links":[10],"shape":3,"slot_index":0}],"widgets_values":[16],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-305,819],"size":[313,482],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[14],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[],"shape":3,"slot_index":1}],"widgets_values":["ComfyUI_00297_.png",null],"order":0,"mode":0},{"id":"12","type":"ImagePadForOutpaint","properties":{"Node name for S&R":"ImagePadForOutpaint"},"pos":[97,733],"size":[315,289],"inputs":[{"name":"image","type":"IMAGE","link":14}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[16],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":[15],"shape":3,"slot_index":1}],"widgets_values":[256,0,0,256,100],"order":0,"mode":0},{"id":"13","type":"SaveImage","properties":{},"pos":[1465,185],"size":[315,113],"inputs":[{"name":"images","type":"IMAGE","link":17}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["10","10",0,"3",3,"LATENT"],["13","4",2,"10",1,"VAE"],["14","11",0,"12",0,"IMAGE"],["15","12",1,"10",2,"MASK"],["16","12",0,"10",0,"IMAGE"],["17","8",0,"13",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Pose-ControlNet-workflow.json b/apps/electron-frontend/src/components/templates/data/Pose-ControlNet-workflow.json index eaa6f95b..3a099a18 100644 --- a/apps/electron-frontend/src/components/templates/data/Pose-ControlNet-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Pose-ControlNet-workflow.json @@ -1 +1 @@ -{"id":"986942ff-32de-400d-a5fb-db80ec2f852f","title":"Pose ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1205,174],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":17},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[757125948756855,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-220.43367174280888,-214.979780033841],"size":[340,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[48],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[929,481],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[193.1136209813875,-226.375972927242],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["masterpiece detailed illustration of a sci-fi battle robot dancing on the street of on an alien planet"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[782.8679357021997,233.41522842639594],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, painting, drawing, photography, distorted, horror"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1540,177.79238578680201],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":48}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1773.565736040609,179.6603214890017],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-43.60439932318104,186.30338409475465],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[45],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_dance.jpg",null],"order":0,"mode":0},{"id":"14","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[481.8102368866329,31.265313028764808],"size":[365,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[15],"shape":3,"slot_index":0}],"widgets_values":["SD-v1.5-ControlNet-Openpose-fp16.safetensors"],"order":0,"mode":0},{"id":"16","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[927.2445008460235,39.75490693739425],"size":[212,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":16},{"name":"control_net","type":"CONTROL_NET","link":15},{"name":"image","type":"IMAGE","link":49}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17],"shape":3,"slot_index":0}],"widgets_values":[0.8999999999999999],"order":0,"mode":0},{"id":"17","type":"PreviewImage","properties":{"Node name for S&R":"PreviewImage"},"pos":[492.81142131979686,181.92681895093062],"size":[204,246],"inputs":[{"name":"images","type":"IMAGE","link":47}],"outputs":[],"widgets_values":[],"order":0,"mode":0},{"id":"24","type":"ImageScale","properties":{"Node name for S&R":"ImageScale"},"pos":[634.79179357022,-228.80786802030468],"size":[210,227],"inputs":[{"name":"image","type":"IMAGE","link":46}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[49],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",512,512,"disabled"],"order":0,"mode":0},{"id":"28","type":"DWPreprocessor","properties":{"Node name for S&R":"DWPreprocessor"},"pos":[198.67876480541457,182.35989847715732],"size":[240,75],"inputs":[{"name":"image","type":"IMAGE","link":45}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[46,47],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["15","14",0,"16",1,"CONTROL_NET"],["16","6",0,"16",0,"CONDITIONING"],["17","16",0,"3",1,"CONDITIONING"],["45","12",0,"28",0,"IMAGE"],["46","28",0,"24",0,"IMAGE"],["47","28",0,"17",0,"IMAGE"],["48","4",2,"8",1,"VAE"],["49","24",0,"16",2,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"986942ff-32de-400d-a5fb-db80ec2f852f","title":"Pose ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1205,174],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":17},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[757125948756855,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-220.43367174280888,-214.979780033841],"size":[340,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[48],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[929,481],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[193.1136209813875,-226.375972927242],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["masterpiece detailed illustration of a sci-fi battle robot dancing on the street of on an alien planet"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[782.8679357021997,233.41522842639594],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, painting, drawing, photography, distorted, horror"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1540,177.79238578680201],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":48}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1773.565736040609,179.6603214890017],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-43.60439932318104,186.30338409475465],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[45],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_dance.jpg",null],"order":0,"mode":0},{"id":"14","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[481.8102368866329,31.265313028764808],"size":[365,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[15],"shape":3,"slot_index":0}],"widgets_values":["SD-v1.5-ControlNet-Openpose-fp16.safetensors"],"order":0,"mode":0},{"id":"16","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[927.2445008460235,39.75490693739425],"size":[212,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":16},{"name":"control_net","type":"CONTROL_NET","link":15},{"name":"image","type":"IMAGE","link":49}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[17],"shape":3,"slot_index":0}],"widgets_values":[0.8999999999999999],"order":0,"mode":0},{"id":"17","type":"PreviewImage","properties":{"Node name for S&R":"PreviewImage"},"pos":[492.81142131979686,181.92681895093062],"size":[204,246],"inputs":[{"name":"images","type":"IMAGE","link":47}],"outputs":[],"widgets_values":[],"order":0,"mode":0},{"id":"24","type":"ImageScale","properties":{"Node name for S&R":"ImageScale"},"pos":[634.79179357022,-228.80786802030468],"size":[210,227],"inputs":[{"name":"image","type":"IMAGE","link":46}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[49],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",512,512,"disabled"],"order":0,"mode":0},{"id":"28","type":"DWPreprocessor","properties":{"Node name for S&R":"DWPreprocessor"},"pos":[198.67876480541457,182.35989847715732],"size":[240,75],"inputs":[{"name":"image","type":"IMAGE","link":45}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[46,47],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["15","14",0,"16",1,"CONTROL_NET"],["16","6",0,"16",0,"CONDITIONING"],["17","16",0,"3",1,"CONDITIONING"],["45","12",0,"28",0,"IMAGE"],["46","28",0,"24",0,"IMAGE"],["47","28",0,"17",0,"IMAGE"],["48","4",2,"8",1,"VAE"],["49","24",0,"16",2,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/SDXL-prompt-styler-workflow.json b/apps/electron-frontend/src/components/templates/data/SDXL-prompt-styler-workflow.json index 71e81f2f..9f140d87 100644 --- a/apps/electron-frontend/src/components/templates/data/SDXL-prompt-styler-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/SDXL-prompt-styler-workflow.json @@ -1 +1 @@ -{"id":"197f6593-ca05-48fa-9696-2cdca1f93086","title":"SDXL prompt styler workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[882380300250500,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[18.02715736040608,232.3720812182741],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["AnythingElse-V4.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[435.0478003384095,488.27648054145516],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[434,239],"size":[317,99],"inputs":[{"name":"clip","type":"CLIP","link":3},{"name":"text","type":"STRING","link":13,"widget":{"name":"text"}}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[437,365],"size":[313,99],"inputs":[{"name":"clip","type":"CLIP","link":5},{"name":"text","type":"STRING","link":12,"widget":{"name":"text"}}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"SDXLPromptStyler","properties":{"Node name for S&R":"SDXLPromptStyler"},"pos":[-68.67571912013534,422.2971235194585],"size":[400,510],"inputs":[],"outputs":[{"name":"text_positive","type":"STRING","links":[13],"shape":3,"slot_index":0},{"name":"text_negative","type":"STRING","links":[12],"shape":3,"slot_index":1}],"widgets_values":[null,null,null,null,null,null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["12","10",1,"7",1,"STRING"],["13","10",0,"6",1,"STRING"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"197f6593-ca05-48fa-9696-2cdca1f93086","title":"SDXL prompt styler workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[882380300250500,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[18.02715736040608,232.3720812182741],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["AnythingElse-V4.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[435.0478003384095,488.27648054145516],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[434,239],"size":[317,99],"inputs":[{"name":"clip","type":"CLIP","link":3},{"name":"text","type":"STRING","link":13,"widget":{"name":"text"}}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[437,365],"size":[313,99],"inputs":[{"name":"clip","type":"CLIP","link":5},{"name":"text","type":"STRING","link":12,"widget":{"name":"text"}}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"SDXLPromptStyler","properties":{"Node name for S&R":"SDXLPromptStyler"},"pos":[-68.67571912013534,422.2971235194585],"size":[400,510],"inputs":[],"outputs":[{"name":"text_positive","type":"STRING","links":[13],"shape":3,"slot_index":0},{"name":"text_negative","type":"STRING","links":[12],"shape":3,"slot_index":1}],"widgets_values":[null,null,null,null,null,null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["12","10",1,"7",1,"STRING"],["13","10",0,"6",1,"STRING"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Scribble-ControlNet-workflow.json b/apps/electron-frontend/src/components/templates/data/Scribble-ControlNet-workflow.json index 54183154..08c092a5 100644 --- a/apps/electron-frontend/src/components/templates/data/Scribble-ControlNet-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Scribble-ControlNet-workflow.json @@ -1 +1 @@ -{"id":"8d839df7-2a14-478d-934d-d6990d635446","title":"Scribble ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[842,150],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":19},{"name":"positive","type":"CONDITIONING","link":18},{"name":"negative","type":"CONDITIONING","link":16},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1002496614778823,"randomize",16,6,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[464.6294416243654,433.18527918781723],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[-93.25888324873091,-200.39467005076142],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":21}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[10],"slot_index":0}],"widgets_values":["(solo) girl (flat chest:0.9), (fennec ears:1.1)  (fox ears:1.1), (blonde hair:1.0), messy hair, sky clouds, standing in a grass field, (chibi), blue eyes"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[357.13578680203045,189.50634517766497],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":20}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["(hands), text, error, cropped, (worst quality:1.2), (low quality:1.2), normal quality, (jpeg artifacts:1.3), signature, watermark, username, blurry, artist name, monochrome, sketch, censorship, censor, (copyright:1.2), extra legs, (forehead mark) (depth of field) (emotionless) (penis)"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1210,250],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":22}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1453,247],"size":[394,449],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[459,8.284263959390863],"size":[317,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":10},{"name":"control_net","type":"CONTROL_NET","link":13},{"name":"image","type":"IMAGE","link":12}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[18],"slot_index":0}],"widgets_values":[0.8999999999999999],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-60.4073604060913,198.40736040609139],"size":[388,466],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12],"slot_index":0},{"name":"MASK","type":"MASK","links":null}],"widgets_values":["input_scribble_example.png",null],"order":0,"mode":0},{"id":"12","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[-92.7157360406091,47.642131979695435],"size":[422,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[13],"slot_index":0}],"widgets_values":["control_scribble.safetensors"],"order":0,"mode":0},{"id":"14","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-448,231],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[19],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[20,21],"slot_index":1},{"name":"VAE","type":"VAE","links":[22],"slot_index":2}],"widgets_values":["AnythingElse-V4.0.safetensors"],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","6",0,"10",0,"CONDITIONING"],["12","11",0,"10",2,"IMAGE"],["13","12",0,"10",1,"CONTROL_NET"],["16","7",0,"3",2,"CONDITIONING"],["18","10",0,"3",1,"CONDITIONING"],["19","14",0,"3",0,"MODEL"],["20","14",1,"7",0,"CLIP"],["21","14",1,"6",0,"CLIP"],["22","14",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"8d839df7-2a14-478d-934d-d6990d635446","title":"Scribble ControlNet workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[842,150],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":19},{"name":"positive","type":"CONDITIONING","link":18},{"name":"negative","type":"CONDITIONING","link":16},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1002496614778823,"randomize",16,6,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[464.6294416243654,433.18527918781723],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[-93.25888324873091,-200.39467005076142],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":21}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[10],"slot_index":0}],"widgets_values":["(solo) girl (flat chest:0.9), (fennec ears:1.1)  (fox ears:1.1), (blonde hair:1.0), messy hair, sky clouds, standing in a grass field, (chibi), blue eyes"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[357.13578680203045,189.50634517766497],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":20}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[16],"slot_index":0}],"widgets_values":["(hands), text, error, cropped, (worst quality:1.2), (low quality:1.2), normal quality, (jpeg artifacts:1.3), signature, watermark, username, blurry, artist name, monochrome, sketch, censorship, censor, (copyright:1.2), extra legs, (forehead mark) (depth of field) (emotionless) (penis)"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1210,250],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":22}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1453,247],"size":[394,449],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"ControlNetApply","properties":{"Node name for S&R":"ControlNetApply"},"pos":[459,8.284263959390863],"size":[317,161],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":10},{"name":"control_net","type":"CONTROL_NET","link":13},{"name":"image","type":"IMAGE","link":12}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[18],"slot_index":0}],"widgets_values":[0.8999999999999999],"order":0,"mode":0},{"id":"11","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[-60.4073604060913,198.40736040609139],"size":[388,466],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[12],"slot_index":0},{"name":"MASK","type":"MASK","links":null}],"widgets_values":["input_scribble_example.png",null],"order":0,"mode":0},{"id":"12","type":"ControlNetLoader","properties":{"Node name for S&R":"ControlNetLoader"},"pos":[-92.7157360406091,47.642131979695435],"size":[422,113],"inputs":[],"outputs":[{"name":"CONTROL_NET","type":"CONTROL_NET","links":[13],"slot_index":0}],"widgets_values":["control_scribble.safetensors"],"order":0,"mode":0},{"id":"14","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-448,231],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[19],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[20,21],"slot_index":1},{"name":"VAE","type":"VAE","links":[22],"slot_index":2}],"widgets_values":["AnythingElse-V4.0.safetensors"],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","6",0,"10",0,"CONDITIONING"],["12","11",0,"10",2,"IMAGE"],["13","12",0,"10",1,"CONTROL_NET"],["16","7",0,"3",2,"CONDITIONING"],["18","10",0,"3",1,"CONDITIONING"],["19","14",0,"3",0,"MODEL"],["20","14",1,"7",0,"CLIP"],["21","14",1,"6",0,"CLIP"],["22","14",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Simple-img2img-workflow.json b/apps/electron-frontend/src/components/templates/data/Simple-img2img-workflow.json index 239ada52..fad55b18 100644 --- a/apps/electron-frontend/src/components/templates/data/Simple-img2img-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Simple-img2img-workflow.json @@ -1 +1 @@ -{"id":"cea8bc18-4c8f-4e7b-bf15-2a09c002b0d5","title":"Simple img2img workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":13},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[321204507298344,"randomize",30,8,"dpmpp_2m","normal",0.8700000000000001],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[392.39109874826147,108.12489568845619],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["photograph of victorian woman with wings, sky clouds, meadow grass\n"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[395.4152990264256,357.59874826147427],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":15}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["watermark, text\n"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":17}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[214,736],"size":[317,485],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[10],"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["",null],"order":0,"mode":0},{"id":"12","type":"VAEEncode","properties":{"Node name for S&R":"VAEEncode"},"pos":[603.6755090909277,612.2202215703504],"size":[210,99],"inputs":[{"name":"pixels","type":"IMAGE","link":10},{"name":"vae","type":"VAE","link":16}],"outputs":[{"name":"LATENT","type":"LATENT","links":[11],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[8.951599443671768,433],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[13],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[14,15],"shape":3,"slot_index":1},{"name":"VAE","type":"VAE","links":[16,17],"shape":3,"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0}],"links":[["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"12",0,"IMAGE"],["11","12",0,"3",3,"LATENT"],["13","14",0,"3",0,"MODEL"],["14","14",1,"6",0,"CLIP"],["15","14",1,"7",0,"CLIP"],["16","14",2,"12",1,"VAE"],["17","14",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"cea8bc18-4c8f-4e7b-bf15-2a09c002b0d5","title":"Simple img2img workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":13},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":11}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[321204507298344,"randomize",30,8,"dpmpp_2m","normal",0.8700000000000001],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[392.39109874826147,108.12489568845619],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["photograph of victorian woman with wings, sky clouds, meadow grass\n"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[395.4152990264256,357.59874826147427],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":15}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["watermark, text\n"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":17}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"10","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[214,736],"size":[317,485],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[10],"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["",null],"order":0,"mode":0},{"id":"12","type":"VAEEncode","properties":{"Node name for S&R":"VAEEncode"},"pos":[603.6755090909277,612.2202215703504],"size":[210,99],"inputs":[{"name":"pixels","type":"IMAGE","link":10},{"name":"vae","type":"VAE","link":16}],"outputs":[{"name":"LATENT","type":"LATENT","links":[11],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[8.951599443671768,433],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[13],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[14,15],"shape":3,"slot_index":1},{"name":"VAE","type":"VAE","links":[16,17],"shape":3,"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0}],"links":[["4","6",0,"3",1,"CONDITIONING"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["10","10",0,"12",0,"IMAGE"],["11","12",0,"3",3,"LATENT"],["13","14",0,"3",0,"MODEL"],["14","14",1,"6",0,"CLIP"],["15","14",1,"7",0,"CLIP"],["16","14",2,"12",1,"VAE"],["17","14",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Style-model-workflow.json b/apps/electron-frontend/src/components/templates/data/Style-model-workflow.json index b24bb68c..36a82286 100644 --- a/apps/electron-frontend/src/components/templates/data/Style-model-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Style-model-workflow.json @@ -1 +1 @@ -{"id":"47cc63e5-e8d9-4851-8324-83cb0def7101","title":"Style model workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[928.0917941585535,-52.23574408901254],"size":[240,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":22},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1003683894614458,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-9.293463143254513,-63.233657858136304],"size":[250,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[25],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[663.5688456189151,198.25938803894306],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[336.7225312934632,-223.72878998609178],"size":[245,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[24],"slot_index":0}],"widgets_values":["girl"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[625.6369958275382,-55.804589707927704],"size":[262,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, text"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1205.3532684283728,-50.86648122392213],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":25}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1430.9541029207232,-46.758692628650905],"size":[408,533],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"StyleModelApply","properties":{"Node name for S&R":"StyleModelApply"},"pos":[623.5688456189151,-203.39360222531297],"size":[262,123],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":24},{"name":"style_model","type":"STYLE_MODEL","link":13},{"name":"clip_vision_output","type":"CLIP_VISION_OUTPUT","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[22],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"13","type":"StyleModelLoader","properties":{"Node name for S&R":"StyleModelLoader"},"pos":[341.66063977746865,19.009735744089006],"size":[240,115],"inputs":[],"outputs":[{"name":"STYLE_MODEL","type":"STYLE_MODEL","links":[13],"shape":3,"slot_index":0}],"widgets_values":["coadapter-style-sd15v1.pth"],"order":0,"mode":0},{"id":"14","type":"CLIPVisionLoader","properties":{"Node name for S&R":"CLIPVisionLoader"},"pos":[-29.541029207232256,163.07371349095968],"size":[309,123],"inputs":[],"outputs":[{"name":"CLIP_VISION","type":"CLIP_VISION","links":[15],"shape":3,"slot_index":0}],"widgets_values":["pytorch_model.bin"],"order":0,"mode":0},{"id":"15","type":"CLIPVisionEncode","properties":{"Node name for S&R":"CLIPVisionEncode"},"pos":[337.26147426981896,160.08762169680114],"size":[248,99],"inputs":[{"name":"clip_vision","type":"CLIP_VISION","link":15},{"name":"image","type":"IMAGE","link":16}],"outputs":[{"name":"CLIP_VISION_OUTPUT","type":"CLIP_VISION_OUTPUT","links":[14],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"16","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[63.56884561891516,327.4290681502086],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[16],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_marble_statue.jpg",null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","13",0,"12",1,"STYLE_MODEL"],["14","15",0,"12",2,"CLIP_VISION_OUTPUT"],["15","14",0,"15",0,"CLIP_VISION"],["16","16",0,"15",1,"IMAGE"],["22","12",0,"3",1,"CONDITIONING"],["24","6",0,"12",0,"CONDITIONING"],["25","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"47cc63e5-e8d9-4851-8324-83cb0def7101","title":"Style model workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[928.0917941585535,-52.23574408901254],"size":[240,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":22},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[1003683894614458,"randomize",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-9.293463143254513,-63.233657858136304],"size":[250,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[25],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[663.5688456189151,198.25938803894306],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[336.7225312934632,-223.72878998609178],"size":[245,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[24],"slot_index":0}],"widgets_values":["girl"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[625.6369958275382,-55.804589707927704],"size":[262,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration, naked, text"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1205.3532684283728,-50.86648122392213],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":25}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1430.9541029207232,-46.758692628650905],"size":[408,533],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"StyleModelApply","properties":{"Node name for S&R":"StyleModelApply"},"pos":[623.5688456189151,-203.39360222531297],"size":[262,123],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":24},{"name":"style_model","type":"STYLE_MODEL","link":13},{"name":"clip_vision_output","type":"CLIP_VISION_OUTPUT","link":14}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[22],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"13","type":"StyleModelLoader","properties":{"Node name for S&R":"StyleModelLoader"},"pos":[341.66063977746865,19.009735744089006],"size":[240,115],"inputs":[],"outputs":[{"name":"STYLE_MODEL","type":"STYLE_MODEL","links":[13],"shape":3,"slot_index":0}],"widgets_values":["coadapter-style-sd15v1.pth"],"order":0,"mode":0},{"id":"14","type":"CLIPVisionLoader","properties":{"Node name for S&R":"CLIPVisionLoader"},"pos":[-29.541029207232256,163.07371349095968],"size":[309,123],"inputs":[],"outputs":[{"name":"CLIP_VISION","type":"CLIP_VISION","links":[15],"shape":3,"slot_index":0}],"widgets_values":["pytorch_model.bin"],"order":0,"mode":0},{"id":"15","type":"CLIPVisionEncode","properties":{"Node name for S&R":"CLIPVisionEncode"},"pos":[337.26147426981896,160.08762169680114],"size":[248,99],"inputs":[{"name":"clip_vision","type":"CLIP_VISION","link":15},{"name":"image","type":"IMAGE","link":16}],"outputs":[{"name":"CLIP_VISION_OUTPUT","type":"CLIP_VISION_OUTPUT","links":[14],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"16","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[63.56884561891516,327.4290681502086],"size":[210,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[16],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_marble_statue.jpg",null],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","13",0,"12",1,"STYLE_MODEL"],["14","15",0,"12",2,"CLIP_VISION_OUTPUT"],["15","14",0,"15",0,"CLIP_VISION"],["16","16",0,"15",1,"IMAGE"],["22","12",0,"3",1,"CONDITIONING"],["24","6",0,"12",0,"CONDITIONING"],["25","4",2,"8",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-and-Hi-res-fix-workflow.json b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-and-Hi-res-fix-workflow.json index a94af300..061e49c2 100644 --- a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-and-Hi-res-fix-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-and-Hi-res-fix-workflow.json @@ -1 +1 @@ -{"id":"81cb5889-9a2d-471f-94e3-a778e6837a56","title":"Upscale pixel and hi-res fix latent workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,-9.809510026424984],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[17],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-22.805058230080107,201.18918123524094],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1,14],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,23,24],"slot_index":2}],"widgets_values":["sd_xl_refiner_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[498.95065795530934,376.623653763821],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[387.8697666830857,-165.51345775828102],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4,12],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[384.6901913214806,103.54276249159733],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6,13],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[2846.773212957964,14.101079830342485],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":15},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[3098.883320940998,19.327866872378287],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"11","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[2485.2851265715367,18.159419359843298],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":12},{"name":"negative","type":"CONDITIONING","link":13},{"name":"latent_image","type":"LATENT","link":22}],"outputs":[{"name":"LATENT","type":"LATENT","links":[15],"shape":3,"slot_index":0}],"widgets_values":[0,"randomize",20,8,"dpmpp_2m","karras",0.5],"order":0,"mode":0},{"id":"12","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1335.7797840339317,155.1725615117781],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":17},{"name":"vae","type":"VAE","link":23}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[18],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"13","type":"ImageUpscaleWithModel","properties":{"Node name for S&R":"ImageUpscaleWithModel"},"pos":[1598.3434661010376,3.1010798303424636],"size":[242,99],"inputs":[{"name":"upscale_model","type":"UPSCALE_MODEL","link":19},{"name":"image","type":"IMAGE","link":18}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[20],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"UpscaleModelLoader","properties":{"Node name for S&R":"UpscaleModelLoader"},"pos":[1236.4774013112171,3.1701044350537124],"size":[315,113],"inputs":[],"outputs":[{"name":"UPSCALE_MODEL","type":"UPSCALE_MODEL","links":[19],"shape":3,"slot_index":0}],"widgets_values":["BSRGANx2.pth"],"order":0,"mode":0},{"id":"15","type":"LatentUpscaleBy","properties":{"Node name for S&R":"LatentUpscaleBy"},"pos":[2135.1166790590014,8.176675511021074],"size":[315,151],"inputs":[{"name":"samples","type":"LATENT","link":21}],"outputs":[{"name":"LATENT","type":"LATENT","links":[22],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",1.5],"order":0,"mode":0},{"id":"16","type":"VAEEncode","properties":{"Node name for S&R":"VAEEncode"},"pos":[1890.4190617817162,5.101079830342414],"size":[210,99],"inputs":[{"name":"pixels","type":"IMAGE","link":20},{"name":"vae","type":"VAE","link":24}],"outputs":[{"name":"LATENT","type":"LATENT","links":[21],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["12","6",0,"11",1,"CONDITIONING"],["13","7",0,"11",2,"CONDITIONING"],["14","4",0,"11",0,"MODEL"],["15","11",0,"8",0,"LATENT"],["17","3",0,"12",0,"LATENT"],["18","12",0,"13",1,"IMAGE"],["19","14",0,"13",0,"UPSCALE_MODEL"],["20","13",0,"16",0,"IMAGE"],["21","16",0,"15",0,"LATENT"],["22","15",0,"11",3,"LATENT"],["23","4",2,"12",1,"VAE"],["24","4",2,"16",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"81cb5889-9a2d-471f-94e3-a778e6837a56","title":"Upscale pixel and hi-res fix latent workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,-9.809510026424984],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[17],"slot_index":0}],"widgets_values":[156680208700286,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-22.805058230080107,201.18918123524094],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1,14],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8,23,24],"slot_index":2}],"widgets_values":["sd_xl_refiner_1.0.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[498.95065795530934,376.623653763821],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[387.8697666830857,-165.51345775828102],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4,12],"slot_index":0}],"widgets_values":["Cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[384.6901913214806,103.54276249159733],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6,13],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[2846.773212957964,14.101079830342485],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":15},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[3098.883320940998,19.327866872378287],"size":[210,313],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"11","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[2485.2851265715367,18.159419359843298],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":12},{"name":"negative","type":"CONDITIONING","link":13},{"name":"latent_image","type":"LATENT","link":22}],"outputs":[{"name":"LATENT","type":"LATENT","links":[15],"shape":3,"slot_index":0}],"widgets_values":[0,"randomize",20,8,"dpmpp_2m","karras",0.5],"order":0,"mode":0},{"id":"12","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1335.7797840339317,155.1725615117781],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":17},{"name":"vae","type":"VAE","link":23}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[18],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"13","type":"ImageUpscaleWithModel","properties":{"Node name for S&R":"ImageUpscaleWithModel"},"pos":[1598.3434661010376,3.1010798303424636],"size":[242,99],"inputs":[{"name":"upscale_model","type":"UPSCALE_MODEL","link":19},{"name":"image","type":"IMAGE","link":18}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[20],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"UpscaleModelLoader","properties":{"Node name for S&R":"UpscaleModelLoader"},"pos":[1236.4774013112171,3.1701044350537124],"size":[315,113],"inputs":[],"outputs":[{"name":"UPSCALE_MODEL","type":"UPSCALE_MODEL","links":[19],"shape":3,"slot_index":0}],"widgets_values":["BSRGANx2.pth"],"order":0,"mode":0},{"id":"15","type":"LatentUpscaleBy","properties":{"Node name for S&R":"LatentUpscaleBy"},"pos":[2135.1166790590014,8.176675511021074],"size":[315,151],"inputs":[{"name":"samples","type":"LATENT","link":21}],"outputs":[{"name":"LATENT","type":"LATENT","links":[22],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",1.5],"order":0,"mode":0},{"id":"16","type":"VAEEncode","properties":{"Node name for S&R":"VAEEncode"},"pos":[1890.4190617817162,5.101079830342414],"size":[210,99],"inputs":[{"name":"pixels","type":"IMAGE","link":20},{"name":"vae","type":"VAE","link":24}],"outputs":[{"name":"LATENT","type":"LATENT","links":[21],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"],["12","6",0,"11",1,"CONDITIONING"],["13","7",0,"11",2,"CONDITIONING"],["14","4",0,"11",0,"MODEL"],["15","11",0,"8",0,"LATENT"],["17","3",0,"12",0,"LATENT"],["18","12",0,"13",1,"IMAGE"],["19","14",0,"13",0,"UPSCALE_MODEL"],["20","13",0,"16",0,"IMAGE"],["21","16",0,"15",0,"LATENT"],["22","15",0,"11",3,"LATENT"],["23","4",2,"12",1,"VAE"],["24","4",2,"16",1,"VAE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-algorithm-workflow.json b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-algorithm-workflow.json index 031083bc..849760ac 100644 --- a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-algorithm-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-algorithm-workflow.json @@ -1 +1 @@ -{"id":"fb4bdbb5-7712-42b7-badf-5ad0ae97d652","title":"Upscale pixel by algorithm workflow","nodes":[{"id":"1","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[473.39541029207237,174.7307371349096],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[1],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["oldphoto2.png",null],"order":0,"mode":0},{"id":"2","type":"ImageScaleBy","properties":{"Node name for S&R":"ImageScaleBy"},"pos":[855.3418636995826,175.2115438108484],"size":[315,151],"inputs":[{"name":"image","type":"IMAGE","link":1}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[2],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",2],"order":0,"mode":0},{"id":"3","type":"SaveImage","properties":{},"pos":[1235.401668984701,175.23504867872046],"size":[321,442],"inputs":[{"name":"images","type":"IMAGE","link":2}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","1",0,"2",0,"IMAGE"],["2","2",0,"3",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"fb4bdbb5-7712-42b7-badf-5ad0ae97d652","title":"Upscale pixel by algorithm workflow","nodes":[{"id":"1","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[473.39541029207237,174.7307371349096],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[1],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["oldphoto2.png",null],"order":0,"mode":0},{"id":"2","type":"ImageScaleBy","properties":{"Node name for S&R":"ImageScaleBy"},"pos":[855.3418636995826,175.2115438108484],"size":[315,151],"inputs":[{"name":"image","type":"IMAGE","link":1}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[2],"shape":3,"slot_index":0}],"widgets_values":["nearest-exact",2],"order":0,"mode":0},{"id":"3","type":"SaveImage","properties":{},"pos":[1235.401668984701,175.23504867872046],"size":[321,442],"inputs":[{"name":"images","type":"IMAGE","link":2}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","1",0,"2",0,"IMAGE"],["2","2",0,"3",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-model-workflow.json b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-model-workflow.json index 2954870f..fbbb8521 100644 --- a/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-model-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/Upscale-pixel-by-model-workflow.json @@ -1 +1 @@ -{"id":"f3a52eae-84eb-4bbf-897d-226d59a4e20a","title":"Upscale pixel by model workflow","nodes":[{"id":"1","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[704.9874826147428,245.4214186369958],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[5],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["oldphoto2.png",null],"order":0,"mode":0},{"id":"3","type":"SaveImage","properties":{},"pos":[1407,211],"size":[315,313],"inputs":[{"name":"images","type":"IMAGE","link":4,"slot_index":0}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"4","type":"UpscaleModelLoader","properties":{"Node name for S&R":"UpscaleModelLoader"},"pos":[701,87],"size":[315,113],"inputs":[],"outputs":[{"name":"UPSCALE_MODEL","type":"UPSCALE_MODEL","links":[6],"shape":3,"slot_index":0}],"widgets_values":["BSRGANx2.pth"],"order":0,"mode":0},{"id":"5","type":"ImageUpscaleWithModel","properties":{"Node name for S&R":"ImageUpscaleWithModel"},"pos":[1084,208],"size":[242,99],"inputs":[{"name":"upscale_model","type":"UPSCALE_MODEL","link":6},{"name":"image","type":"IMAGE","link":5}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[4],"shape":3}],"widgets_values":[],"order":0,"mode":0}],"links":[["4","5",0,"3",0,"IMAGE"],["5","1",0,"5",1,"IMAGE"],["6","4",0,"5",0,"UPSCALE_MODEL"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"f3a52eae-84eb-4bbf-897d-226d59a4e20a","title":"Upscale pixel by model workflow","nodes":[{"id":"1","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[704.9874826147428,245.4214186369958],"size":[315,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[5],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["oldphoto2.png",null],"order":0,"mode":0},{"id":"3","type":"SaveImage","properties":{},"pos":[1407,211],"size":[315,313],"inputs":[{"name":"images","type":"IMAGE","link":4,"slot_index":0}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0},{"id":"4","type":"UpscaleModelLoader","properties":{"Node name for S&R":"UpscaleModelLoader"},"pos":[701,87],"size":[315,113],"inputs":[],"outputs":[{"name":"UPSCALE_MODEL","type":"UPSCALE_MODEL","links":[6],"shape":3,"slot_index":0}],"widgets_values":["BSRGANx2.pth"],"order":0,"mode":0},{"id":"5","type":"ImageUpscaleWithModel","properties":{"Node name for S&R":"ImageUpscaleWithModel"},"pos":[1084,208],"size":[242,99],"inputs":[{"name":"upscale_model","type":"UPSCALE_MODEL","link":6},{"name":"image","type":"IMAGE","link":5}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[4],"shape":3}],"widgets_values":[],"order":0,"mode":0}],"links":[["4","5",0,"3",0,"IMAGE"],["5","1",0,"5",1,"IMAGE"],["6","4",0,"5",0,"UPSCALE_MODEL"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/default-workflow.json b/apps/electron-frontend/src/components/templates/data/default-workflow.json index ef087643..3aad3c89 100644 --- a/apps/electron-frontend/src/components/templates/data/default-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/default-workflow.json @@ -1 +1 @@ -{"id":"b1e2f57b-a924-4433-8d13-3cf2b2eae0fa","title":"Default Workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[931096203916419,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-7.768776077885974,195.09492350486786],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[505.51808066759395,588.9888734353269],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[398.740959666203,70.93602225312932],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[397.99165507649514,325.2145340751043],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"b1e2f57b-a924-4433-8d13-3cf2b2eae0fa","title":"Default Workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[863,186],"size":[315,413],"inputs":[{"name":"model","type":"MODEL","link":1},{"name":"positive","type":"CONDITIONING","link":4},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[931096203916419,"randomize",20,8,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"4","type":"CheckpointLoaderSimple","properties":{"Node name for S&R":"CheckpointLoaderSimple"},"pos":[-7.768776077885974,195.09492350486786],"size":[315,161],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[1],"slot_index":0},{"name":"CLIP","type":"CLIP","links":[3,5],"slot_index":1},{"name":"VAE","type":"VAE","links":[8],"slot_index":2}],"widgets_values":["v1-5-dream-shaper.safetensors"],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[505.51808066759395,588.9888734353269],"size":[315,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[512,512,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[398.740959666203,70.93602225312932],"size":[423,221],"inputs":[{"name":"clip","type":"CLIP","link":3}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[4],"slot_index":0}],"widgets_values":["cat, standing on the castle"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[397.99165507649514,325.2145340751043],"size":[425,221],"inputs":[{"name":"clip","type":"CLIP","link":5}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["text, watermark"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1209,188],"size":[210,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":8}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1451,189],"size":[210,270],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["ComfyUI"],"order":0,"mode":0}],"links":[["1","4",0,"3",0,"MODEL"],["2","5",0,"3",3,"LATENT"],["3","4",1,"6",0,"CLIP"],["4","6",0,"3",1,"CONDITIONING"],["5","4",1,"7",0,"CLIP"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["8","4",2,"8",1,"VAE"],["9","8",0,"9",0,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-frontend/src/components/templates/data/unCLIP-model-workflow.json b/apps/electron-frontend/src/components/templates/data/unCLIP-model-workflow.json index c41ca9e2..f96cd719 100644 --- a/apps/electron-frontend/src/components/templates/data/unCLIP-model-workflow.json +++ b/apps/electron-frontend/src/components/templates/data/unCLIP-model-workflow.json @@ -1 +1 @@ -{"id":"f27d1766-cb0c-4368-a09b-cb452a22bfc5","title":"unCLIP model workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1108.652294853964,34.92183588317107],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":19},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[2,"randomnized",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[826.1132127955494,432.5687065368567],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[768,768,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[361.41105702364393,-209.5902642559109],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[18],"slot_index":0}],"widgets_values":["a beautiful photograph of an old European city"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[675.8598052851183,164.67253129346315],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":21}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1458.0566063977747,42.75876216968011],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":15}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1697.2129346314325,43.32614742698192],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"unCLIPCheckpointLoader","properties":{"Node name for S&R":"unCLIPCheckpointLoader"},"pos":[47.24123783031993,-207.1441585535466],"size":[250,185],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[14],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,21],"shape":3,"slot_index":1},{"name":"VAE","type":"VAE","links":[15],"shape":3,"slot_index":2},{"name":"CLIP_VISION","type":"CLIP_VISION","links":[16],"shape":3,"slot_index":3}],"widgets_values":["sd21-unclip-h.ckpt"],"order":0,"mode":0},{"id":"13","type":"CLIPVisionEncode","properties":{"Node name for S&R":"CLIPVisionEncode"},"pos":[477.6805980528511,36.45959666203063],"size":[254,99],"inputs":[{"name":"clip_vision","type":"CLIP_VISION","link":16},{"name":"image","type":"IMAGE","link":24}],"outputs":[{"name":"CLIP_VISION_OUTPUT","type":"CLIP_VISION_OUTPUT","links":[17],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"unCLIPConditioning","properties":{"Node name for S&R":"unCLIPConditioning"},"pos":[764.1698191933241,-203.32072322670376],"size":[262,175],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":18},{"name":"clip_vision_output","type":"CLIP_VISION_OUTPUT","link":17}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[19],"shape":3,"slot_index":0}],"widgets_values":[1,0.1],"order":0,"mode":0},{"id":"15","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[198.36926286509038,91.97712100139083],"size":[240,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[24],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_budapest (1).jpg",null],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","12",1,"6",0,"CLIP"],["14","12",0,"3",0,"MODEL"],["15","12",2,"8",1,"VAE"],["16","12",3,"13",0,"CLIP_VISION"],["17","13",0,"14",1,"CLIP_VISION_OUTPUT"],["18","6",0,"14",0,"CONDITIONING"],["19","14",0,"3",1,"CONDITIONING"],["21","12",1,"7",0,"CLIP"],["24","15",0,"13",1,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.1-alpha"}} \ No newline at end of file +{"id":"f27d1766-cb0c-4368-a09b-cb452a22bfc5","title":"unCLIP model workflow","nodes":[{"id":"3","type":"KSampler","properties":{"Node name for S&R":"KSampler"},"pos":[1108.652294853964,34.92183588317107],"size":[300,413],"inputs":[{"name":"model","type":"MODEL","link":14},{"name":"positive","type":"CONDITIONING","link":19},{"name":"negative","type":"CONDITIONING","link":6},{"name":"latent_image","type":"LATENT","link":2}],"outputs":[{"name":"LATENT","type":"LATENT","links":[7],"slot_index":0}],"widgets_values":[2,"randomnized",20,7,"dpmpp_2m","karras",1],"order":0,"mode":0},{"id":"5","type":"EmptyLatentImage","properties":{"Node name for S&R":"EmptyLatentImage"},"pos":[826.1132127955494,432.5687065368567],"size":[220,189],"inputs":[],"outputs":[{"name":"LATENT","type":"LATENT","links":[2],"slot_index":0}],"widgets_values":[768,768,1],"order":0,"mode":0},{"id":"6","type":"CLIPTextEncode","title":"CLIP Text Encode (Positive)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[361.41105702364393,-209.5902642559109],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":13}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[18],"slot_index":0}],"widgets_values":["a beautiful photograph of an old European city"],"order":0,"mode":0},{"id":"7","type":"CLIPTextEncode","title":"CLIP Text Encode (Negative)","properties":{"Node name for S&R":"CLIPTextEncode"},"pos":[675.8598052851183,164.67253129346315],"size":[370,221],"inputs":[{"name":"clip","type":"CLIP","link":21}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[6],"slot_index":0}],"widgets_values":["blurry, illustration"],"order":0,"mode":0},{"id":"8","type":"VAEDecode","properties":{"Node name for S&R":"VAEDecode"},"pos":[1458.0566063977747,42.75876216968011],"size":[140,99],"inputs":[{"name":"samples","type":"LATENT","link":7},{"name":"vae","type":"VAE","link":15}],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[9],"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"9","type":"SaveImage","properties":{},"pos":[1697.2129346314325,43.32614742698192],"size":[410,460],"inputs":[{"name":"images","type":"IMAGE","link":9}],"outputs":[],"widgets_values":["Result"],"order":0,"mode":0},{"id":"12","type":"unCLIPCheckpointLoader","properties":{"Node name for S&R":"unCLIPCheckpointLoader"},"pos":[47.24123783031993,-207.1441585535466],"size":[250,185],"inputs":[],"outputs":[{"name":"MODEL","type":"MODEL","links":[14],"shape":3,"slot_index":0},{"name":"CLIP","type":"CLIP","links":[13,21],"shape":3,"slot_index":1},{"name":"VAE","type":"VAE","links":[15],"shape":3,"slot_index":2},{"name":"CLIP_VISION","type":"CLIP_VISION","links":[16],"shape":3,"slot_index":3}],"widgets_values":["sd21-unclip-h.ckpt"],"order":0,"mode":0},{"id":"13","type":"CLIPVisionEncode","properties":{"Node name for S&R":"CLIPVisionEncode"},"pos":[477.6805980528511,36.45959666203063],"size":[254,99],"inputs":[{"name":"clip_vision","type":"CLIP_VISION","link":16},{"name":"image","type":"IMAGE","link":24}],"outputs":[{"name":"CLIP_VISION_OUTPUT","type":"CLIP_VISION_OUTPUT","links":[17],"shape":3,"slot_index":0}],"widgets_values":[],"order":0,"mode":0},{"id":"14","type":"unCLIPConditioning","properties":{"Node name for S&R":"unCLIPConditioning"},"pos":[764.1698191933241,-203.32072322670376],"size":[262,175],"inputs":[{"name":"conditioning","type":"CONDITIONING","link":18},{"name":"clip_vision_output","type":"CLIP_VISION_OUTPUT","link":17}],"outputs":[{"name":"CONDITIONING","type":"CONDITIONING","links":[19],"shape":3,"slot_index":0}],"widgets_values":[1,0.1],"order":0,"mode":0},{"id":"15","type":"LoadImage","properties":{"Node name for S&R":"LoadImage"},"pos":[198.36926286509038,91.97712100139083],"size":[240,345],"inputs":[],"outputs":[{"name":"IMAGE","type":"IMAGE","links":[24],"shape":3,"slot_index":0},{"name":"MASK","type":"MASK","links":null,"shape":3}],"widgets_values":["cwf_budapest (1).jpg",null],"order":0,"mode":0}],"links":[["2","5",0,"3",3,"LATENT"],["6","7",0,"3",2,"CONDITIONING"],["7","3",0,"8",0,"LATENT"],["9","8",0,"9",0,"IMAGE"],["13","12",1,"6",0,"CLIP"],["14","12",0,"3",0,"MODEL"],["15","12",2,"8",1,"VAE"],["16","12",3,"13",0,"CLIP_VISION"],["17","13",0,"14",1,"CLIP_VISION_OUTPUT"],["18","6",0,"14",0,"CONDITIONING"],["19","14",0,"3",1,"CONDITIONING"],["21","12",1,"7",0,"CLIP"],["24","15",0,"13",1,"IMAGE"]],"groups":[],"version":0,"extra":{"comflowy_version":"0.2.2-alpha"}} \ No newline at end of file diff --git a/apps/electron-package/package-lock.json b/apps/electron-package/package-lock.json index 1ef51068..4b68de9e 100644 --- a/apps/electron-package/package-lock.json +++ b/apps/electron-package/package-lock.json @@ -1,12 +1,12 @@ { "name": "comflowy", - "version": "0.2.1-alpha", + "version": "0.2.2-alpha", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "comflowy", - "version": "0.2.1-alpha", + "version": "0.2.2-alpha", "dependencies": { "node-pty": "^1.0.0", "regedit": "^5.1.2" diff --git a/apps/electron-package/package.json b/apps/electron-package/package.json index 1c19a5e0..e3104c10 100644 --- a/apps/electron-package/package.json +++ b/apps/electron-package/package.json @@ -1,6 +1,6 @@ { "name": "comflowy", - "version": "0.2.1-alpha", + "version": "0.2.2-alpha", "private": true, "main": "layers/main/dist/index.js", "scripts": { From 4422e20bdbe3720bcd9ee5b03fed8d692c7af6e9 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 2 Aug 2024 17:39:09 +0800 Subject: [PATCH 18/23] optimize slot connecting experience --- ...tflow-bottomcenter-panel.style.module.scss | 4 +- .../reactflow-node-slot-full.tsx | 133 ++++++++++++++ .../reactflow-node/reactflow-node-slot.tsx | 31 +++- .../reactflow-node.style.module.scss | 173 ++++++++++++++---- .../reactflow-node/reactflow-node.tsx | 55 +++--- .../workflow-editor.style.module.scss | 84 ++++++--- 6 files changed, 382 insertions(+), 98 deletions(-) create mode 100644 apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-bottomcenter-panel/reactflow-bottomcenter-panel.style.module.scss b/apps/electron-frontend/src/components/workflow-editor/reactflow-bottomcenter-panel/reactflow-bottomcenter-panel.style.module.scss index 71d5b3ff..28483885 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-bottomcenter-panel/reactflow-bottomcenter-panel.style.module.scss +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-bottomcenter-panel/reactflow-bottomcenter-panel.style.module.scss @@ -7,11 +7,10 @@ background-color: var(--backgroundColorL1); :global { .action { - background-color: var(--backgroundColorL2); + //background-color: var(--backgroundColorL2); height: 36px; width: 36px; border-radius: 8px; - } .action svg { * { @@ -29,6 +28,7 @@ color: var(--primaryColor); } + .stop-square { display: inline-block; width: 18px; diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx new file mode 100644 index 00000000..15e4be49 --- /dev/null +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx @@ -0,0 +1,133 @@ +import { useAppStore } from "@comflowy/common/store"; +import { ComfyUIWorkflowNodeInput, ComfyUIWorkflowNodeOutput } from "@comflowy/common/types"; +import { useCallback, useEffect, useState } from "react"; +import { Connection, type HandleType, OnConnectStartParams } from 'reactflow' + +export type ConnectingMeContext = { + connectingParams: OnConnectStartParams & { + valueType: string; + }, + selectSlot: { + type: HandleType, + slot: ComfyUIWorkflowNodeInput | ComfyUIWorkflowNodeOutput + } +} + +export function useFullNodeConnecting({ widget, node_id, inputs, outputs }: { + widget: string, + node_id: string + inputs: ComfyUIWorkflowNodeInput[], + outputs: ComfyUIWorkflowNodeOutput[] +}) { + const isConnecting = useAppStore(st => st.isConnecting); + const [tryConnectThisNode, setTryConnectThisNode] = useState(false); + const connectingParams = useAppStore(st => st.connectingStartParams); + const [hoveringSlot, setHoveringSlot] = useState(false); + const [connectContext, setConnectContext] = useState(null); + inputs = inputs || []; + outputs = outputs || []; + + const onMouseEnter = useCallback(() => { + if (isConnecting) { + setTryConnectThisNode(true); + } + }, [isConnecting]) + + const onMouseLeave = useCallback(() => { + if (tryConnectThisNode) { + setTryConnectThisNode(false); + } + }, [tryConnectThisNode]); + + const onMouseUp = useCallback(() => { + if (connectContext && !hoveringSlot) { + const newConnection: Connection = { + source: connectContext.selectSlot.type === "source" ? node_id : connectContext.connectingParams.nodeId, + target: connectContext.selectSlot.type === "target" ? node_id : connectContext.connectingParams.nodeId, + sourceHandle: connectContext.selectSlot.type === "source" ? connectContext.selectSlot.slot.name.toUpperCase() : connectContext.connectingParams.handleId, + targetHandle: connectContext.selectSlot.type === "target" ? connectContext.selectSlot.slot.name.toUpperCase() : connectContext.connectingParams.handleId, + } + useAppStore.getState().onConnect(newConnection); + } + }, [connectContext, hoveringSlot]); + + const onMouseMove = useCallback((ev) => { + if (tryConnectThisNode) { + if (ev?.target && typeof ev.target.className === "string" && ev.target.className.includes("node-slot-handle")) { + setHoveringSlot(true) + } else { + setHoveringSlot(false) + } + } + }, [tryConnectThisNode]); + + useEffect(() => { + if (!tryConnectThisNode) { + setConnectContext(undefined) + return + } + + if (connectingParams) { + const connectingType = connectingParams.handleType; + const connectingValueType = connectingParams.valueType; + if (connectingType === "source") { + const targetSlot = inputs.find(input => input.type.toUpperCase() === connectingValueType || connectingValueType === "*"); + if (targetSlot) { + setConnectContext({ + connectingParams: connectingParams, + selectSlot: { + type: "target", + slot: targetSlot + } + }) + return + } + } + + if (connectingType === "target") { + const sourceSlot = outputs.find(output => output.name.toUpperCase() === connectingValueType || connectingValueType === "*"); + if (sourceSlot) { + setConnectContext({ + connectingParams: connectingParams, + selectSlot: { + type: "source", + slot: sourceSlot + } + }) + return + } + } + + setConnectContext(undefined) + } + }, [connectingParams, inputs, outputs, tryConnectThisNode]) + + const connectingIndicator = hoveringSlot ? undefined : ; + + return { + tryConnectThisNode, + onMouseEnter, + onMouseLeave, + onMouseUp, + onMouseMove, + connectContext, + connectingIndicator + } +} + + +function NodeConnectIndicator({ connectContext }: { + connectContext: ConnectingMeContext | null +}): JSX.Element { + if (!connectContext) { + return null + } + + const { connectingParams, selectSlot } = connectContext; + + return ( +
+
Release mouse to connect to {selectSlot.slot.name}
+
+ ) +} diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx index 983e31e6..0d9d1003 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx @@ -1,10 +1,10 @@ import { dt } from "@comflowy/common/i18n"; import { useAppStore } from "@comflowy/common/store"; import { validateEdge } from "@comflowy/common/store/app-state"; -import { Input } from "@comflowy/common/types"; +import { ComfyUIWorkflowNodeInput, ComfyUIWorkflowNodeOutput, Input } from "@comflowy/common/types"; import { ALREADY_HAS_GLOBAL_VARIABLE_MESSAGE, findMatchedGlobalVar, isAnywhereWidget } from "@comflowy/common/types/comfy-variables.types"; import { use, useCallback, useEffect, useMemo, useState } from "react"; -import { type NodeProps, Position, type HandleType, Handle, NodeResizeControl, Connection, Dimensions } from 'reactflow' +import { type NodeProps, Position, type HandleType, Handle, NodeResizeControl, Connection, Dimensions, OnConnectStartParams } from 'reactflow' import { message as AntMessage, Tooltip } from "antd"; import { LocatableNodeTitle } from "../reactflow-controlboard/controlboard-node"; @@ -30,6 +30,9 @@ export function Slot({ id, label, type, position, valueType, widget, node_id }: const transform = useAppStore(st => st.transform); const [connectingMe, setConnectingMe] = useState(false); + /** + * 这个检测函数触发的 Slot 是 connectingStart 的 + */ const isValidConnection = useCallback((connection: Connection) => { const st = useAppStore.getState(); const [validate, message] = validateEdge(st, connection); @@ -58,11 +61,11 @@ export function Slot({ id, label, type, position, valueType, widget, node_id }: let transformFactor = 1; const [hover, setHover] = useState(false); if (hover && !isConnecting) { - transformFactor = Math.max(1, (1 / transform)) * 2.2; + transformFactor = Math.max(1, (1 / transform)) * 3.2; } if (isConnecting && connectingMe) { - transformFactor = Math.max(1, (1 / transform)) * 2.8; + transformFactor = Math.max(1, (1 / transform)) * 3.2; }; const slotLabel = useSlotLabel({ node_id, valueType, type, label }); @@ -83,17 +86,19 @@ export function Slot({ id, label, type, position, valueType, widget, node_id }: }} className="node-slot-handle" style={{ - backgroundColor: color, // visibility: (transforming || invisible)? "hidden" : "visible", transform: `scale(${transformFactor})` - } as React.CSSProperties} /> + } as React.CSSProperties} > +
+
{slotLabel}
) } - function useSlotLabel(props: { node_id: string, valueType: string, @@ -129,10 +134,13 @@ function useSlotLabel(props: { // 如果是 anywhere widget,且有连接,返回连接的 sourceHandle if (connection && isAnywhereWidget(target_node_widget)) { const source_node_widget = widgets[source_node.widget]; + if (!source_node_widget) { + return defaultLabel + } const source_outputs = source_node_widget.output; const source_output_names = source_node_widget.output_name; const source_output_index = source_outputs.findIndex((output) => output === connection.sourceHandle); - const source_output_name = source_output_names[source_output_index]; + const source_output_name = source_output_names[source_output_index]; if (connection.targetHandle === "+VE") { return ( @@ -158,11 +166,14 @@ function useSlotLabel(props: { const widget = widgets[var_info.source_node.value.widget]; const source_node_title = var_info?.source_node.value.title || widget.display_name || widget.name; const $title = ( - + ) return ( Reference from: {$title} }> - {defaultLabel}{`(reference)`} + {defaultLabel}{`(reference)`} ) } diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss index c3543df0..32c1a5f7 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss @@ -1,21 +1,20 @@ .reactFlowNode { - --node-base-font-size: 12px; + --node-base-font-size: 0.81em; border: solid 2px transparent; box-sizing: content-box; display: flex; flex-direction: column; - height: 100%; + height: 94%; border-radius: 8px; border: 2px solid var(--node-border-color); - background-color: var(--node-bg-color); - // backdrop-filter: blur(6px); + background-color: var(--node-color); position: relative; min-width: 190px; box-sizing: border-box; width: 100%; $size: -4px; &::after, &::before { - content: ""; + content: ""; display: block; position: absolute; top: $size; @@ -24,7 +23,7 @@ bottom: $size; z-index: -1; background-color: var(--node-bg-color); - border-radius: 8px; + border-radius: 9px; visibility: hidden; opacity: 0; } @@ -35,7 +34,7 @@ right: $size2; bottom: $size2; background-image: linear-gradient(to right, var(--primaryColor), var(--secondaryColor)); - border-radius: 10px; + border-radius: 11px; } :global { @@ -59,18 +58,36 @@ } } } + + .node-slot-fullsize { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + background-color: #353535b5; + display: flex; + justify-content: center; + align-items: center; + transition: var(--transition); + .label { + padding: 40px; + text-align: center; + } + } .node-header { display: flex; flex-direction: row; align-items: center; - padding: 5px 7px 5px 12px; + padding: 6px 8px 6px 8px !important; background: var(--node-color);; padding: 4px 6px;; border-top-left-radius: 8px; border-top-right-radius: 8px; - height: 24px; - --icon-size: 20px; + height: 34px; + --icon-size: 18px; .node-title { flex: 1; position: absolute; @@ -123,11 +140,14 @@ position: relative; padding-bottom: 8px; padding-top: 8px; - border-bottom-left-radius: 8px; - border-bottom-right-radius: 8px; + margin: 2px; + border-radius: 6px; + background-color: var(--node-bg-color); } .node-slots { display: flex; + position: relative; + z-index: 10; .node-inputs, .node-outputs { flex: 1; display: flex; @@ -139,9 +159,11 @@ line-height: 14px; // font-family: JetBrains Mono, monospace; color: #A8A9AF; - padding: 4px 12px; + padding: 4px 22px; width: 100%; box-sizing: border-box; + display: flex; + position: relative; &.node-slot-right { text-align: right; } @@ -171,26 +193,31 @@ padding-right: 25px; display: flex; align-items: center; + height: 100%; >input { height: 24px; } } .ant-select-selector { - background-color: transparent; + padding: 0 8px 1px; + background-color: #1f202a80; border-color: #414356; } .ant-input-number, .ant-select, .ant-input { + border-radius: 6px !important; min-width: 100px; - max-width: calc(100% - 40px); border-color: #414356; - height: 26px; - background-color: var(--node-bg-color);; + height: 22px; + background-color: #1f202a80; &-focused { border-color: var(--primaryColor); } .ant-input-number-handler-wrap { background-color: transparent; } + .ant-select-arrow { + font-size: 10px; + } } input { // font-family: JetBrains Mono, monospace; @@ -212,6 +239,8 @@ display: block; .ant-btn { border-color: #414356; + height: 24px; + margin-top: 2px; } } .image-preview img { @@ -221,7 +250,6 @@ } } - .switch-wrapper { display: flex; .switch-label { @@ -242,6 +270,59 @@ .node-input-label-name { white-space: nowrap; } + + .custom-select-model-value { + border-radius: 6px; + border: solid 1px #2F3144; + background-color: #191A1F; + padding: 3px; + display: flex; + transition: var(--transition); + &:hover { + background-color: var(--actionHoverColor); + } + .label { + flex: 1; + flex-direction: column; + align-items: flex-start; + padding-left: 4px; + p{ + font-size: 12px; + margin: 0; + margin-top: 3px; + word-break: break-all; + line-height: 1.1; + margin-bottom: -3px; + } + .metas { + margin-top: 2px; + } + .meta { + margin-top: -3px; + font-size: 9px; + } + } + .model-thumbnail { + height: 38px; + width: 38px; + overflow: hidden; + transition: var(--transition); + border: solid 2px transparent; + &:hover { + border: solid 2px var(--backgroundColorL2); + } + .ant-image { + border: solid 1px #2F3144; + overflow: hidden; + width: 100% !important; + height: 100% !important; + border-radius: 4px; + img { + width: 100%; + } + } + } + } } .progress-bar { position: absolute; @@ -259,21 +340,6 @@ top: -3em; left: 0.5em; } - - .install-missing-widget { - padding: 0 10px; - } - - .connectionindicator { - // transition: var(--transition); - } - .node-slot-left .connectionindicator { - transform-origin: 10% 50%; - } - - .node-slot-right .connectionindicator { - transform-origin: 90% 50%; - } .node-images-preview { padding: 10px; @@ -336,18 +402,12 @@ } } - - .reactFlowSelected { &::before, &::after { visibility: visible !important; opacity: 1 !important; } - &::before { - background-image: linear-gradient(to right, #37B7AB, #37B7AB); - } - } .reactFlowGroup { @@ -375,6 +435,39 @@ } } +.reactFlowNodeUnknown { + &::before, + &::after { + visibility: visible !important; + opacity: 1 !important; + } + background-image: linear-gradient(to right, #CB2C95, #F75C2B); + :global { + .node-header { + background-color: transparent; + } + .node-main { + visibility: hidden; + } + .error-main { + padding: 10px; + overflow: hidden; + position: absolute; + top: 34px; + left: 2px; + right: 2px; + height: calc(100% - 34px - 2px); + // border-bottom-right-radius: 6px; + // border-bottom-left-radius: 6px; + border-radius: 6px; + background-color: #1C1D24; + p:first-child { + margin-top: 0; + } + } + } +} + .nodeErrors { width: 200px; max-height: 300px; @@ -438,4 +531,4 @@ } } } -} \ No newline at end of file +} diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.tsx index a1753162..91d53fa3 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.tsx @@ -1,5 +1,5 @@ -import { memo } from 'react' -import { type NodeProps, Position, Dimensions} from 'reactflow' +import { memo, useCallback, useState } from 'react' +import { type NodeProps, Position, Dimensions } from 'reactflow' import { Widget, SDNode, PreviewImage, SDNODE_DEFAULT_COLOR, NodeVisibleState } from '@comflowy/common/types'; import { InputContainer } from '../reactflow-input/reactflow-input-container'; import nodeStyles from "./reactflow-node.style.module.scss"; @@ -9,11 +9,11 @@ import { getWidgetIcon } from './reactflow-node-icons'; import { ComfyUINodeError } from '@comflowy/common/types'; import { getNodeRenderInfo } from "@comflowy/common/workflow-editor/node-rendering"; import { Slot } from './reactflow-node-slot'; -import { InstallMissingWidget, NodeError } from './reactflow-node-errors'; +import { NodeError } from './reactflow-node-errors'; import { ComflowyNodeResizer, useNodeAutoResize } from './reactflow-node-resize'; -import { NodeImagePreviews } from './reactflow-node-imagepreviews'; import { NodeWrapperProps } from './reactflow-node-wrapper'; import { ReactFlowNodeDynamic } from './reactflow-node-dynamic'; +import { useFullNodeConnecting } from './reactflow-node-slot-full'; export const NODE_IDENTIFIER = 'sdNode' interface Props { @@ -41,10 +41,10 @@ export const NodeComponent = memo(({ const { inputs, title, outputs, params } = renderInfo; const isInProgress = progressBar !== undefined const collapsed = node.data.visibleState === NodeVisibleState.Collapsed; - const {mainRef, minHeight, minWidth, setResizing} = useNodeAutoResize(node, imagePreviews); + const { mainRef, minHeight, minWidth, setResizing } = useNodeAutoResize(node, imagePreviews); const transform = useAppStore(st => st.transform || 1); const invisible = transform < INVISIBLE_TRANSFORM_THRSHOLD; - + let nodeColor = node.data.value.color || SDNODE_DEFAULT_COLOR.color; let nodeBgColor = node.data.value.bgcolor || SDNODE_DEFAULT_COLOR.bgcolor; @@ -57,7 +57,13 @@ export const NodeComponent = memo(({ nodeBgColor = "#261E1F"; nodeColor = "#DE654B"; } - + + if (isInProgress) { + console.log("node-progress", progressBar, node.data.value.widget) + } + + const { connectingIndicator, onMouseEnter, onMouseUp, onMouseLeave, onMouseMove } = useFullNodeConnecting({ widget: widget.name, node_id: node.id, inputs, outputs }); + return (
+ '--node-bg-color': (isInProgress || !!nodeError) ? nodeBgColor : Color(nodeBgColor).alpha(.92).hexa(), + } as React.CSSProperties} + onMouseEnter={onMouseEnter} + onMouseUp={onMouseUp} + onMouseLeave={onMouseLeave} + onMouseMove={onMouseMove} + > - {!collapsed && } + {!collapsed && } {!invisible ? (

- {getWidgetIcon(widget)} - {title} - {isPositive && {"("}Positive{")"}} - {isNegative && {"("}Negative{")"}} - + {getWidgetIcon(widget)} + {title} + {isPositive && {"("}Positive{")"}} + {isNegative && {"("}Negative{")"}} +

- {isInProgress? + {isInProgress ?
{inputs.map((input, index) => ( - + ))}
@@ -116,22 +127,22 @@ export const NodeComponent = memo(({ <>
{params.map(({ property, input }) => ( - + ))}
-
) }
- {!collapsed && } + {!collapsed && }
+ {connectingIndicator}
) : ( <> -
-
+
+
)}
diff --git a/apps/electron-frontend/src/components/workflow-editor/workflow-editor.style.module.scss b/apps/electron-frontend/src/components/workflow-editor/workflow-editor.style.module.scss index aaa6f98e..c14c706f 100755 --- a/apps/electron-frontend/src/components/workflow-editor/workflow-editor.style.module.scss +++ b/apps/electron-frontend/src/components/workflow-editor/workflow-editor.style.module.scss @@ -16,10 +16,27 @@ right: 0; bottom: 0; } + .reactflow-editor.loading { + .react-flow__nodes, .react-flow__viewport { + visibility: hidden; + opacity: 0; + pointer-events: none; + } + } + .react-flow__panel { .ant-space-item { display: flex; align-items: center; + .action.action-Run { + background-color: var(--primaryColor); + + } + .title { + color:#C5C5D359; + padding-left: 8px; + } + } } @@ -191,17 +208,46 @@ pointer-events: none; min-width: 5px; min-height: 5px; - width: 6px; - height: 6px; - background: #92939B; - border-radius: 100%; + width: 30px; + height: 30px; + background: transparent; + display: flex; + justify-content: center; + align-items: center; + transition: var(--transition); + .handle-visible { + width: 10px; + height: 10px; + border-radius: 100%; + pointer-events: none; + } } - + + .react-flow__handle-left { + top: -3px; + left: -2px; + transform: translate(0, -50%); + } + + .react-flow__handle-right { + right: -2px; + top: -3px; + transform: translate(0, -50%); + } + + .node-slot-left .connectionindicator { + transform-origin: 40% 50%; + } + + .node-slot-right .connectionindicator { + transform-origin: 60% 50%; + } + .react-flow__handle.connectionindicator { pointer-events: all; cursor: crosshair; } - + .react-flow__handle-bottom { top: auto; left: 50%; @@ -215,18 +261,6 @@ transform: translate(-50%, 0); } - .react-flow__handle-left { - top: 36%; - left: 3px; - transform: translate(0, -50%); - } - - .react-flow__handle-right { - right: 4px; - top: 36%; - transform: translate(0, -50%); - } - .react-flow__edgeupdater { cursor: move; pointer-events: all; @@ -352,23 +386,25 @@ } .react-flow__controls { - // box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08); - background-color: var(--backgroundColorL1); - border-radius: 4px; + box-shadow: 0 0 2px 1px rgba(0, 0, 0, 0.08); + background: rgba(41, 42, 53, 0.65); + backdrop-filter: blur(5px); + border-radius: 12px; overflow: hidden; + padding: 8px; } .react-flow__controls-button { border: none; transition: var(--transition); - background:var(--backgroundColorL1); - border-bottom: 1px solid var(--borderColor); + background: none; + // border-bottom: 1px solid var(--borderColor); box-sizing: content-box; display: flex; justify-content: center; align-items: center; width: 16px; - height: 16px; + height: 18px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; From 4fc5d2e74ee82e380d30e1afc542b6597d5d0b50 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 2 Aug 2024 18:01:37 +0800 Subject: [PATCH 19/23] bugfix for resize node --- .../reactflow-node/reactflow-node-resize.tsx | 6 ++++-- .../reactflow-node/reactflow-node.style.module.scss | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx index d9f2f2fa..67d979cc 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx @@ -74,9 +74,11 @@ export function useNodeAutoResize(node: NodeProps, imagePreviews: PreviewIm if (!mainRef.current) { return } + const state = useAppStore.getState() + const nodeInfo = state.graph[node.id]; + const dimensions = nodeInfo?.flowNode.data.dimensions; const height = mainRef.current.offsetHeight + 25 + (imagePreviews.length > 0 ? 200 : 0); const width = mainRef.current.offsetWidth + 4; - const dimensions = node.data.dimensions // console.log("dimensions", height, dimensions); if (!dimensions || dimensions.height < height - 2) { onNodesChange([{ @@ -90,7 +92,7 @@ export function useNodeAutoResize(node: NodeProps, imagePreviews: PreviewIm } setMinHeight(height); } - }, [setMinHeight, node.id, imagePreviews, collapsed]); + }, [node.id, imagePreviews, collapsed]); useEffect(() => { updateMinHeight(); diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss index 32c1a5f7..83941039 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node.style.module.scss @@ -165,7 +165,10 @@ display: flex; position: relative; &.node-slot-right { - text-align: right; + .node-slot-name { + width: 100%; + text-align: right; + } } } } From c34609d2c0cfe0c9b9a4a32ec911a0903e0a5274 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 2 Aug 2024 18:41:02 +0800 Subject: [PATCH 20/23] bufix node-resize --- .../workflow-editor/reactflow-input/input-get-set-node.tsx | 2 +- .../workflow-editor/reactflow-node/reactflow-node-resize.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-input/input-get-set-node.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-input/input-get-set-node.tsx index 775b51df..9b95d31e 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-input/input-get-set-node.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-input/input-get-set-node.tsx @@ -101,7 +101,7 @@ export function InputSetNodeField({ widget, node, value, id, onChange, name }: G
- {referenceInfo} + {/* {referenceInfo} */}
); diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx index 67d979cc..66d52dff 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-resize.tsx @@ -77,7 +77,7 @@ export function useNodeAutoResize(node: NodeProps, imagePreviews: PreviewIm const state = useAppStore.getState() const nodeInfo = state.graph[node.id]; const dimensions = nodeInfo?.flowNode.data.dimensions; - const height = mainRef.current.offsetHeight + 25 + (imagePreviews.length > 0 ? 200 : 0); + const height = mainRef.current.offsetHeight + 25 + (imagePreviews.length > 0 ? 200 : 0) + 20; const width = mainRef.current.offsetWidth + 4; // console.log("dimensions", height, dimensions); if (!dimensions || dimensions.height < height - 2) { From 8a2edab734f289d20e1df5e2836074cc2e8297a7 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 2 Aug 2024 18:44:41 +0800 Subject: [PATCH 21/23] can't connect self --- .../workflow-editor/reactflow-node/reactflow-node-slot.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx index 0d9d1003..b02958d0 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot.tsx @@ -46,6 +46,10 @@ export function Slot({ id, label, type, position, valueType, widget, node_id }: useEffect(() => { if (isConnecting && connectingParams) { const sourceType = connectingParams.handleType; + if (connectingParams.nodeId === node_id) { + setConnectingMe(false); + return + } if (sourceType !== type) { if (connectingParams.valueType === valueType || valueType === "*") { setConnectingMe(true); From dde8d9bfcd594633568d5f9b549bbe229cfd8616 Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Fri, 2 Aug 2024 18:48:12 +0800 Subject: [PATCH 22/23] can't connect self --- .../reactflow-node/reactflow-node-slot-full.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx index 15e4be49..c7632cd9 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-node/reactflow-node-slot-full.tsx @@ -28,10 +28,12 @@ export function useFullNodeConnecting({ widget, node_id, inputs, outputs }: { outputs = outputs || []; const onMouseEnter = useCallback(() => { - if (isConnecting) { - setTryConnectThisNode(true); + if (isConnecting && connectingParams) { + if (connectingParams.nodeId !== node_id) { + setTryConnectThisNode(true); + } } - }, [isConnecting]) + }, [isConnecting, connectingParams, node_id]) const onMouseLeave = useCallback(() => { if (tryConnectThisNode) { From b1d059cdbb6ab89ad00ee8479495977487400d4b Mon Sep 17 00:00:00 2001 From: Marc Chen <570171025@qq.com> Date: Sat, 3 Aug 2024 09:27:44 +0800 Subject: [PATCH 23/23] optimize drag to connection to create node --- .../src/components/workflow-editor/reactflow-connecting.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/electron-frontend/src/components/workflow-editor/reactflow-connecting.tsx b/apps/electron-frontend/src/components/workflow-editor/reactflow-connecting.tsx index dd3d877f..ff5d1592 100644 --- a/apps/electron-frontend/src/components/workflow-editor/reactflow-connecting.tsx +++ b/apps/electron-frontend/src/components/workflow-editor/reactflow-connecting.tsx @@ -10,6 +10,10 @@ export function onEdgeUpdateFailed(params: { setWidgetTreeContext: (context: any) => void, connectingParams: OnConnectStartParams }) { + const className = (params.event.target as any).className + if (typeof className !== "string" || className !== "react-flow__pane") { + return + } const { event, widgets, onConnect, setWidgetTreeContext, nodes, connectingParams } = params; try { const node = nodes.find(node => {