Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

fix: a2v upload rejection + longer frame options + audio mode UX cleanup

Adam Eivy617e111e422a
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.md
index 2277af245e..036e7536e2 100644
--- a/.changelog/NEXT.md
+++ b/.changelog/NEXT.md
@@ -2,6 +2,7 @@
## Fixed
+- Video Gen audio uploads (a2v mode) were rejected with "File type not allowed" even for valid MP3/WAV files — the multipart parser was missing `fieldname` on the file metadata it passed to the upload filter, so every per-field MIME check silently evaluated to false. Fixed by including `fieldname` in the parser's file metadata, matching multer's API contract.
- `update.sh` no longer hangs after "PortOS restarted" — the browser-open script now exits explicitly instead of waiting for Node's undici connection pool to drain.
- `update.sh` now kills the PM2 daemon (not just stops apps) before restarting, fixing crashes where a stale daemon cached a `ProcessContainerFork.js` path from a different project's Yarn PnP zip cache.
- Writers-room storyboard renders queued through Codex now wait their turn instead of erroring with "A Codex generation is already in progress" when you fire a second render before the first finishes. Codex jobs run on their own queue lane, so they don't block (and aren't blocked by) local image or video renders.
@@ -15,6 +16,9 @@
## Changed
+- Video Gen frame picker now goes up to 481 frames (~20s at 24fps); options past 241 frames (~10s) show a hint recommending Extend mode for reliable long renders at 48 GB.
+- Switching to Audio mode now automatically selects the smallest dgrauet model (Q4) when the current model doesn't support a2v, instead of landing on a blocked state with a warning. The warning still appears if you manually pick a non-ltx2 model while in Audio mode.
+- "Disable audio" and "No music" checkboxes are hidden in Audio mode and their state is reset on entry — both are irrelevant when audio comes from an uploaded file rather than being generated.
- Video Gen FFLF mode now offers the same dual control on both the first-frame and last-frame slots — pick from your image gallery or upload a fresh image — instead of the previous upload-only first frame and gallery-only last frame.
- Release workflow no longer silently skips creating the GitHub Release when something else pushed the version tag before the workflow ran.
- Release-notes style guide tightened — entries should be one sentence per change in user-facing language, not code-review prose with file paths and internal symbols.
diff --git a/client/src/pages/VideoGen.jsx b/client/src/pages/VideoGen.jsx
index dcf9335c0d..1792c5fd3a 100644
--- a/client/src/pages/VideoGen.jsx
+++ b/client/src/pages/VideoGen.jsx
@@ -59,7 +59,13 @@ const RESOLUTIONS = [
{ label: '768×768 (1:1)', w: 768, h: 768 },
];
-const FRAME_OPTIONS = [25, 49, 73, 97, 121, 145, 169, 193, 217, 241];
+// Values follow LTX-2's 8k+1 latent boundary so the model doesn't silently
+// snap. 241 = 10s @ 24fps is the comfortable single-pass ceiling on 48 GB
+// at standard widths; the higher options (265–481) push past that and may
+// swap or OOM at 1280×704. For reliable clips longer than ~10s, use Extend
+// mode (renders past a source video, conditioning on its full latent) —
+// see the hint under the Frames dropdown.
+const FRAME_OPTIONS = [25, 49, 73, 97, 121, 145, 169, 193, 217, 241, 265, 313, 361, 481];
const FPS_OPTIONS = [16, 24, 30];
const TILING_OPTIONS = [
{ value: 'auto', label: 'Auto (recommended)' },
@@ -346,6 +352,20 @@ export default function VideoGen() {
clearSourceImage();
clearLastImage();
setExtendFromVideoId('');
+ // disableAudio strips the output audio track — in a2v mode that would
+ // remove the user's uploaded audio, defeating the mode entirely.
+ // noMusic appends a prompt constraint for text-conditioned audio gen;
+ // a2v uses uploaded audio so the constraint is meaningless there too.
+ setDisableAudio(false);
+ setNoMusic(false);
+ // Auto-select the smallest (first) ltx2-runtime model so the user
+ // doesn't land on a blocked state. Only fires when the current model
+ // can't handle a2v — if they already have a dgrauet model selected
+ // we leave it alone.
+ if (currentModel?.runtime !== 'ltx2') {
+ const ltx2Model = models.find((m) => m.runtime === 'ltx2');
+ if (ltx2Model) setModelId(ltx2Model.id);
+ }
}
};
@@ -999,6 +1019,11 @@ export default function VideoGen() {
>
{FRAME_OPTIONS.map((f) => <option key={f} value={f}>{f} ({(f / fps).toFixed(1)}s @ {fps}fps)</option>)}
</select>
+ {numFrames > 241 && (
+ <p className="text-[10px] text-gray-500 leading-snug mt-1">
+ Past 241 frames a single-pass render may swap or OOM at 48 GB. For reliable longer clips, render up to ~10s and then use <strong>Extend</strong> on the result — it conditions on the source's full latent rather than a single last frame.
+ </p>
+ )}
</div>
<div>
@@ -1087,28 +1112,32 @@ export default function VideoGen() {
</select>
</div>
- <label className="col-span-2 sm:col-span-3 flex items-center gap-2 text-xs text-gray-400 cursor-pointer">
- <input
- type="checkbox"
- checked={disableAudio}
- onChange={(e) => setDisableAudio(e.target.checked)}
- className="rounded"
- />
- Disable audio (LTX-2 only — speeds up generation)
- </label>
- <label
- className={`col-span-2 sm:col-span-3 flex items-center gap-2 text-xs cursor-pointer ${disableAudio ? 'text-gray-600 cursor-not-allowed' : 'text-gray-400'}`}
- title="LTX-2 conditions audio on the prompt — appending 'no music, no soundtrack' at submit time pushes the model toward ambient/diegetic sound only"
- >
- <input
- type="checkbox"
- checked={noMusic}
- disabled={disableAudio}
- onChange={(e) => setNoMusic(e.target.checked)}
- className="rounded"
- />
- No music — keep ambient/diegetic sound only (LTX-2)
- </label>
+ {mode !== 'a2v' && (
+ <label className="col-span-2 sm:col-span-3 flex items-center gap-2 text-xs text-gray-400 cursor-pointer">
+ <input
+ type="checkbox"
+ checked={disableAudio}
+ onChange={(e) => setDisableAudio(e.target.checked)}
+ className="rounded"
+ />
+ Disable audio (LTX-2 only — speeds up generation)
+ </label>
+ )}
+ {mode !== 'a2v' && (
+ <label
+ className={`col-span-2 sm:col-span-3 flex items-center gap-2 text-xs cursor-pointer ${disableAudio ? 'text-gray-600 cursor-not-allowed' : 'text-gray-400'}`}
+ title="LTX-2 conditions audio on the prompt — appending 'no music, no soundtrack' at submit time pushes the model toward ambient/diegetic sound only"
+ >
+ <input
+ type="checkbox"
+ checked={noMusic}
+ disabled={disableAudio}
+ onChange={(e) => setNoMusic(e.target.checked)}
+ className="rounded"
+ />
+ No music — keep ambient/diegetic sound only (LTX-2)
+ </label>
+ )}
</div>
<div className="flex flex-wrap items-center gap-2 pt-1">
diff --git a/server/lib/multipart.js b/server/lib/multipart.js
index 1a0e71f4fb..5216536dce 100644
--- a/server/lib/multipart.js
+++ b/server/lib/multipart.js
@@ -196,7 +196,10 @@ function streamMultipart(req, boundary, acceptedNames, maxSize, fileFilter, next
const mimeMatch = headerStr.match(/Content-Type:\s*([^\r\n]+)/i);
currentFileMimetype = mimeMatch ? mimeMatch[1].trim() : 'application/octet-stream';
if (isMatchingFile) {
- const fileMeta = { originalname: currentFilename, mimetype: currentFileMimetype };
+ // `fieldname` matches multer's API contract — videoGen.js's filter
+ // dispatches on it to enforce per-field MIME rules (image/* on
+ // sourceImage|lastImage, audio/* on audioFile).
+ const fileMeta = { fieldname: currentName, originalname: currentFilename, mimetype: currentFileMimetype };
if (fileFilter) {
// CONTRACT: fileFilter MUST call its `cb` synchronously. We read
diff --git a/server/lib/multipart.test.js b/server/lib/multipart.test.js
index f7d0a44f91..2150192375 100644
--- a/server/lib/multipart.test.js
+++ b/server/lib/multipart.test.js
@@ -171,6 +171,28 @@ describe('multipart parser', () => {
expect(req.files?.lastImage).toBeUndefined();
});
+ it('exposes fieldname on the fileFilter meta so per-field MIME rules work', async () => {
+ // Regression: videoGen.js dispatches on file.fieldname to enforce
+ // image/* on sourceImage|lastImage and audio/* on audioFile. Dropping
+ // fieldname from fileMeta silently rejects every audio (and image)
+ // upload as "File type not allowed".
+ const seen = [];
+ const req = makeMultipartReq([
+ { name: 'audioFile', filename: 'song.mp3', contentType: 'audio/mpeg', body: Buffer.from([0x01]) },
+ ]);
+ await new Promise((resolve, reject) => {
+ const mw = uploadFields(['sourceImage', 'audioFile'], {
+ fileFilter: (_req, file, cb) => {
+ seen.push({ fieldname: file.fieldname, mimetype: file.mimetype });
+ cb(null, true);
+ },
+ });
+ mw(req, {}, (err) => err ? reject(err) : resolve());
+ });
+ expect(seen).toEqual([{ fieldname: 'audioFile', mimetype: 'audio/mpeg' }]);
+ expect(req.files?.audioFile?.originalname).toBe('song.mp3');
+ });
+
it('rejects requests without the multipart Content-Type', async () => {
const stream = Readable.from(['nope']);
stream.headers = { 'content-type': 'application/json' };