From 2e79bc4a12457cfa5bc048a8987c2f3928cc475e Mon Sep 17 00:00:00 2001 From: Ukawka <140130066+Ukawka@users.noreply.github.com> Date: Tue, 15 Sep 2026 23:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=AF=E5=BE=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pipeline.mjs | 3 ++- run_case_matrix.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/pipeline.mjs b/pipeline.mjs index a9eb95f..a2f9bec 100644 --- a/pipeline.mjs +++ b/pipeline.mjs @@ -9,9 +9,10 @@ import {Buffer} from 'node:buffer'; import {spawnSync} from 'node:child_process'; import {cpSync, existsSync, mkdirSync, readFileSync, rmSync, unlinkSync, writeFileSync} from 'node:fs'; +import {fileURLToPath} from 'node:url'; import path from 'node:path'; -const repoRoot = path.dirname(new URL(import.meta.url).pathname); +const repoRoot = path.dirname(fileURLToPath(import.meta.url)); const defaultGenielabsDir = '/Users/zhaoziyu/Documents/Codex/2026-09-10/diao/work/repos/spine-animation-ai'; const defaultModel = 'gpt-image-2'; const positivePrompt = [ diff --git a/run_case_matrix.py b/run_case_matrix.py index d3ee97f..00e93fa 100644 --- a/run_case_matrix.py +++ b/run_case_matrix.py @@ -7,6 +7,7 @@ and case-summary.json under --out-dir. """ import argparse, json, shutil, subprocess from pathlib import Path +import sys from PIL import Image import numpy as np @@ -18,7 +19,7 @@ def main(): ap.add_argument('--candidate', action='append', nargs=2, metavar=('NAME','PARTS_DIR'), required=True) args = ap.parse_args() root = Path(args.out_dir); root.mkdir(parents=True, exist_ok=True) - py = '/Users/zhaoziyu/anaconda3/bin/python' + py = sys.executable ref = Image.open(args.reference).convert('RGBA') ref_rgb = np.asarray(ref)[:, :, :3].astype(np.float32) ref_fg = np.asarray(ref)[:, :, 3] > 128