This commit is contained in:
zjt
2024-05-28 15:28:45 +08:00
parent ed6426bc35
commit 019a6c433d
4 changed files with 20 additions and 3 deletions

View File

@@ -4,6 +4,7 @@ import axios from "axios";
import { selectNodeFromApiJSONbyID } from "../utils/editComfyJson";
import WebSocket from "ws";
import { readJSONFile, saveJSONFile } from "../utils/jsonReader";
import { seed } from "../seed";
const baseUrl = "http://47.108.92.176:20000";
const baseWsUrl = "ws://47.108.92.176:20000";
// const baseUrl = "http://localhost:8188";
@@ -23,6 +24,9 @@ const Txt2ImgHandler: RequestHandler<Txt2ImgRequest, any> = async (ctx, next) =>
const inputNode = selectNodeFromApiJSONbyID(txt2imgAPIformatJSON, "33");
let temp = "";
let preViewBlobs: any = [];
const seedNode = selectNodeFromApiJSONbyID(txt2imgAPIformatJSON, "10");
seedNode.inputs.seed = Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);
seed = seedNode.inputs.seed;
inputNode.inputs.string = prompt;
try {
ctx.body = {