Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Continue from video: the media panel reads an empty continue_from the same way the backend does

Bowen Xuef7d9f6c5f7e3
diff --git a/scripts/test_freevideo_entry.mjs b/scripts/test_freevideo_entry.mjs
index 3e49e73..23c5365 100644
--- a/scripts/test_freevideo_entry.mjs
+++ b/scripts/test_freevideo_entry.mjs
@@ -5,7 +5,7 @@ import {outputDownloadURL} from '../web/output_download.js';
import {regenerateResult, upscaleResult, createSecondPassQueue} from '../web/studio_queue.js';
import {referenceInputs, mediaRows} from '../web/prompt_references.js';
import {expandCast} from '../web/cast_mention.js';
-import {cleanOptionalPrompt, cleanOptionalWidgets} from '../web/optional_inputs.js';
+import {cleanOptionalPrompt, cleanOptionalWidgets, optionalInputValue} from '../web/optional_inputs.js';
class Element {
constructor(tag) {
@@ -38,7 +38,7 @@ test('main browser entry registers both views and preserves node hooks', async t
const document = {head: new Element('head'), createElement: tag => new Element(tag),
createRange: () => ({createContextualFragment: () => new Element('span')})};
const dependencies = {
- app, api, outputDownloadURL, regenerateResult, upscaleResult, createSecondPassQueue, referenceInputs, mediaRows, expandCast, cleanOptionalPrompt, cleanOptionalWidgets,
+ app, api, outputDownloadURL, regenerateResult, upscaleResult, createSecondPassQueue, referenceInputs, mediaRows, expandCast, cleanOptionalPrompt, cleanOptionalWidgets, optionalInputValue,
createCastLibrary: options => {
const cast = {element: new Element('cast'), options, destroyed: false, destroy() { this.destroyed = true; }};
casts.push(cast); return cast;
@@ -104,7 +104,7 @@ test('main browser entry registers both views and preserves node hooks', async t
.replace("import { shareButton } from './share.js';", 'const {shareButton} = globalThis.__freevideoEntryTest;')
.replace("import { reportFileName } from './report_issue.js';", 'const {reportFileName} = globalThis.__freevideoEntryTest;')
.replace("import { rememberPromptDraft, savePromptDraft, trackPromptDraft, watchPromptHistory, promptHistoryRestoring } from './prompt_draft.js';", 'const {rememberPromptDraft,savePromptDraft} = globalThis.__freevideoEntryTest; const trackPromptDraft = () => {}; const watchPromptHistory = () => {}; const promptHistoryRestoring = () => false;')
- .replace("import { cleanOptionalWidgets, cleanOptionalPrompt } from './optional_inputs.js';", 'const {cleanOptionalWidgets,cleanOptionalPrompt} = globalThis.__freevideoEntryTest;')
+ .replace("import { cleanOptionalWidgets, cleanOptionalPrompt, optionalInputValue } from './optional_inputs.js';", 'const {cleanOptionalWidgets,cleanOptionalPrompt,optionalInputValue} = globalThis.__freevideoEntryTest;')
.replace("import { regenerateResult, upscaleResult } from './studio_queue.js';", 'const {regenerateResult,upscaleResult} = globalThis.__freevideoEntryTest;')
.replace("import { regenerateResult, createSecondPassQueue } from './studio_queue.js';", 'const {regenerateResult,createSecondPassQueue} = globalThis.__freevideoEntryTest;')
.replace("import { secondPassAction } from './result_actions.js';", 'const {secondPassAction} = globalThis.__freevideoEntryTest;')
diff --git a/web/freevideo.js b/web/freevideo.js
index a55272e..e11c54b 100644
--- a/web/freevideo.js
+++ b/web/freevideo.js
@@ -16,7 +16,7 @@ import { outputDownloadURL } from './output_download.js';
import { shareButton } from './share.js';
import { reportFileName } from './report_issue.js';
import { rememberPromptDraft, savePromptDraft, trackPromptDraft, watchPromptHistory, promptHistoryRestoring } from './prompt_draft.js';
-import { cleanOptionalWidgets, cleanOptionalPrompt } from './optional_inputs.js';
+import { cleanOptionalWidgets, cleanOptionalPrompt, optionalInputValue } from './optional_inputs.js';
import { regenerateResult, createSecondPassQueue } from './studio_queue.js';
import { secondPassAction } from './result_actions.js';
import { openImageEditor, icon } from './image_editor.js';
@@ -245,7 +245,7 @@ function mediaPanel(node, mount = null) {
// A Generate node that continues a video takes these keyframes as pictures, so they may sit beside references.
const continuing = (node.outputs?.[0]?.links || []).some(id => {
const target = node.graph?.getNodeById(node.graph?.links[id]?.target_id);
- return target?.type === 'FreeVideoGenerate' && String(target.widgets?.find(w => w.name === 'continue_from')?.value ?? '').trim();
+ return target?.type === 'FreeVideoGenerate' && optionalInputValue('continue_from', target.widgets?.find(w => w.name === 'continue_from')?.value) !== '';
});
const first = active.filter(row => row.role === "first").length + Number(linked('first'));
const last = active.filter(row => row.role === "last").length + Number(linked('last'));