get image
This commit is contained in:
@@ -21,7 +21,8 @@ const UpscaleHandler: RequestHandler<any ,any> = async (ctx) => {
|
||||
const { prompt, url } = requestBody;
|
||||
const inputNode = selectNodeFromApiJSONbyID(upScaleAPIFormatJSON, "12");
|
||||
inputNode.inputs.image = url;
|
||||
ctx.body = {
|
||||
try {
|
||||
ctx.body = {
|
||||
url: baseUrl + '/view?filename=' + await new Promise((resolve, reject) => {
|
||||
const taskID = Math.random().toFixed(10);
|
||||
const ws = new WebSocket(`${baseWsUrl}/ws?clientId=${taskID}`);
|
||||
@@ -51,6 +52,10 @@ const UpscaleHandler: RequestHandler<any ,any> = async (ctx) => {
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
}
|
||||
export default UpscaleHandler;
|
||||
Reference in New Issue
Block a user