save changes

This commit is contained in:
2025-09-22 22:22:57 +02:00
parent e5a65114d1
commit 78584ce1b6
3 changed files with 28 additions and 4 deletions

View File

@ -406,7 +406,9 @@ async function generateImageForItem(item: PipelineItem, server: { baseUrl: strin
videoFileName, videoFileName,
server.baseUrl, server.baseUrl,
server.outputDir, server.outputDir,
{ width: 1280, height: 720 } { width: 1280, height: 720 },
true,
false
); );
if (videoPath) { if (videoPath) {

View File

@ -97,7 +97,7 @@
}, },
"52": { "52": {
"inputs": { "inputs": {
"image": "AG9782s.webp" "image": "zagreb_musicspot_s14_c1_v1.png"
}, },
"class_type": "LoadImage", "class_type": "LoadImage",
"_meta": { "_meta": {
@ -340,7 +340,7 @@
"inputs": { "inputs": {
"resize_to": "4k", "resize_to": "4k",
"images": [ "images": [
"8", "76",
0 0
], ],
"upscaler_trt_model": [ "upscaler_trt_model": [
@ -355,12 +355,24 @@
}, },
"75": { "75": {
"inputs": { "inputs": {
"model": "4xNomos2_otf_esrgan", "model": "4x-UltraSharp",
"precision": "fp16" "precision": "fp16"
}, },
"class_type": "LoadUpscalerTensorrtModel", "class_type": "LoadUpscalerTensorrtModel",
"_meta": { "_meta": {
"title": "Load Upscale Tensorrt Model" "title": "Load Upscale Tensorrt Model"
} }
},
"76": {
"inputs": {
"anything": [
"8",
0
]
},
"class_type": "easy cleanGpuUsed",
"_meta": {
"title": "Clean VRAM Used"
}
} }
} }

View File

@ -41,6 +41,11 @@ async function callOpenAI(prompt: string): Promise<any> {
const jsonMatch = content.match(/\{[\s\S]*\}/); const jsonMatch = content.match(/\{[\s\S]*\}/);
if (jsonMatch) { if (jsonMatch) {
return JSON.parse(jsonMatch[0]); return JSON.parse(jsonMatch[0]);
} else {
const arrayMatch = content.match(/\[[\s\S]*\]/);
if (arrayMatch) {
return JSON.parse(arrayMatch[0]);
}
} }
} else { } else {
logger.error('Unexpected API response:', data); logger.error('Unexpected API response:', data);
@ -94,6 +99,11 @@ async function callOpenAIWithFile(imagePath: string, prompt: string): Promise<an
const jsonMatch = content.match(/\{[\s\S]*\}/); const jsonMatch = content.match(/\{[\s\S]*\}/);
if (jsonMatch) { if (jsonMatch) {
return JSON.parse(jsonMatch[0]); return JSON.parse(jsonMatch[0]);
} else {
const arrayMatch = content.match(/\[[\s\S]*\]/);
if (arrayMatch) {
return JSON.parse(arrayMatch[0]);
}
} }
} else { } else {
logger.error('Unexpected API response:', data); logger.error('Unexpected API response:', data);