Skip to content

Commit

Permalink
Merge pull request #168 from 6174/0.0.5-alpha
Browse files Browse the repository at this point in the history
0.0.5 alpha
  • Loading branch information
6174 authored Feb 2, 2024
2 parents 06339b3 + 6420654 commit 06b4b20
Show file tree
Hide file tree
Showing 49 changed files with 476 additions and 120 deletions.
44 changes: 34 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,51 @@
</a>
</h4>

> The product is currently under development, and everyone is welcome to join our [Discord](https://discord.gg/cj623WvcVx) to learn about the latest product progress.
Comflowyspace is an open-source AI image and video generation tool committed to providing a better,
interactive experience than the standard SDWebUI and ComfyUI.

Comflowyspace is an open-source AI imagery and video generation tool committed to providing a better,
interactive experience than the standard webui and comfyui.Many people are hesitant to learn about
or participate in the wave of AI generation simply because the tools required are often too complex.
Many people are hesitant to learn about
or participate in the wave of AI generation simply because the tools required are often too complex. This is a problem that we're set on solving. We believe that it is crucial to develop an AI image
and video generation tool that is both easier to use and more useful tool - **ComflowySpace**.

This is a problem that we're set on solving. We believe that it is crucial to develop an AI imagery
and video generation tool that is both easier to use and more useful - Comflowyspace

The goal of Comflowyspace is to make ComfyUI & Stable Diffusion accessible to all.
The goal of ComflowySpace is to make ComfyUI & Stable Diffusion accessible to all.
From downloading and installing to plug-in management,
workflow templates, and process editing, every step is well designed.

## 😎 Key Features
If you like ComflowySpace, give our repo a [⭐ Star](https://github.com/6174/comflowyspace) and [👀 Watch](https://github.com/6174/comflowyspace/subscription) our repository to stay updated.

## Download
* **MacOS:** [Mac Intel](https://github.com/6174/comflowyspace/releases/download/v0.0.4-alpha/comflowy-0.0.4-alpha.dmg) | [Mac M](https://github.com/6174/comflowyspace/releases/download/v0.0.4-alpha/comflowy-0.0.4-alpha-arm64.dmg)
* **Windows:** Coming Soon

## Key Features
> If you want to know more about key features, feel free to check out our blog articles [ComflowySpace VS ComfyUI](https://www.comflowy.com/blog/comflowy-vs-comfyui).
* **More Convenient Installation**: Installing ComfyUI is complicated and often encounters various strange problems, leading to installation failure. To solve this problem, ComflowySpace offers a one-click installation feature so you can complete the installation within a few minutes.
* **More Efficient Usage**: ComflowySpace offers a workflow management feature, where you can view all your historical workflows. With it, you no longer need to manually export and save workflows. In addition, we also provide a multi-tab feature that allows you to open and run multiple workflows simultaneously, enhancing multitasking efficiency.
* **Simpler Setup**: In ComflowySpace, you can use various templates to build workflows, making workflow construction simpler and more convenient.
* **Friendlier User Experience**: We've optimized a great many detailed experiences to make your usage smoother. At the same time, ComflowySpace is integrated with our tutorials, reducing your learning threshold.

## 🌅 Demo
## Demo
![](./assets/editor.jpg)
![](./assets/home.jpg)
![](./assets/gallery.jpg)

## Contributing
We are grateful to the community for contributing bug fixes and improvements. For more information please read:
* [Development Guide](./DEVELEPMENT.md)

#### 😱 Found a bug?

Please [report all bugs](https://github.com/6174/comflowyspace/issues)! We are happy to fix the issues you have discovered. We also welcome you to join us in resolving the problem.

#### 🤔 Missing a certain feature?
If you think we are missing a feature, please feel free to submit an [Issue](https://github.com/6174/comflowyspace/issues). We will take it into serious consideration.

We also outline our development plans in the [Project](https://github.com/users/6174/projects/2). We also welcome everyone to build with us. If you are interested in this, please join our [Discord](https://discord.gg/xqB9VyEX) and get in touch with us.

## Thanks
This project exists thanks to all the people who contributed:

<a href="https://github.com/6174/comflowyspace/graphs/contributors">
<img src="https://contrib.rocks/image?repo=6174/comflowyspace" height="50px">
</a>
30 changes: 14 additions & 16 deletions apps/electron-backend/layers/main/src/windows-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import contextMenu from 'electron-context-menu';
import { APP_SERVER_PORT } from "./config";
import { closeLoadingScreen } from "./loading";
import { setTimeout } from 'timers/promises';
const BASE_URL = isDev ? 'http://localhost:3000' : `http://localhost:${APP_SERVER_PORT}`
const BASE_URL = isDev ? 'http://localhost:4000' : `http://localhost:${APP_SERVER_PORT}`
export function resolveWindowUrl(pageName: string): string {
let realPageName = pageName
if (pageName === "index" && isDev) {
Expand All @@ -18,10 +18,10 @@ export function resolveWindowUrl(pageName: string): string {
export const DEFAULT_WINDOW_URL = resolveWindowUrl("index");

type WindowTab = {
pageName: string,
pageName: string,
query?: string,
name: string,
type: "MANAGEMENT" | "DOC",
name: string,
type: "MANAGEMENT" | "DOC",
id: number
}
// type define
Expand All @@ -47,7 +47,7 @@ class WindowManager {
/**
* create main window to manager tab windows
* https://www.electronjs.org/docs/latest/api/browser-view
* @returns
* @returns
*/
createMainWindow = async () => {
if (this.mainWindow) {
Expand Down Expand Up @@ -85,23 +85,21 @@ class WindowManager {
this.mainWindow!.getBrowserView()?.webContents.toggleDevTools();
}

console.log("view Menu Item", viewMenuItem);
let reloadMenuItem = viewMenuItem.submenu!.items.find(item => item.role === 'reload')!
reloadMenuItem.click = () => {
this.mainWindow!.getBrowserView()?.webContents.reload();
}


Menu.setApplicationMenu(appMenu)
} catch(err) {
console.log("custom menu error", err);
}

window.on('closed', () => {
// @ts-ignore
this.mainWindow = null;
this.listWindow.forEach(instance => {
(instance.window.webContents as any)?.destroy()
(instance.window.webContents as any)?.destroy()
});
this.listWindow = [];
})
Expand Down Expand Up @@ -140,7 +138,7 @@ class WindowManager {
enableWebSQL: false,
},
});
contextMenu({
contextMenu({
window,
showSaveImageAs: true
});
Expand Down Expand Up @@ -218,7 +216,7 @@ class WindowManager {
this.dispatchChangeEvent();
return tab.window.webContents.id;
} else {
const window = await this.newTab(tabData)
const window = await this.newTab(tabData)
this.dispatchChangeEvent();
return window.webContents.id;
}
Expand Down Expand Up @@ -253,7 +251,7 @@ class WindowManager {
}
this.dispatchChangeEvent();
});

ipcMain.handle("switch-tab", async (_event, id: number) => {
const tab = this.listWindow.find(instance => instance.window.webContents.id === id);
console.log("switch tab", id, tab);
Expand All @@ -280,7 +278,7 @@ class WindowManager {
}) => {
this.replaceTab(data.id, data.newTab);
this.dispatchChangeEvent();
return this.getTabData();
return this.getTabData();
});

ipcMain.handle('maxmize-window', async () => {
Expand All @@ -306,16 +304,16 @@ class WindowManager {

restoreOrCreateWindow = async () => {
let window = this.mainWindow;

if (window === undefined) {
await this.createMainWindow();
window = this.mainWindow;
}

if (window.isMinimized()) {
window.restore();
}

window.focus();
}
}
Expand Down
2 changes: 1 addition & 1 deletion apps/electron-backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "comflowy",
"version": "0.0.4-alpha",
"version": "0.0.5-alpha",
"private": true,
"main": "layers/main/dist/index.js",
"scripts": {
Expand Down
1 change: 0 additions & 1 deletion apps/electron-frontend/.env

This file was deleted.

2 changes: 2 additions & 0 deletions apps/electron-frontend/.env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_APP_VERSION=0.0.5-alpha
NEXT_PUBLIC_API_SERVER=http://localhost:3000
2 changes: 2 additions & 0 deletions apps/electron-frontend/.env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
NEXT_PUBLIC_APP_VERSION=0.0.5-alpha
NEXT_PUBLIC_API_SERVER=https://www.comflowy.com
8 changes: 7 additions & 1 deletion apps/electron-frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@ const nextConfig = {
pageExtensions: ['js', 'jsx', 'mdx', 'ts', 'tsx'],
sassOptions: {
includePaths: [path.join(__dirname, "styles")],
}
},
webpack(config, { dev }) {
if (!dev) {
config.optimization.minimize = false;
}
return config;
},
}

module.exports = nextConfig
2 changes: 1 addition & 1 deletion apps/electron-frontend/scripts/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const os = require("os");

const dev = process.env.NODE_ENV !== 'production'
const hostname = 'localhost'
const port = 3000
const port = 4000
const app = next({ dev })
const handle = app.getRequestHandler()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ export function BootstrapTask(props: BootstrapTaskProps) {
<div className={props.type}>
{/* {contextHolder} */}
<div className="actions">
{success ?
{(success && task) ?
(
<div>{task.title} success</div>
<div>{task?.title} success</div>
) : (
null
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { BootstrapTask } from "./bootstrap-task";
export function InstallGit() {
return (
<div className="InstallGit">
<BootstrapTask type={BootStrapTaskType.installConda}/>
<BootstrapTask type={BootStrapTaskType.installGit}/>
</div>
)
}
12 changes: 11 additions & 1 deletion apps/electron-frontend/src/components/layout/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Props = {
import styles from "./layout.style.module.scss";
import { useRouter } from 'next/router'
import LogoIcon from 'ui/icons/logo'
import { BulbIcon, ExtensionIcon, ModelIcon, WorkflowIcon } from 'ui/icons'
import { BulbIcon, ExtensionIcon, ModelIcon, TutorialIcon, WorkflowIcon } from 'ui/icons'
import { useDashboardState } from '@comflowy/common/store/dashboard-state'
import { useAppStore } from '@comflowy/common/store'
import Bootstrap from '../bootstrap/bootstrap'
Expand Down Expand Up @@ -101,6 +101,16 @@ const WorkspaceNav = () => {
Extensions
</a>
</div>
<div className={`workspace-nav-item ${path === "/tutorials" ? "active" : ""}`} onClick={ev => {
changeRoute("/tutorials")
}}>
<div className="icon">
<TutorialIcon/>
</div>
<a>
Tutorials
</a>
</div>
</div>
</div>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -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.0.4-alpha"}}
{"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.0.5-alpha"}}
Loading

0 comments on commit 06b4b20

Please sign in to comment.