25 Commits
Author SHA1 Message Date
Gregor Adams 652ed1db78 Update README.md 2023-08-09 18:13:26 +02:00
Gregor Adams 932bb6c2d8 Update README.md 2023-08-02 00:51:22 +02:00
pixelass eab436f21d docs: changelog 2023-08-02 00:10:06 +02:00
pixelass c4ebc3f68d chore: v 1.5.1 2023-08-02 00:09:08 +02:00
pixelass eaa9a6ec26 chore: adjust changelog 2023-08-02 00:08:32 +02:00
pixelass c0e70fd1ad fix(colors): set default value of colorpicker 2023-08-02 00:08:14 +02:00
pixelass 7e5d24fbec docs: changelog 2023-08-01 23:03:29 +02:00
pixelass 9aeb25c4ec feat(reroute): allow dot & microdot 2023-08-01 23:03:29 +02:00
Gregor Adams 98ee86b9e6 Update README.md 2023-08-01 19:53:05 +02:00
pixelass c648ee9729 docs: update readme 2023-08-01 19:34:32 +02:00
pixelass 691da6bea7 docs: changelog 2023-08-01 18:57:36 +02:00
pixelass 27eb284229 feat(images): allow copy image 2023-08-01 18:57:07 +02:00
pixelass a43bac17d1 refactor: remove logs 2023-08-01 18:34:17 +02:00
Gregor Adams d0e68a2869 Update README.md 2023-08-01 18:24:00 +02:00
pixelass 72a5d4f8a7 docs: add comfyUI manager instructions 2023-08-01 18:22:59 +02:00
pixelass 4000006366 docs: update readme 2023-08-01 17:59:33 +02:00
pixelass 9d6f688c53 docs: update readme 2023-08-01 17:56:55 +02:00
pixelass d47d1a122e docs: changelog 2023-08-01 17:55:04 +02:00
pixelass f27d1f140e feat: allow Reroute as dot 2023-08-01 17:55:04 +02:00
pixelass 8eba0f010d docs: changelog 2023-08-01 17:55:04 +02:00
pixelass f161d6e563 feat(reroutes): al;low showing title on reroute 2023-08-01 17:55:04 +02:00
Gregor Adams a9361f60fc Update README.md 2023-08-01 14:00:29 +02:00
Gregor Adams 76e37152ad Update README.md 2023-08-01 14:00:06 +02:00
pixelass 8e6f058da7 chore: make installable via manager 2023-08-01 05:37:07 +02:00
pixelass e636c60b34 chore: make installable 2023-08-01 05:19:40 +02:00
20 changed files with 490 additions and 70 deletions
+2 -1
View File
@@ -1 +1,2 @@
.idea
.idea
__pycache__/*
+40 -1
View File
@@ -1,6 +1,45 @@
# (2023-08-01)
## [1.5.1](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.5.0...v1.5.1) (2023-08-01)
### Bug Fixes
* **colors:** set default value of colorpicker ([c0e70fd](https://github.com/failfa-st/failfast-comfyui-extensions/commit/c0e70fd1ad8bf7b2e73450a276ab8ebd3277e86a))
# [1.5.0](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.4.0...v1.5.0) (2023-08-01)
### Features
* **reroute:** allow dot & microdot ([088f89d](https://github.com/failfa-st/failfast-comfyui-extensions/commit/088f89d41406b081d37e29c5601dc529997c6c33))
# [1.4.0](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.3.0...v1.4.0) (2023-08-01)
### Features
* **images:** allow copy image ([27eb284](https://github.com/failfa-st/failfast-comfyui-extensions/commit/27eb284229235e301496326d22cd3c48e16f6f23))
# [1.3.0](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.2.0...v1.3.0) (2023-08-01)
### Features
* allow Reroute as dot ([9cf412f](https://github.com/failfa-st/failfast-comfyui-extensions/commit/9cf412f4d7c05eaf4f958b8e0752cb75d764425a))
# [1.2.0](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.1.0...v1.2.0) (2023-08-01)
### Features
* **reroutes:** allow showing title on reroute ([27e49f8](https://github.com/failfa-st/failfast-comfyui-extensions/commit/27e49f83d5c37a529638862132a40cd837a41127))
# [1.1.0](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.0.0...v1.1.0) (2023-08-01)
# [1.0.0] (2023-08-01)
### Bug Fixes
* batch resize respects grid snapping ([7ea395a](https://github.com/failfa-st/failfast-comfyui-extensions/commit/7ea395ab5606e3b490f25d1120eed852d8216695))
+97 -37
View File
@@ -1,5 +1,9 @@
# ComfyUI Extensions by Failfa.st
![Screenshot 2023-08-02 004936](https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/d1530160-3c77-4aac-952f-7b9f2cf37b8f)
[![Discord](https://img.shields.io/discord/1091306623819059300?color=7289da&label=Discord&logo=discord&logoColor=fff&style=for-the-badge)](https://discord.com/invite/m3TBB9XEkb)
ComfyUI Extensions by Failfa.st is a robust suite of enhancements, designed to optimize your ComfyUI experience. It
provides a range of features, including customizable render modes, dynamic node coloring, and versatile management
tools. Whether for individual use or team collaboration, our extensions aim to enhance productivity, readability, and
@@ -7,9 +11,14 @@ personalization in your ComfyUI environment.
[CHANGELOG](CHANGELOG.md) | [LICENSE (AGPL 3.0)](LICENSE)
## Request a new feature
### If you have an idea for a new extension, you can open a [Feature Request](https://github.com/failfa-st/failfast-comfyui-extensions/issues/new?assignees=&labels=enhancement&projects=&template=feature_request.md&title=)
## Table of Contents
<!-- toc -->
- [Installation](#installation)
* [Load via ComfyUI manager](#load-via-comfyui-manager)
* [Clone Repository](#clone-repository)
* [Download Manually](#download-manually)
- [Update](#update)
@@ -20,9 +29,18 @@ personalization in your ComfyUI environment.
+ [Positive/Negative](#positivenegative)
+ [Dynamic Colors](#dynamic-colors)
- [Context Menu](#context-menu)
* [Freeze or Unfreeze Group](#freeze-or-unfreeze-group)
* [Pin or Unpin all Nodes](#pin-or-unpin-all-nodes)
* [Arranging all Nodes](#arranging-all-nodes)
* [Nodes](#nodes)
+ [Custom Color Option (only available in "default" Color Mode)](#custom-color-option-only-available-in-default-color-mode)
+ [Show Title on Reroute Node](#show-title-on-reroute-node)
+ [Render Reroute as Dot](#render-reroute-as-dot)
+ [Copy Images](#copy-images)
* [Groups](#groups)
+ [Group Color Option](#group-color-option)
+ [Freeze/Unfreeze Group](#freezeunfreeze-group)
* [Canvas](#canvas)
+ [Pin or Unpin all Nodes](#pin-or-unpin-all-nodes)
+ [Freeze or unfreeze all Groups and Nodes](#freeze-or-unfreeze-all-groups-and-nodes)
+ [Arranging all Nodes](#arranging-all-nodes)
- [Single Extensions Usage](#single-extensions-usage)
- [Contribution](#contribution)
@@ -30,15 +48,24 @@ personalization in your ComfyUI environment.
## Installation
Two methods are available for installation:
Three methods are available for installation:
1. Clone the repository directly into the extensions directory.
2. Download the project manually.
1. Load via [ComfyUI manager](https://github.com/ltdrdata/ComfyUI-Manager)
2. Clone the repository directly into the extensions directory.
3. Download the project manually.
### Load via ComfyUI manager
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/796aaa99-9b16-4087-bebb-ed8638a8b9fc" alt="ComfyUI manager" >
<p>Install via ComfyUI manager</p>
</div>
### Clone Repository
```shell
cd your-path/ComfyUI/web/extensions
cd path/to/your/ComfyUI/custom_nodes
git clone git@github.com:failfa-st/failfast-comfyui-extensions.git
```
@@ -46,21 +73,18 @@ git clone git@github.com:failfa-st/failfast-comfyui-extensions.git
1. Download the project archive from [here](https://github.com/failfa-st/failfast-comfyui-extensions/archive/refs/heads/main.zip).
2. Extract the downloaded zip file.
3. Move the extracted files to `your-path/ComfyUI/web/extensions`.
3. Move the extracted files to `path/to/your/ComfyUI/custom_nodes`.
4. Restart ComfyUI
The folder structure should resemble: `your-path/ComfyUI/web/extensions/failfast-comfyui-extensions`.
The folder structure should resemble: `path/to/your/ComfyUI/custom_nodes/failfast-comfyui-extensions`.
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/6d08fd63-5309-44f8-934a-e120a48c0798" alt="Folder structure example">
<p>Example of Correct Folder Structure</p>
</div>
## Update
To update the extensions, pull the latest changes from the repository:
```shell
cd your-path/ComfyUI/web/extensions/failfast-comfyui-extensions
cd path/to/your/ComfyUI/custom_nodes/failfast-comfyui-extensions
git pull
```
@@ -136,46 +160,82 @@ Several dynamic coloring modes are available:
The context menu offers additional options for nodes, groups, colors, and the canvas:
**Nodes**
### Nodes
- Custom color option (only available in "default" Color Mode).
#### Custom Color Option (only available in "default" Color Mode)
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/f0c4dc53-0e40-480d-a3f9-09b50a3ab56d" alt="Node options" height="300px">
<p>Node Options</p>
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/f0c4dc53-0e40-480d-a3f9-09b50a3ab56d" alt="Node color options" height="300px">
<p>Node Color Options</p>
</div>
**Groups**
- Custom color option.
- Group color option.
- Freeze/unfreeze group.
#### Show Title on Reroute Node
<div align="center">
<img src="https://github.com/failfa-st/hyv/assets/1148334/7558fcfb-1733-4d78-904b-50891f29fa68" alt="Group options" height="300px">
<p>Group Options</p>
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/e40ea33d-5a44-4859-b050-ed7a13057536" alt="reroute Node options" width="400px">
<p>Reroute show/hide Title</p>
</div>
**Canvas**
- Arrange nodes (vertical/horizontal).
- Freeze/unfreeze all nodes.
- Pin/unpin all nodes.
#### Render Reroute as Dot
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/d45ed248-2a19-4862-bda5-49f9b2703296" alt="Canvas options" height="300px">
<p>Canvas Options</p>
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/d575b450-da5d-4357-832f-de294a5cc3d9" alt="reroute Node as dot" width="400px" >
<p>Reroute as dot</p>
</div>
### Freeze or Unfreeze Group
| microdot | microdot / dot / off |
| :-----------------------------------------------------------------------------------------------: |:---------------------------------------------------------------------------------------------------------------------------:|
| ![vertical](https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/41fab393-5d85-4e2c-8f5d-2e003cd6b2b3) | ![horizontal](https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/403df5b7-7d05-40a7-bd61-1c807e0da433) |
#### Copy Images
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/f41b4aff-9677-4faf-85cb-86ce497d6240" alt="Copy images" >
<p>Copy Image</p>
</div>
### Groups
#### Group Color Option
You can color a group with a custom color and even color a group including all its child Nodes
<div align="center">
<img src="https://github.com/failfa-st/failfast-comfyui-extensions/assets/1148334/f3788347-3fe3-4959-b14c-5b9db96e8f41" alt="Group color options" height="300px">
<p>Group color Options</p>
</div>
#### Freeze/Unfreeze Group
Lock or unlock a group and all its child Nodes. Note that new Nodes will not be affected.
### Pin or Unpin all Nodes
<div align="center">
<img src="https://github.com/failfa-st/hyv/assets/1148334/7558fcfb-1733-4d78-904b-50891f29fa68" alt="Group freeze" height="300px">
<p>Group freeze/unfreeze</p>
</div>
### Canvas
#### Pin or Unpin all Nodes
Lock or unlock all nodes on the canvas, regardless of their group.
### Arranging all Nodes
#### Freeze or unfreeze all Groups and Nodes
Lock or unlock all groups and all Nodes
#### Arranging all Nodes
You can arrange all Nodes in either vertical or horizontal layout.
@@ -190,8 +250,8 @@ Each extension is fully capable of functioning individually. This allows you to
Simply download the desired file from the [`extensions`](extensions) directory and place it in the extensions folder of ComfyUI.
1. Download the required file for example, [linksRenderMode](extensions/linksRenderMode.js).
2. Transfer the file to `path/to/ComfyUI/web/extensions`.
3. The folder structure should appear as: `path/to/ComfyUI/web/extensions/linksRenderMode.js`.
2. Transfer the file to `path/to/your/ComfyUI/web/extensions`.
3. The folder structure should appear as: `path/to/your/ComfyUI/web/extensions/linksRenderMode.js`.
## Contribution
+23
View File
@@ -0,0 +1,23 @@
import os
import shutil
comfy_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
failfast_path = os.path.abspath(os.path.dirname(__file__))
def setup_js():
try:
js_dest_path = os.path.join(comfy_path, "web", "extensions", "failfast-comfyui-extensions")
js_src_path = os.path.join(failfast_path, "extensions")
print(js_src_path)
print(js_dest_path)
if os.path.exists(js_dest_path):
shutil.rmtree(js_dest_path)
shutil.copytree(js_src_path, js_dest_path)
except Exception as e:
print(f"An error occurred: {e}")
setup_js()
NODE_CLASS_MAPPINGS = {}
+38
View File
@@ -0,0 +1,38 @@
import os
import sys
import time
import platform
import shutil
import subprocess
comfy_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def rmtree(path):
retry_count = 3
while True:
try:
retry_count -= 1
if platform.system() == "Windows":
subprocess.check_call(['attrib', '-R', path + '\\*', '/S'])
shutil.rmtree(path)
return True
except Exception as ex:
print(f"ex: {ex}")
time.sleep(3)
if retry_count < 0:
raise ex
print(f"Uninstall retry({retry_count})")
js_dest_path = os.path.join(comfy_path, "web", "extensions", "failfast-comfyui-extensions")
if os.path.exists(js_dest_path):
rmtree(js_dest_path)
+4 -4
View File
@@ -9,8 +9,8 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { $el } from "../scripts/ui.js";
import { app } from "/scripts/app.js";
import { $el } from "/scripts/ui.js";
/**
* Render Shadow
@@ -32,13 +32,13 @@ app.registerExtension({
callback: () =>
app.graph.arrange(
LiteGraph.CANVAS_GRID_SIZE * 4,
LiteGraph.VERTICAL_LAYOUT,
LiteGraph.VERTICAL_LAYOUT
),
},
{
content: "Arrange (horizontal)",
callback: () => app.graph.arrange(LiteGraph.CANVAS_GRID_SIZE * 2),
},
}
);
return menuOptions;
+7 -8
View File
@@ -9,8 +9,8 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { $el } from "../scripts/ui.js";
import { app } from "/scripts/app.js";
import { $el } from "/scripts/ui.js";
function getColor(index, lengthOfItems, l = 0.5) {
// Normalize the index value to be between 0 and 360 for full spectrum of hue
@@ -298,6 +298,7 @@ app.registerExtension({
"Custom",
$el("input", {
type: "color",
value: node.bgcolor,
style: {
position: "absolute",
right: "200%",
@@ -333,6 +334,7 @@ app.registerExtension({
"Color all",
$el("input", {
type: "color",
value: node.bgcolor,
style: {
position: "absolute",
right: "200%",
@@ -405,12 +407,9 @@ app.registerExtension({
`Comfy.Settings.${colorsName}-posneg`,
event.target.checked.toString(),
);
const value = +(
window.localStorage.getItem(
`Comfy.Settings.${colorsName}`,
) ?? "0"
);
setColorMode(value, app);
if (event.target.checked) {
colorPositiveNegative(app);
}
},
}),
],
+1 -1
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Connections Width
+1 -1
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Render all nodes as box
+1 -1
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Always snap to grid
+3 -3
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Render Shadow
@@ -52,7 +52,7 @@ app.registerExtension({
node.flags.pinned = true;
});
},
},
}
);
return menuOptions;
@@ -92,7 +92,7 @@ app.registerExtension({
});
});
},
},
}
);
return menuOptions;
+51
View File
@@ -0,0 +1,51 @@
/**
* Coded with love by Failfa.st
* LICENSE: AGPL 3.0
* https://github.com/failfa-st/failfast-comfyui-extensions/blob/main/LICENSE
*
* Visit https://github.com/failfa-st/failfast-comfyui-extensions for more info
*
* Homepage: https://failfa.st
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "/scripts/app.js";
const imagesName = "Failfast.images";
function copyImageToClipboard(img) {
const canvas = document.createElement("canvas");
canvas.width = img.naturalWidth;
canvas.height = img.naturalHeight;
const context = canvas.getContext("2d");
context.drawImage(img, 0, 0);
canvas.toBlob(function (blob) {
const items = [new ClipboardItem({ "image/png": blob })];
navigator.clipboard.write(items);
});
canvas.remove();
}
app.registerExtension({
name: imagesName,
async init(app) {
const getNodeMenuOptions = LGraphCanvas.prototype.getNodeMenuOptions;
LGraphCanvas.prototype.getNodeMenuOptions = function (node) {
const options = getNodeMenuOptions.apply(this, arguments);
const isImageMenu = options.some(
(option) => option?.content === "Save Image",
);
if (isImageMenu) {
options.splice(2, 0, {
content: "Copy Image",
callback() {
const [img] = node.imgs;
if (img) {
copyImageToClipboard(img);
}
},
});
}
return options;
};
},
});
+3 -3
View File
@@ -10,8 +10,8 @@
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { $el } from "../scripts/ui.js";
import { app } from "/scripts/app.js";
import { $el } from "/scripts/ui.js";
/**
* Toggle links render mode
@@ -50,7 +50,7 @@ app.registerExtension({
value: index,
selected: index === +value,
});
}),
})
),
]),
]);
+3 -3
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Nodes
@@ -35,7 +35,7 @@ app.registerExtension({
async setup(app) {
app.graph._nodes.forEach(function (node) {
let active = JSON.parse(
window.localStorage.getItem(`Comfy.Settings.${nodesName}`) ?? "false",
window.localStorage.getItem(`Comfy.Settings.${nodesName}`) ?? "false"
);
const onResize = node.onResize;
node.onResize = function (size) {
@@ -63,7 +63,7 @@ app.registerExtension({
const onMouseDown = node.onMouseDown;
node.onMouseDown = function () {
active = JSON.parse(
window.localStorage.getItem(`Comfy.Settings.${nodesName}`) ?? "false",
window.localStorage.getItem(`Comfy.Settings.${nodesName}`) ?? "false"
);
return onMouseDown?.apply(this, arguments);
};
+2 -3
View File
@@ -9,8 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { $el } from "../scripts/ui.js";
import { app } from "/scripts/app.js";
/**
* Pin/Unpin all nodes on canvas
@@ -41,7 +40,7 @@ app.registerExtension({
node.flags.pinned = false;
});
},
},
}
);
return menuOptions;
+1 -1
View File
@@ -9,7 +9,7 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { app } from "/scripts/app.js";
/**
* Render Shadow
+170
View File
@@ -0,0 +1,170 @@
/**
* Coded with love by Failfa.st
* LICENSE: AGPL 3.0
* https://github.com/failfa-st/failfast-comfyui-extensions/blob/main/LICENSE
*
* Visit https://github.com/failfa-st/failfast-comfyui-extensions for more info
*
* Homepage: https://failfa.st
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "/scripts/app.js";
const reroutesName = "Failfast.reroutes";
const mini = [34, 26];
const micro = [10, 10];
const big = [75, 26];
function miniReroute(node) {
if (node.type !== "Reroute") {
return;
}
node._size = node.size;
node._title = node.title;
Object.defineProperty(node, "title", {
get() {
return this._title;
},
set(value) {
this._title = value;
if (node.properties.showTitle) {
node.outputs[0].label = value;
}
},
});
if (node.properties.microdot) {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
node._size[0] = micro[0];
node._size[1] = micro[1];
} else if (node.properties.dot) {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
node._size[0] = mini[0];
node._size[1] = mini[1];
}
}
app.registerExtension({
name: reroutesName,
async setup(app) {
const onNodeAdded = app.graph.onNodeAdded;
app.graph.onNodeAdded = function (node) {
if (node.type !== "Reroute") {
return onNodeAdded?.apply(this, arguments);
}
miniReroute(node);
return onNodeAdded?.apply(this, arguments);
};
app.graph._nodes.forEach((node) => {
if (node.type === "Reroute") {
miniReroute(node);
}
});
const getNodeMenuOptions = LGraphCanvas.prototype.getNodeMenuOptions;
LGraphCanvas.prototype.getNodeMenuOptions = function (node) {
const options = getNodeMenuOptions.apply(this, arguments);
if (node.type !== "Reroute") {
return options;
}
options.unshift({
content: node.properties.showTitle ? "Hide Title" : "Show Title",
callback() {
node.outputs[0].label = node.properties.showTitle
? undefined
: node.title;
node.properties.showTitle = !node.properties.showTitle;
},
});
options.push(
{
content: node.properties.dot ? "dot off" : "dot on",
callback() {
if (node.properties.dot) {
node._size[0] = node.properties.microdot ? micro[0] : big[0];
node._size[1] = node.properties.microdot ? micro[1] : big[1];
if (node.properties.microdot) {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
} else {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set(value) {
this._size = value;
},
});
}
} else {
node._size[0] = node.properties.microdot ? micro[0] : mini[0];
node._size[1] = node.properties.microdot ? micro[1] : mini[1];
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
}
node.properties.dot = !node.properties.dot;
node.setDirtyCanvas(true, true);
},
},
{
content: node.properties.microdot ? "microdot off" : "microdot on",
callback() {
if (node.properties.microdot) {
node._size[0] = node.properties.dot ? mini[0] : big[0];
node._size[1] = node.properties.dot ? mini[1] : big[1];
if (node.properties.dot) {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
} else {
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set(value) {
this._size = value;
},
});
}
} else {
node._size[0] = micro[0];
node._size[1] = micro[1];
Object.defineProperty(node, "size", {
get() {
return this._size;
},
set() {},
});
}
node.properties.microdot = !node.properties.microdot;
node.setDirtyCanvas(true, true);
},
},
);
return options;
};
},
});
+2 -2
View File
@@ -9,8 +9,8 @@
* GitHub: https://github.com/failfa-st
* Discord: https://discord.com/invite/m3TBB9XEkb
*/
import { app } from "../scripts/app.js";
import { $el } from "../scripts/ui.js";
import { app } from "/scripts/app.js";
import { $el } from "/scripts/ui.js";
/**
* Font size of prompt fields
+3 -1
View File
@@ -1,6 +1,8 @@
{
"name": "failfast-comfyui-extensions",
"version": "1.5.1",
"scripts": {
"changelog": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s"
"changelog": "npx conventional-changelog-cli -p angular -i CHANGELOG.md -s",
"toc": "npx markdown-toc README.md -i "
}
}
+38
View File
@@ -0,0 +1,38 @@
import os
import sys
import time
import platform
import shutil
import subprocess
comfy_path = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
def rmtree(path):
retry_count = 3
while True:
try:
retry_count -= 1
if platform.system() == "Windows":
subprocess.check_call(['attrib', '-R', path + '\\*', '/S'])
shutil.rmtree(path)
return True
except Exception as ex:
print(f"ex: {ex}")
time.sleep(3)
if retry_count < 0:
raise ex
print(f"Uninstall retry({retry_count})")
js_dest_path = os.path.join(comfy_path, "web", "extensions", "failfast-comfyui-extensions")
if os.path.exists(js_dest_path):
rmtree(js_dest_path)