get image

This commit is contained in:
zjt
2024-05-25 21:31:35 +08:00
parent 95b5de3f39
commit da4b878859
13 changed files with 84 additions and 57449 deletions

View File

@@ -3,6 +3,7 @@ import { txt2imgAPIformatJSON, txt2imgAPIformatExtraData } from "../comfyJson/tx
import axios from "axios";
import { selectNodeFromApiJSONbyID } from "../utils/editComfyJson";
import WebSocket from "ws";
import { readJSONFile, saveJSONFile } from "../utils/jsonReader";
const baseUrl = "http://47.108.92.176:20000";
const baseWsUrl = "ws://47.108.92.176:20000";
// const baseUrl = "http://localhost:8188";
@@ -53,6 +54,8 @@ const Txt2ImgHandler: RequestHandler<Txt2ImgRequest, any> = async (ctx, next) =>
}
if (data.node === '94') {
console.log(data.output);
// 综合使用示例
resolve({ prompt: temp, url: baseUrl + '/view?filename=' + data.output.images[0].filename });
}
}else if (type === "executing") {