submit-s2-control.mjs 1.12 KB
// spike, one-off: S2 control arm -- identical to S1 except reference_video_urls
// is empty and the prompt drops all <Video 1>/<Audio 1> references. Same
// reference images, same motion description in text. Isolates the effect of
// reference_video_urls by comparing this clip's motion against S1's.
process.loadEnvFile(new URL("../../.env", import.meta.url));
const BASE = process.env.H3_CONSOLE_BASE;
const TOKEN = process.env.H3_CONSOLE_TOKEN;
const fs = await import("node:fs");

const prompt = fs.readFileSync(new URL("./prompt-s2-control-novideo.txt", import.meta.url), "utf8");

const body = {
  prompt,
  width: 480,
  height: 832,
  frames: 240, // 10s
  steps: 20,
  turbo: false,
  seed: 0,
  reference_image_urls: [
    "http://192.168.110.67:8080/assets/237d91a054cf4113__person.png",
    "http://192.168.110.67:8080/assets/ce95f5ce3ba94695__garment.png",
  ],
  reference_video_urls: [],
};

const res = await fetch(`${BASE}/v1/videos`, {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: `Bearer ${TOKEN}` },
  body: JSON.stringify(body),
});
console.log(JSON.stringify(await res.json(), null, 2));