seed
This commit is contained in:
@@ -4,14 +4,13 @@ import axios from "axios";
|
||||
import { selectNodeFromApiJSONbyID } from "../utils/editComfyJson";
|
||||
import WebSocket from "ws";
|
||||
import { readJSONFile, saveJSONFile } from "../utils/jsonReader";
|
||||
import { seed } from "../seed";
|
||||
import { globalMap } from "../seed";
|
||||
const baseUrl = "http://47.108.92.176:20000";
|
||||
const baseWsUrl = "ws://47.108.92.176:20000";
|
||||
// const baseUrl = "http://localhost:8188";
|
||||
// const baseWsUrl = "ws://localhost:8188";
|
||||
axios.defaults.baseURL = baseUrl;
|
||||
const Txt2ImgHandler: RequestHandler<Txt2ImgRequest, any> = async (ctx, next) => {
|
||||
console.log(ctx.method);
|
||||
ctx.set('Access-Control-Allow-Origin', '*')
|
||||
ctx.set('Access-Control-Allow-Headers', 'Content-Type,Content-Length,Authorization,Accept,X-Requested-With')
|
||||
ctx.set('Access-Control-Allow-Methods', 'PUT,POST,GET,DELETE,OPTIONS')
|
||||
@@ -56,7 +55,7 @@ const Txt2ImgHandler: RequestHandler<Txt2ImgRequest, any> = async (ctx, next) =>
|
||||
if (data.node === '21') {
|
||||
temp = data.output.text[0];
|
||||
}
|
||||
if (data.node === '94') {
|
||||
if (data.node === '77') {
|
||||
console.log(data.output);
|
||||
const filePath = './data.json';
|
||||
|
||||
@@ -68,6 +67,7 @@ const Txt2ImgHandler: RequestHandler<Txt2ImgRequest, any> = async (ctx, next) =>
|
||||
// 保存回JSON文件
|
||||
saveJSONFile(filePath, data1);
|
||||
})
|
||||
globalMap.step1url = data.output.images[0].filename;
|
||||
resolve({ prompt: temp, url: baseUrl + '/view?filename=' + data.output.images[0].filename });
|
||||
}
|
||||
} else if (type === "executing") {
|
||||
|
||||
Reference in New Issue
Block a user