mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2025-12-17 02:12:58 +08:00
wip
This commit is contained in:
parent
6aa7b2c9e7
commit
aca2125519
@ -2092,7 +2092,12 @@ app.registerExtension({
|
|||||||
ShareDialog.instance = new ShareDialog();
|
ShareDialog.instance = new ShareDialog();
|
||||||
}
|
}
|
||||||
|
|
||||||
app.graphToPrompt().then(prompt => app.graph._nodes).then(nodes => {
|
app.graphToPrompt().then(prompt => {
|
||||||
|
console.log({prompt})
|
||||||
|
return app.graph._nodes;
|
||||||
|
}).then(nodes => {
|
||||||
|
console.log({nodes});
|
||||||
|
|
||||||
const potential_outputs = [];
|
const potential_outputs = [];
|
||||||
const potential_output_nodes = [];
|
const potential_output_nodes = [];
|
||||||
|
|
||||||
|
|||||||
@ -2,6 +2,8 @@ import { app } from "../../scripts/app.js";
|
|||||||
import { api } from "../../scripts/api.js"
|
import { api } from "../../scripts/api.js"
|
||||||
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
import { ComfyDialog, $el } from "../../scripts/ui.js";
|
||||||
|
|
||||||
|
const VALID_OUTPUT_TYPES = ["SaveImage", "VHS_VideoCombine"];
|
||||||
|
|
||||||
export class ShareDialog extends ComfyDialog {
|
export class ShareDialog extends ComfyDialog {
|
||||||
static instance = null;
|
static instance = null;
|
||||||
static matrix_auth = { homeserver: "matrix.org", username: "", password: "" };
|
static matrix_auth = { homeserver: "matrix.org", username: "", password: "" };
|
||||||
@ -110,9 +112,12 @@ export class ShareDialog extends ComfyDialog {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.share_button.onclick = async () => {
|
this.share_button.onclick = async () => {
|
||||||
|
alert("Clicked");
|
||||||
const prompt = await app.graphToPrompt();
|
const prompt = await app.graphToPrompt();
|
||||||
const nodes = app.graph._nodes;
|
const nodes = app.graph._nodes;
|
||||||
|
|
||||||
|
console.log({ prompt, nodes });
|
||||||
|
|
||||||
const destinations = [];
|
const destinations = [];
|
||||||
if (this.matrix_destination_checkbox.checked) {
|
if (this.matrix_destination_checkbox.checked) {
|
||||||
destinations.push("matrix");
|
destinations.push("matrix");
|
||||||
@ -141,7 +146,9 @@ export class ShareDialog extends ComfyDialog {
|
|||||||
// TODO: Add support for AnimateDiffCombine, etc. nodes that save videos/gifs, etc.
|
// TODO: Add support for AnimateDiffCombine, etc. nodes that save videos/gifs, etc.
|
||||||
for (let i = 0; i < nodes.length; i++) {
|
for (let i = 0; i < nodes.length; i++) {
|
||||||
const node = nodes[i];
|
const node = nodes[i];
|
||||||
if (node.type !== "SaveImage") {
|
console.log({ node });
|
||||||
|
|
||||||
|
if (!VALID_OUTPUT_TYPES.includes(node.type)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,7 +163,12 @@ export class ShareDialog extends ComfyDialog {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (node.type === "VHS_VideoCombine") {
|
||||||
|
potential_output_nodes.push(node);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log({ potential_outputs, potential_output_nodes })
|
||||||
|
|
||||||
if (potential_outputs.length === 0) {
|
if (potential_outputs.length === 0) {
|
||||||
if (potential_output_nodes.length === 0) {
|
if (potential_output_nodes.length === 0) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user