From 78584ce1b6d8a28c6a9dfb2a12546cb1ae77fd8a Mon Sep 17 00:00:00 2001 From: Ken Yasue Date: Mon, 22 Sep 2025 22:22:57 +0200 Subject: [PATCH] save changes --- src/combined_pinterest_pipeline.ts | 4 +++- src/comfyworkflows/generate_video.json | 18 +++++++++++++++--- src/lib/openai.ts | 10 ++++++++++ 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/combined_pinterest_pipeline.ts b/src/combined_pinterest_pipeline.ts index 79c65d6..44df863 100644 --- a/src/combined_pinterest_pipeline.ts +++ b/src/combined_pinterest_pipeline.ts @@ -406,7 +406,9 @@ async function generateImageForItem(item: PipelineItem, server: { baseUrl: strin videoFileName, server.baseUrl, server.outputDir, - { width: 1280, height: 720 } + { width: 1280, height: 720 }, + true, + false ); if (videoPath) { diff --git a/src/comfyworkflows/generate_video.json b/src/comfyworkflows/generate_video.json index 2b10c0e..a6aaefe 100644 --- a/src/comfyworkflows/generate_video.json +++ b/src/comfyworkflows/generate_video.json @@ -97,7 +97,7 @@ }, "52": { "inputs": { - "image": "AG9782s.webp" + "image": "zagreb_musicspot_s14_c1_v1.png" }, "class_type": "LoadImage", "_meta": { @@ -340,7 +340,7 @@ "inputs": { "resize_to": "4k", "images": [ - "8", + "76", 0 ], "upscaler_trt_model": [ @@ -355,12 +355,24 @@ }, "75": { "inputs": { - "model": "4xNomos2_otf_esrgan", + "model": "4x-UltraSharp", "precision": "fp16" }, "class_type": "LoadUpscalerTensorrtModel", "_meta": { "title": "Load Upscale Tensorrt Model" } + }, + "76": { + "inputs": { + "anything": [ + "8", + 0 + ] + }, + "class_type": "easy cleanGpuUsed", + "_meta": { + "title": "Clean VRAM Used" + } } } \ No newline at end of file diff --git a/src/lib/openai.ts b/src/lib/openai.ts index 492bfe5..f14aea8 100644 --- a/src/lib/openai.ts +++ b/src/lib/openai.ts @@ -41,6 +41,11 @@ async function callOpenAI(prompt: string): Promise { const jsonMatch = content.match(/\{[\s\S]*\}/); if (jsonMatch) { return JSON.parse(jsonMatch[0]); + } else { + const arrayMatch = content.match(/\[[\s\S]*\]/); + if (arrayMatch) { + return JSON.parse(arrayMatch[0]); + } } } else { logger.error('Unexpected API response:', data); @@ -94,6 +99,11 @@ async function callOpenAIWithFile(imagePath: string, prompt: string): Promise