Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
691da6bea7 | ||
|
|
27eb284229 | ||
|
|
a43bac17d1 | ||
|
|
d0e68a2869 | ||
|
|
72a5d4f8a7 | ||
|
|
4000006366 |
@@ -1,3 +1,12 @@
|
||||
# [](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.3.0...v) (2023-08-01)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **images:** allow copy image ([27eb284](https://github.com/failfa-st/failfast-comfyui-extensions/commit/27eb284229235e301496326d22cd3c48e16f6f23))
|
||||
|
||||
|
||||
|
||||
# [](https://github.com/failfa-st/failfast-comfyui-extensions/compare/v1.0.0...v) (2023-08-01)
|
||||
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ personalization in your ComfyUI environment.
|
||||
<!-- toc -->
|
||||
|
||||
- [Installation](#installation)
|
||||
* [Load via ComfyUI manager](#load-via-comfyui-manager)
|
||||
* [Clone Repository](#clone-repository)
|
||||
* [Download Manually](#download-manually)
|
||||
- [Update](#update)
|
||||
@@ -30,10 +31,19 @@ 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
|
||||
|
||||
@@ -138,8 +148,7 @@ The context menu offers additional options for nodes, groups, colors, and the ca
|
||||
- Custom color option (only available in "default" Color Mode).
|
||||
- Show title on Reroute node
|
||||
- Render Reroute as dot
|
||||
|
||||
 {
|
||||
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;
|
||||
};
|
||||
},
|
||||
});
|
||||
@@ -12,7 +12,7 @@
|
||||
import { app } from "/scripts/app.js";
|
||||
|
||||
const reroutesName = "Failfast.reroutes";
|
||||
const mini =[34,26]
|
||||
const mini = [34, 26];
|
||||
function miniReroute(node) {
|
||||
if (node.type !== "Reroute") {
|
||||
return;
|
||||
@@ -36,9 +36,7 @@ function miniReroute(node) {
|
||||
get() {
|
||||
return this._size;
|
||||
},
|
||||
set() {
|
||||
console.log("prevented");
|
||||
},
|
||||
set() {},
|
||||
});
|
||||
node._size[0] = mini[0];
|
||||
node._size[1] = mini[1];
|
||||
@@ -73,8 +71,8 @@ app.registerExtension({
|
||||
content: node.properties.showTitle ? "Hide Title" : "Show Title",
|
||||
callback() {
|
||||
node.outputs[0].label = node.properties.showTitle
|
||||
? undefined
|
||||
: node.title;
|
||||
? undefined
|
||||
: node.title;
|
||||
node.properties.showTitle = !node.properties.showTitle;
|
||||
},
|
||||
});
|
||||
@@ -97,9 +95,7 @@ app.registerExtension({
|
||||
get() {
|
||||
return this._size;
|
||||
},
|
||||
set() {
|
||||
console.log("prevented");
|
||||
},
|
||||
set() {},
|
||||
});
|
||||
}
|
||||
node._size[0] = node.properties.dot ? 75 : mini[0];
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "failfast-comfyui-extensions",
|
||||
"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 "
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user