AI media harness for planning, generating, and editing locally
TypeScript
Bundle positioned outpaint conditioning
Bitti4c777e6b60ed
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.mdindex 20230e8..6f8372e 100644--- a/RELEASE_NOTES.md+++ b/RELEASE_NOTES.md@@ -4,7 +4,7 @@ This alpha update adds SeedVR2 and Real-ESRGAN export upscaling, Long Shot and B## What's new-- **Extend image template restored.** Draw or resize the output box, choose a generation resolution, and optionally describe the new surroundings. Output follows the box's aspect ratio and selected pixel budget, resizing the source to fit. Source interiors stay intact while generated edges blend into the original with seam tone matching.+- **Extend image template restored.** Draw or resize the output box, choose a generation resolution, and optionally describe the new surroundings. Output follows the box's aspect ratio and selected pixel budget, resizing the source to fit. Positioned source conditioning keeps the scene anchored, while generated edges blend into the original with seam tone matching.- **SeedVR2 upscaling for images and videos.** Restore exports at the selected output size using SeedVR2 3B FP16 and its VAE. Run on the local NVIDIA CUDA GPU or a selected CUDA LAN worker. Workers download missing standard weights or receive your selected local weight files.- **Real-ESRGAN upscaling for images and videos.** Use RealESRGAN x4plus during export, with the result resized to your chosen output dimensions. CUDA and Vulkan are supported. Choose None to export without an upscaler.- **Other weights settings.** Settings → Generator now includes downloads and optional local file paths for Real-ESRGAN, SeedVR2 and the MiniMax H3 latent upscaler. Upscaler downloads share the generator and LoRA download queue, with progress and cancellation in Work Queue.diff --git a/docs/slopfab-compatibility.md b/docs/slopfab-compatibility.mdindex 54587b0..d6d2e1d 100644--- a/docs/slopfab-compatibility.md+++ b/docs/slopfab-compatibility.md@@ -130,15 +130,19 @@ the interior and original alpha remain exact. The prompt is optional and usesthe runtime's `Source scene` context without zoom-out instructions or duplicatereference pictures. This adapts the edge handling in[ComfyUI-H3VideoOutpaint](https://github.com/TwoAbove/ComfyUI-H3VideoOutpaint)-to single-image generation; it does not add video windows or positioned FL2VA-keyframe rows to the runtime.+to single-image generation, including a positioned keyframe of the pinned+source patches. SlopFab 1.27.1 reuses the source VAE rows at their target spatial+coordinates and time on CUDA and Vulkan. This gives the denoiser a spatial+anchor as well as source latent locking and Qwen visual context, without+resizing a second copy of the scene. Video windowing is not needed for stills.The drawn box sets the aspect ratio. The selected image resolution and aspectpreset set the pixel budget, rounded down to the 32-pixel grid and bounded bythe maximum generation dimensions. The source scales into that output, so alarger selection reduces its footprint unless the resolution also increases.Preparation, preview, generation and final PNG use the same mapped geometry.-No runtime or worker protocol change is required.+The Windows and Linux bundles include SlopFab commit `e3ab3be` (1.27.1) with FFmpeg disabled; update LAN+workers alongside the app. The request format and worker protocol are unchanged.The bundled Windows and Linux runtimes come from SlopFab commit `b7486be`,built with `SLOPFAB_WITH_FFMPEG=OFF`. The additivediff --git a/lib/slopfab/libslopfab.so b/lib/slopfab/libslopfab.soindex 219b0d3..f2fb992 100644--- a/lib/slopfab/libslopfab.so+++ b/lib/slopfab/libslopfab.so@@ -1,3 +1,3 @@version https://git-lfs.github.com/spec/v1-oid sha256:5743ac829bf88917d84a1610f92bec856eb3d34987c1e4beb43c389e9a1a2e19-size 20346328+oid sha256:fe80666cf80ee1a2521dabc23ac0597eaf3a8022897e4feac921bbc88e465bf1+size 20350888diff --git a/lib/slopfab/slopfab.dll b/lib/slopfab/slopfab.dllindex d1267fb..86b0a4b 100644--- a/lib/slopfab/slopfab.dll+++ b/lib/slopfab/slopfab.dll@@ -1,3 +1,3 @@version https://git-lfs.github.com/spec/v1-oid sha256:85d069dfa6f3676b99111b17c1ae0aa51f66f0247f53fbda2f2aebecb0023222-size 17640960+oid sha256:24f36bf4191b2bc91ce95a13ecfa8d688840aa743cc340ba2bf839ea85e5883c+size 17643520diff --git a/src-tauri/core/src/slopfab/tests.rs b/src-tauri/core/src/slopfab/tests.rsindex b8de9af..879853d 100644--- a/src-tauri/core/src/slopfab/tests.rs+++ b/src-tauri/core/src/slopfab/tests.rs@@ -147,6 +147,20 @@ fn outpainting_preserves_one_box_in_preview_execution_and_worker_requests() {value["imageEdit"]["edits"][0].as_object_mut().unwrap().extend(change.as_object().unwrap().clone());assert!(validate_generation_controls(&serde_json::from_value(value).unwrap()).is_err());}+ // The restored template supplies a source interior with complete 32px+ // patches. Both backend plans must include its positioned keyframe rows.+ let mut positioned = roundtrip.clone();+ positioned.canvas_width = 416;+ positioned.canvas_height = 416;+ positioned.image_edit_pixels = Some(std::sync::Arc::new(vec![127; 416 * 416 * 3]));+ let step = &mut positioned.image_edit.as_mut().unwrap().edits[0];+ step.x = 85; step.y = 85; step.width = 245; step.height = 245;+ for platform in [ComputePlatform::Cuda13, ComputePlatform::Vulkan] {+ let handle = RequestHandle::new(&api).unwrap();+ configure_request(&api, &handle, &positioned, &configuration, platform, RequestPurpose::Plan, &ReferenceVideos::default()).unwrap();+ let plan = api.resolve(&handle).unwrap();+ assert_eq!(plan.sequence_rows_without_text, 13 * 13 + 7 * 7);+ }let mut invalid = request.clone();let edits = &mut invalid.image_edit.as_mut().unwrap().edits;edits.push(edits[0].clone());diff --git a/src-tauri/src/commands/extend_image.rs b/src-tauri/src/commands/extend_image.rsindex d3d1a55..4f4bc0c 100644--- a/src-tauri/src/commands/extend_image.rs+++ b/src-tauri/src/commands/extend_image.rs@@ -391,7 +391,11 @@ mod tests {"dllPath".into(),ProviderOption::String(std::path::Path::new(env!("CARGO_MANIFEST_DIR"))- .join("../lib/slopfab/slopfab.dll")+ .join(if cfg!(windows) {+ "../lib/slopfab/slopfab.dll"+ } else {+ "../lib/slopfab/libslopfab.so"+ }).to_string_lossy().into_owned(),),diff --git a/src/components/workspace/ImageEditor.tsx b/src/components/workspace/ImageEditor.tsxindex 3eff9eb..e277a5b 100644--- a/src/components/workspace/ImageEditor.tsx+++ b/src/components/workspace/ImageEditor.tsx@@ -160,7 +160,7 @@ export function ImageEditor({ config, folderPath, onChange: changeConfig, onGeneconst templateSource = runningTemplate && config.assets.find((asset) => asset.id === runningTemplate.sourceId);let extendSize: { width: number; height: number } | null = null;if (extendMode && extendOptions && output?.width && output.height) {- try { extendSize = extendOutputDimensions(config, { width: output.width, height: output.height }, extendOptions.bounds); }+ try { extendSize = extendOutputDimensions(config, extendOptions.bounds); }catch { /* Invalid bounds are explained in Extend settings. */ }}const images = config.assets.filter((asset) => asset.kind === "image");diff --git a/src/lib/extendImage.ts b/src/lib/extendImage.tsindex e27e390..df3c4a8 100644--- a/src/lib/extendImage.ts+++ b/src/lib/extendImage.ts@@ -39,7 +39,7 @@ export function initialExtendBounds(width: number, height: number): ExtendBoundsreturn { ...box, x: Math.round((source.width - box.width) / 2), y: Math.round((source.height - box.height) / 2) };}-export function extendOutputDimensions(config: ProjectConfig, _source: { width: number; height: number }, bounds: ExtendBounds) {+export function extendOutputDimensions(config: ProjectConfig, bounds: ExtendBounds) {const selected = outputDimensions(imageSettings(config).resolution, imageSettings(config).aspectRatio);const pixelBudget = Math.min(selected.width * selected.height, EXTEND_MAX_PIXELS);const scale = Math.min(Math.sqrt(pixelBudget / (bounds.width * bounds.height)), EXTEND_MAX_EDGE / bounds.width, EXTEND_MAX_EDGE / bounds.height);@@ -54,7 +54,7 @@ export function extendLayout(config: ProjectConfig, source: { width: number; heiextendRegions(workspace, bounds);if (bounds.width % EXTEND_GRID || bounds.height % EXTEND_GRID || bounds.width > EXTEND_MAX_EDGE || bounds.height > EXTEND_MAX_EDGE|| bounds.width * bounds.height > EXTEND_MAX_PIXELS) throw new Error("Use box dimensions in multiples of 32 within the maximum generation resolution.");- const output = extendOutputDimensions(config, source, bounds);+ const output = extendOutputDimensions(config, bounds);const scale = Math.min(output.width / bounds.width, output.height / bounds.height);// A uniform scale preserves the source aspect ratio. Grid rounding adds a// little generated space instead of stretching the original to fit.@@ -93,8 +93,8 @@ export function extendContext(preserved: ExtendBounds, output: { width: number;const bottom = preserved.y + preserved.height < output.height ? EXTEND_SEAM : 0;const context = { x: preserved.x + left, y: preserved.y + top,width: preserved.width - left - right, height: preserved.height - top - bottom };- if (Math.ceil(context.x / 16) >= Math.floor((context.x + context.width) / 16)- || Math.ceil(context.y / 16) >= Math.floor((context.y + context.height) / 16)) {+ if (Math.ceil(context.x / EXTEND_GRID) >= Math.floor((context.x + context.width) / EXTEND_GRID)+ || Math.ceil(context.y / EXTEND_GRID) >= Math.floor((context.y + context.height) / EXTEND_GRID)) {throw new Error("Keep a larger area of the original image inside the Extend box, or increase the generation resolution.");}return context;