Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Enforce unfeathered full-image edits

Bittia3b0e3231d47
diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md
index 1d9846a..091607d 100644
--- a/RELEASE_NOTES.md
+++ b/RELEASE_NOTES.md
@@ -13,7 +13,7 @@ This alpha update adds Prompt video scenes, agent image drafts, Sol attention an
## Fixes and improvements
- Image edits keep the original as the parent with its saved prompt and settings. Child results open as normal images ready for further edits; selecting images does not create editing copies.
-- Whole-image edits now reach every edge without feathering.
+- Whole-image edits disable feathering at the native generation boundary, including requests with missing or previously saved feather settings.
- Imported still images now have steps, seed and resolution controls. Resolution defaults to the source dimensions rounded down to multiples of 32, with additional sizes matching the source aspect ratio.
- Fixed CUDA transformer-loading memory failures with bounded upload buffers, more accurate memory budgeting and automatic retries with more CPU offloading, while preserving precision and output settings.
- Agent chat retains earlier replies, corrections and errors throughout the conversation. Raw JSON and command payloads stay hidden; readable replies and summaries are shown.
diff --git a/src-tauri/core/src/slopfab/h3.rs b/src-tauri/core/src/slopfab/h3.rs
index 79dc22f..f02bb2e 100644
--- a/src-tauri/core/src/slopfab/h3.rs
+++ b/src-tauri/core/src/slopfab/h3.rs
@@ -72,9 +72,11 @@ pub(super) fn configure_request(
let step = edit.edits.first().ok_or("Add an image edit before generating.")?;
api.set_prompt(handle, &step.prompt)?;
let bounds = [step.x, step.y, step.width, step.height];
- // Ordinary edits blend inward. Outpainting preserves this box and
- // generates its entire surround with shared context in one pass.
- let feather = step.feather.unwrap_or(16);
+ // Full-image edits have no surrounding pixels to blend into. Enforce
+ // this here too, including older requests and sequential RGB edits.
+ let whole_image = !step.invert_mask && step.x == 0 && step.y == 0
+ && step.width == request.canvas_width && step.height == request.canvas_height;
+ let feather = if whole_image { 0 } else { step.feather.unwrap_or(16) };
let strength = step.strength.unwrap_or(1.0);
if !strength.is_finite() || strength <= 0.0 || strength > 1.0 {
return Err("Image edit strength must be greater than zero and at most one.".into());
diff --git a/src-tauri/core/src/slopfab/tests.rs b/src-tauri/core/src/slopfab/tests.rs
index 81c4cf2..2f904a8 100644
--- a/src-tauri/core/src/slopfab/tests.rs
+++ b/src-tauri/core/src/slopfab/tests.rs
@@ -90,6 +90,8 @@ fn image_edit_recipe_disables_motion_cache_and_keeps_source_geometry() {
// Resolving fails if MotionCache is still enabled for inpainting.
let plan = api.resolve(&handle).unwrap();
assert_eq!((plan.canvas_width, plan.canvas_height, plan.aligned_frames), (96, 64, 1));
+ let description = api.describe(&handle).unwrap();
+ assert!(description.contains("feather 16\n"), "{description}");
}
}
let mut invalid = request;
@@ -110,6 +112,43 @@ fn image_edit_recipe_disables_motion_cache_and_keeps_source_geometry() {
assert!(validate_generation_controls(&invalid).is_err());
}
+#[test]
+fn whole_image_edits_never_feather_at_the_native_boundary() {
+ let configuration = Configuration::from_settings(&BTreeMap::new());
+ let api = ffi::Api::load(&configuration.dll_path).unwrap();
+ let folder = tempfile::tempdir().unwrap();
+ for (width, height) in [(96, 64), (65, 41)] {
+ let source = folder.path().join("source.png");
+ image::RgbImage::from_pixel(width as u32, height as u32, image::Rgb([100, 120, 140]))
+ .save(&source).unwrap();
+ for feather in [None, Some(0), Some(1), Some(16)] {
+ let request: GenerationRequest = serde_json::from_value(serde_json::json!({
+ "jobId":"whole-image", "prompt":"Change the entire image", "stillImage":true, "frames":1,
+ "steps":4, "seed":1, "canvasWidth":width, "canvasHeight":height,
+ "imageEdit":{"sourceRelativePath":"source.png", "edits":[{
+ "prompt":"Change the entire image", "x":0, "y":0,
+ "width":width, "height":height, "feather":feather
+ }]}
+ })).unwrap();
+ // Exercise the serialized request used by LAN workers as well.
+ let mut request: GenerationRequest = serde_json::from_value(serde_json::to_value(request).unwrap()).unwrap();
+ request.image_edit_path = Some(source.clone());
+ for from_pixels in [false, true] {
+ request.image_edit_pixels = from_pixels.then(|| std::sync::Arc::new(vec![100; (width * height * 3) as usize]));
+ for platform in [ComputePlatform::Cuda13, ComputePlatform::Vulkan] {
+ for purpose in [RequestPurpose::Plan, RequestPurpose::Generate] {
+ let handle = RequestHandle::new(&api).unwrap();
+ configure_request(&api, &handle, &request, &configuration, platform, purpose, &ReferenceVideos::default()).unwrap();
+ api.resolve(&handle).unwrap();
+ let description = api.describe(&handle).unwrap();
+ assert!(description.contains("feather 0\n"), "{description}");
+ }
+ }
+ }
+ }
+ }
+}
+
#[test]
fn crop_regeneration_strength_survives_worker_transfer_and_reaches_native_sampling() {
let configuration = Configuration::from_settings(&BTreeMap::new());