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.

Image generation: a page refresh restores the exact canvas size the running image task was made for

Bowen Xue65cc45252620
diff --git a/web/image_editor.js b/web/image_editor.js
index 95fbe7b..4ae672f 100644
--- a/web/image_editor.js
+++ b/web/image_editor.js
@@ -1596,7 +1596,12 @@ export async function openImageEditor({source = null, name = source || '', targe
dialog.showModal();
computeLayout();
renderPanels();
- if (generation.resumedRatio && !doc.layers.length && generation.resumedRatio !== doc.ratio) setBlankCanvasRatio(generation.resumedRatio, true);
+ // The result is placed on the canvas the request was made for, not on the one a reload rebuilt.
+ const resumedCanvas = generation.resumedCanvas;
+ if (resumedCanvas && !doc.layers.length && (resumedCanvas.width !== doc.width || resumedCanvas.height !== doc.height)) {
+ const next = blankDocument(resumedCanvas, blankCanvasRatio(resumedCanvas));
+ followSize(doc, next); deselectQuiet(); commit(next);
+ }
select(!doc.layers.length || generation.state().running ? 'generate' : startTool || (fresh && target && role !== 'reference' ? 'crop' : 'move'));
(save.disabled ? stage : save).focus();
// The other fonts load in the background, so switching to one is immediate.
diff --git a/web/image_generation.js b/web/image_generation.js
index 0ac4eef..597681d 100644
--- a/web/image_generation.js
+++ b/web/image_generation.js
@@ -616,7 +616,8 @@ export function createImageGeneration({client, renderer, t, getDoc, getSelection
}
return {mount, unmount() { clearAttention(); promptRequired = false; mounted = null; },
selected: () => session.check(), cancel: session.cancel,
- // The blank canvas shape a reloaded generation was started on, to be set again by the editor.
- resumedRatio: resumed?.context?.mode === 'new' ? blankCanvasRatio(resumed.context.doc) : null,
+ // The blank canvas a reloaded generation was started on, to be set again by the editor.
+ resumedCanvas: resumed?.context?.mode === 'new'
+ ? {width: resumed.context.doc.width, height: resumed.context.doc.height} : null,
dispose() { clearAttention(); return session.dispose(); }, state: session.state};
}