Skip to content

Commit

Permalink
Merge pull request #311 from 6174/0.2.2-alpha
Browse files Browse the repository at this point in the history
0.2.2 alpha
  • Loading branch information
thinkingjimmy authored Aug 3, 2024
2 parents c5ef6e8 + b1d059c commit 735cab7
Show file tree
Hide file tree
Showing 49 changed files with 646 additions and 212 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
4 changes: 2 additions & 2 deletions apps/electron-backend/layers/main/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
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.2.1-alpha",
"version": "0.2.2-alpha",
"private": true,
"main": "layers/main/dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion apps/electron-frontend/.env.development
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion apps/electron-frontend/.env.production
Original file line number Diff line number Diff line change
@@ -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
Expand Down
83 changes: 64 additions & 19 deletions apps/electron-frontend/src/components/bootstrap/setup-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -48,17 +50,43 @@ export function SetupConfig() {
}
}, []);

const selectPythonPath = useCallback(async () => {
try {
const ret = await comfyElectronApi.selectDirectory();
const pythonPath = ret[0];
setPythonPath(pythonPath);
} catch (err) {
console.log(err);
message.error(err);
}
}, []);

const useDefaultFolder = useCallback(() => {
setValue(defaultValue);
}, [value, defaultValue]);

const [loading, setLoading] = useState(false);

const saveValue = useCallback(async () => {
const config = {
if (value.trim() === "") {
message.error("Please select comfyui folder");
return;
}

if (installedComfyUI && pythonPath.trim() === "") {
message.error("Please select python path");
return;
}

const config:any = {
comfyUIDir: value.trim(),
stableDiffusionDir: sdwebuiPath.trim()
};

if (installedComfyUI && pythonPath.trim() !== "") {
config.pythonPath = pythonPath.trim() + "/python";
}

const api = getBackendUrl('/api/setup_config');
try {
setLoading(true);
Expand All @@ -84,6 +112,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);
Expand All @@ -93,7 +137,7 @@ export function SetupConfig() {
message.error(err);
}
setLoading(false);
}, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI]);
}, [value, sdwebuiPath, bootstrapTasks, task, installedComfyUI, pythonPath, selectedIfInstalledComfyUI]);

if (!selectedIfInstalledComfyUI) {
return (
Expand Down Expand Up @@ -161,6 +205,23 @@ export function SetupConfig() {
</Space>
</div>

<div className="field">
<div className="field-label" style={{
marginBottom: "10px"
}}>Select python bin folder</div>
<div className="description">
Select the python bin folder to reuse packages installed for comfyui
</div>
<div className="input-wrapper">
<Input value={pythonPath} placeholder="Input or select the python bin folder" onChange={v => {
setPythonPath(v.target.value);
}}/>
</div>
<Space>
{electronEnv && <Button onClick={selectPythonPath}> <FolderIcon /> Select folder</Button>}
</Space>
</div>

<div className="field buttons">
<Space>
<Button onClick={() => {
Expand Down Expand Up @@ -208,20 +269,4 @@ export function SetupConfig() {
</div>
</div>
)
}

/*
<div className="field">
<div className="field-label" style={{
marginBottom: "10px"
}}>SD WebUI Path:</div>
<div className="description">
If Stable Diffusion WebUI is already installed, you can opt for the SD path to utilize existing models
</div>
<div className="input-wrapper">
<Input value={sdwebuiPath} placeholder="Input sd webui path if exists"/>
</div>
<Space>
{electronEnv && <Button onClick={selectSdWebUIFolder}><FolderIcon /> Select folder</Button>}
</Space>
</div> */
}
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function AboutComflowySpace() {
</div>
<div>
<div className='about-content-title'>Comflowy</div>
<div>{t(KEYS.version)} 0.2.1-alpha</div>
<div>{t(KEYS.version)} 0.2.2-alpha</div>
</div>
</div>
<Divider />
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.2.1-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.2.2-alpha"}}
Loading

0 comments on commit 735cab7

Please sign in to comment.