Skip to content

Commit

Permalink
update 0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nimadez committed Aug 26, 2023
1 parent 9964e45 commit 7ae90be
Show file tree
Hide file tree
Showing 6 changed files with 295 additions and 189 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ UIX improvement and code management is not included in this file.
- fixed comfy error when the input is not flagged changed
- improve comparison opacity slider
- improve outpaint to support multiple paddings (https://github.com/nimadez/mental-diffusion/issues/9)
- mask image is not draggable anymore, pseudo code removed (we will revert the change later)
- improve metadata-pool
- improve compatibility with comfyui features
- improve dimensions, canvas is not resized when the width and height values are changed
(canvas dimensions are available in the canvas editor)
- new user-defined python path (https://github.com/nimadez/mental-diffusion/issues/10)

[0.2.3]
- new preview and progress bar
Expand All @@ -28,6 +31,8 @@ UIX improvement and code management is not included in this file.
- instant comfy bridge, no delay
- vscode editor-menu is now optional

--------------------------------------

[0.2.1]
- the comfyui bridge was successfully constructed and the MD is relatively stable
- styles revision (simplified but more intelligent)
Expand Down
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ Version 0.2.4 alpha<br>
#### Keyboard shortcuts
| *Key* | *Action* |
| --- | --- |
| P | Toggle metadata pool |
| 0 - 9 | Select workflows |
| D | Drag tool |
| B | Brush tool |
| L | Line tool |
| E | Eraser tool |
| M | Mask tool |
| I | Activate Eyedropper |
| I | Activate eyedropper |
| P | Toggle metadata pool |
| R | Reset canvas zoom |
| ] | Increase tool size |
| [ | Decrease tool size |
| + | Increase tool opacity |
Expand Down Expand Up @@ -140,6 +141,10 @@ How to speed up rendering?
Why did you switch to ComfyUI?
- I do not have the necessary hardware to expand the Diffusers features
- ComfyUI is a must-have SD package, there's a good chance you already have it
Why does the width and height change after the input?
- Width and height must be divisible by 8
- If you enter 500, it will be reduced to 496
```

## History
Expand Down
7 changes: 6 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
"mdconfig.comfyPath": {
"type": "string",
"default": "D:/Apps/ComfyUI",
"description": "ComfyUI Path ** REQUIRED **"
"description": "ComfyUI Path"
},
"mdconfig.comfyPython": {
"type": "string",
"default": "D:/Apps/ComfyUI/python_embeded/python.exe",
"description": "ComfyUI Python Path"
},
"mdconfig.openWebInterface": {
"type": "boolean",
Expand Down
4 changes: 2 additions & 2 deletions scripts/clear_comfy_output.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
title Clear Mental Diffusion Output
title Clear ComfyUI Output

pause
del "\..\.output\*.*" /s /q /f
del "D:\Apps\ComfyUI\ComfyUI\output\*.*" /s /q /f
14 changes: 9 additions & 5 deletions src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,27 @@ const path = require('path');
const fs = require('fs');

const WORKFLOWS = [
"default_txt2img_api.json",
"default_txt2img_api.json",
"default_txt2img_vae_api.json",
"default_img2img_api.json",
"default_inpaint_api.json",
"default_inpaint_pro_api.json"
"default_img2img_api.json",
"default_inpaint_api.json",
"default_inpaint_pro_api.json"
]
let pathMD = null;
let pathComfy = null;
let pathPython = null;
let panel = undefined;
let term = undefined;

function activate(ctx) {
pathMD = ctx.extensionPath;
pathComfy = vscode.workspace.getConfiguration('mdconfig').comfyPath;
pathPython = vscode.workspace.getConfiguration('mdconfig').comfyPython;

if (!fs.existsSync(pathComfy))
vscode.window.showErrorMessage("Mental Diffusion: Please set ComfyUI path in extension settings.");
if (!fs.existsSync(pathPython))
vscode.window.showErrorMessage("Mental Diffusion: Please set ComfyUI python path in extension settings.");

if (!fs.existsSync(pathMD + '/.input'))
fs.mkdirSync(pathMD + '/.input');
Expand Down Expand Up @@ -48,7 +52,7 @@ function openTerminal() {
const args = vscode.workspace.getConfiguration('mdconfig').runComfy;
term = vscode.window.createTerminal('ComfyUI');
term.sendText('cls');
term.sendText(`${pathComfy}\\python_embeded\\python.exe -s ${pathComfy}/ComfyUI/main.py --enable-cors-header --preview-method auto ${args}`);
term.sendText(`${pathPython} -s ${pathComfy}/ComfyUI/main.py --enable-cors-header --preview-method auto ${args}`);
term.show();
}

Expand Down

0 comments on commit 7ae90be

Please sign in to comment.