Skip to content

Type a motion, watch a rigged character perform it: fast video model + GVHMR + live Mixamo retargeting

JavaScript

Capture: per-prompt clip length, dynamic prompt list

blendi-remadedad9d8e3af6a
diff --git a/.gitignore b/.gitignore
index d1b328b..49ca04d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,4 @@ renders/
# frame-exact app recordings (tools/capture.mjs)
captures/
node_modules/
+captures_xbot/
diff --git a/public/app.js b/public/app.js
index 3a6f9e3..bf91b88 100644
--- a/public/app.js
+++ b/public/app.js
@@ -660,7 +660,10 @@ $('#file-vid').onchange = (e) => {
window.p2r = {
get current() { return current; }, get rig() { return rig; }, takes, video, stats,
// ---- frame-exact capture: used by tools/capture.mjs ----
- submit(prompt) { submitPrompt(prompt); return takes[takes.length - 1].id; },
+ submit(prompt, { duration } = {}) {
+ if (duration) { settings.duration = duration; $('#duration').value = duration; $('#duration-v').textContent = duration + 's'; }
+ submitPrompt(prompt); return takes[takes.length - 1].id;
+ },
take(id) { const t = takes.find((x) => x.id === id); return t && { id: t.id, status: t.status, hq: t.hqStatus, url: t.videoUrl, duration: t.hq?.duration ?? null }; },
async beginCapture(id) {
const t = takes.find((x) => x.id === id);
diff --git a/public/index.html b/public/index.html
index ed93c27..294b3f0 100644
--- a/public/index.html
+++ b/public/index.html
@@ -122,7 +122,7 @@
<div class="row"><span>Source</span>
<select id="source"><option value="performer">Performer → video</option><option value="t2v">Text → video</option></select></div>
<label class="check"><input type="checkbox" id="chain" /><span>Continue from last frame<small>Each clip starts where the previous ended — a continuous stream you direct with prompts.</small></span></label>
- <div class="row"><span>Duration <b id="duration-v"></b></span><input type="range" id="duration" min="2" max="10" step="1" /></div>
+ <div class="row"><span>Duration <b id="duration-v"></b></span><input type="range" id="duration" min="2" max="20" step="1" /></div>
<div class="row"><span>Resolution</span><select id="resolution"><option>480P</option><option>768P</option><option>1080P</option></select></div>
</div>
diff --git a/tools/capture.mjs b/tools/capture.mjs
index f0cc8f5..230ee28 100644
--- a/tools/capture.mjs
+++ b/tools/capture.mjs
@@ -19,7 +19,9 @@ const W = Number(args.width || 2560), H = Number(args.height || 1440), FPS = 30;
const OUT = path.resolve(args.out || 'captures');
const URL = args.url || 'http://localhost:5177';
const CHROME = args.chrome || 'C:/Program Files/Google/Chrome/Application/chrome.exe';
-const prompts = fs.readFileSync(args.prompts || 'tools/prompts.txt', 'utf8').split(/\r?\n/).map((l) => l.trim()).filter((l) => l && !l.startsWith('#'));
+// Lines may end in "| <seconds>" to set that clip's duration (FLUX 3 Max: 5–20s).
+const prompts = fs.readFileSync(args.prompts || 'tools/prompts.txt', 'utf8').split(/\r?\n/).map((l) => l.trim()).filter((l) => l && !l.startsWith('#'))
+ .map((l) => { const [p, d] = l.split('|').map((x) => x.trim()); return { prompt: p, duration: d ? Number(d) : Number(args.duration || 5) }; });
// App settings for the recording: FLUX 3 Max, portrait, GVHMR only (hold until HQ), static camera.
const settings = {
@@ -51,11 +53,11 @@ try {
&& document.querySelector('#pill-pose').classList.contains('ok'), { timeout: 120000 });
log(`app ready (${settings.character}, ${settings.videoModel}); ${prompts.length} prompts`);
- for (const [i, prompt] of prompts.entries()) {
+ for (const [i, { prompt, duration: seconds }] of prompts.entries()) {
const name = `${String(i + 1).padStart(2, '0')}_${slug(prompt)}`;
- log(`#${i + 1} generating: ${prompt}`);
+ log(`#${i + 1} generating (${seconds}s): ${prompt}`);
await page.evaluate((p) => { document.querySelector('#prompt').value = p; }, prompt);
- const id = await page.evaluate((p) => window.p2r.submit(p), prompt);
+ const id = await page.evaluate((p, d) => window.p2r.submit(p, { duration: d }), prompt, seconds);
const take = await page.waitForFunction((tid) => {
const t = window.p2r.take(tid);
return t && (t.status === 'error' || t.hq === 'error' || t.hq === 'done') && t;
diff --git a/tools/prompts_dynamic.txt b/tools/prompts_dynamic.txt
new file mode 100644
index 0000000..b2eff30
--- /dev/null
+++ b/tools/prompts_dynamic.txt
@@ -0,0 +1,24 @@
+# Longer, more dynamic routines. "| N" = clip length in seconds (FLUX 3 Max: 5–20).
+# Still facing the camera and roughly in place — just bigger, faster, and longer.
+does an explosive hip hop routine with jumps, kicks and big arm swings | 10
+does a fast martial arts combo: two punches, a front kick, then a high roundhouse kick | 8
+does a Michael Jackson style dance with sharp kicks, hip thrusts and a dramatic final pose | 10
+jumps rope very fast with an imaginary rope, then does high double jumps | 8
+does star jumps, then a big tuck jump with knees to the chest | 8
+does an energetic cheerleading routine with high kicks and sharp arm motions | 10
+does a sword fighting routine with an imaginary sword: big slashes, thrusts and a lunge | 10
+does a celebratory touchdown dance with a ball spike and a shimmy | 8
+does an Irish step dance with fast kicking footwork and arms held straight down | 8
+does a karate sequence: front kick, side kick, then a jumping punch | 8
+does boxing footwork, bobbing and weaving, then a fast flurry of hooks and uppercuts | 10
+does a high-energy aerobics routine with punches, side steps and knee lifts | 10
+does a haka-style war dance with stomps, chest slaps and wide powerful stances | 10
+plays a wild air guitar solo, jumping and headbanging | 8
+does a breakdance toprock with quick crossing footwork, staying on their feet | 8
+does a ballet sequence: plié, relevé, then an arabesque with one leg extended back | 10
+does a powerful kung fu form with deep horse stances, palm strikes and a crane kick | 10
+does a squat kick dance, alternating legs kicking out from a deep squat | 8
+does a superhero power-up: crouches low, then explodes upward with fists raised | 8
+dances the Charleston with swinging arms and kicking feet | 8
+does a Matrix-style slow-motion dodge, leaning far back | 8
+does a gymnastics finish: arms up, a jump with a half turn, then a big salute | 8