Site navigation

Generative Editing

A mask-guided, local-first workflow for reconstructing image regions or extending photographic bounds while keeping an immutable source snapshot and an editable accepted result.

Open the tool

Select exactly one image layer and open Generative Edit from the image inspector's Adjustments section, the Crop & Bounds inspector's Generative Expand action, the Layers or canvas context menu, Object → Generative Edit…, or the command palette. All entry points open the same workflow. Mixed or multi-layer selections are rejected so the mask always has one unambiguous raster source.

White means edit; black means preserve. Clear Paint resets the mask without changing the source image. Use Fit for an overview and 1:1 when checking fine edges.

Build and refine the mask

Paint directly over the source with the Brush control, or reuse an existing mask:

  • Use Pixel Selection imports the current document pixel selection.
  • Use Layer Mask imports the selected image's raster layer mask.
  • Use Image Alpha imports the source alpha channel, preserving semitransparent coverage.
  • Use Object Selection imports the confirmed candidate from the shared Object Selection tool. It remains editable here, so brush refinement does not alter the original segmentation session.
  • If there is no candidate yet and you have not painted a mask, choose Start Object Selection. Varve closes the modal, activates the canvas tool for a point or box prompt, and lets you reopen Generative Edit after confirming the candidate; the handoff stays disabled when an in-progress mask would otherwise be lost.
  • Invert swaps edit and preserve coverage. Show mask overlay lets you inspect the boundary before generating.

Choose Replace, Add, Subtract, or Intersect when combining another mask source. Expand mask grows the edit region to catch edge contamination; a negative value shrinks it. Feather softens the final composite edge. Context controls how much surrounding source imagery is supplied to the local reconstruction. These controls operate in source-image pixels and changing any of them clears the candidate, requiring a fresh preview.

Available modes

ModeMeaningAvailability
FillReconstruct painted pixels from nearby context.Local, available
Remove / Generative SubtractRebuild the background after painting an unwanted object; it does not delete the source layer or make the region transparent.Local, available
ReplaceReplace a region from a text instruction.Desktop only after a local model passes qualification
ExpandGenerate pixels beyond the current image bounds. The retained source is copied through unchanged and only the new border is synthesized.Desktop local reconstruction only within the reviewed photographic boundary; browser generation is unavailable until a qualified outpainting provider exists

Quality and providers

  • Fast / Quick Cleanup uses the offline PatchMatch heuristic in a worker when the runtime supports workers and needs no model download. It is the fallback for constrained-memory devices and simple dust, blemish, and background cleanup; cancelling it does not leave a matching job running in the editor.
  • For Fill and Remove, the editor decodes only the painted source rectangle. The working raster is aspect-preserving and capped at 1 MP on constrained devices, 4 MP on standard devices, 8 MP on high-memory devices, and 2 MP when browser memory is unknown. The editable mask is persisted at source dimensions through a row-by-row grayscale PNG encoder, while acceptance stores a bounded transparent patch above the original pixels.
  • AI uses the optional LaMa inpainting model. Download it explicitly; the model is kept in local model storage.
  • Expand takes integer margins for each side and shows the original boundary while you set them. You can also choose a target aspect ratio or output size and anchor the new frame to a side or corner; the source is placed at the requested offset without resampling. On desktop, the whole new border including corners is generated, and the retained rectangle is restored byte-for-byte after inference, so provider changes inside the original never reach the document. LaMa synthesizes the border at a bounded resolution and enlarges it to the output size, so fine detail in new areas is approximate; the review step states the effective resolution. If the device budget is too small to preserve any generated border at the working scale, Varve rejects the request with an actionable message instead of returning an unchanged frame. Browser Expand's Fast fallback stays unavailable because it produced visible edge striping on real-photo review; this is kept out of the browser capability surface. An AI-quality browser path using the same LaMa model reaches the shared reconstruction pipeline as of 2026-09-16 but has not yet had an independent real-photo browser review, so it is implemented, not yet verified. On a measured Linux x86_64 CPU, a 1024-pixel source with 120 to 160-pixel margins took about 20 seconds warm (about 60 seconds including the first cold model load).
  • LaMa is image-conditioned, not text-conditioned. Prompt-conditioned Fill, Replace, and Expand require a model-specific desktop adapter and a model that passes the validation run. The current build does not accept arbitrary model files, and the browser has no silent remote fallback.
  • Desktop model setup is deliberately two-step: download an allowlisted candidate when one is available, then choose Validate Model. A non-empty model file or a matching file extension is never treated as compatible until the production helper completes a masked test.
  • The current 1.75 GB candidate needs about 6 GB of available memory and is licensed CreativeML OpenRAIL-M. It failed Varve's 2026-09-12 real-photograph semantic/runtime qualification, so its prompt-conditioned modes remain disabled. A model checksum and reviewed result are required before any prompt mode is enabled.
  • Varve's current local model review considers FLUX.1-Fill-dev a future masked-generation candidate for a possible high-memory or hosted-provider iteration, with FIBO-Edit as a structured-edit comparison; neither is installed or advertised as available. PowerPaint v2-1 was screened and dropped: its Python/Diffusers/PyTorch runtime does not fit Varve's low-end/CPU-first target, and no available machine was found safe to even start adapter work on. FLUX.1.1 [pro] is a hosted API and is outside this local workflow. See the model review in this guide and the repository's dated research record.
  • On desktop, the native runtime measures available memory and reports the architecture/backend before loading diffusion. For native background removal it checks source dimensions before the webview allocates a full-resolution canvas, then repeats the check immediately before inference. If a native target cannot provide a trustworthy memory measurement, model-backed work stays unavailable instead of risking an unbounded allocation; the message identifies the platform/architecture and keeps Quick Cleanup available. ChromeOS browser sessions and ARM browser sessions report their best-effort platform/tier and retain the bounded local lightweight Fill/Remove paths; Object Selection and browser AI background removal account for the resident source plus temporary working buffers before allocating them, and send large requests to the brush/Fast fallback with prompts preserved. Browser Expand's Fast preview is also unavailable; its AI-quality path is implemented but pending real-photo browser verification. Prompt-conditioned generation is not advertised unless a qualified desktop provider is present. Browser memory hints are advisory, not a hardware guarantee.
  • There is no silent remote fallback. A future remote provider must state what it uploads and ask for consent immediately before transmission.

Review and accept

Use Original and Result to compare the source with the generated image. Fit, 1:1, zoom, and Center support both composition review and edge inspection. Regenerate creates new candidates and keeps a bounded session history, including the candidate that was active before regeneration; each candidate retains its own seed and provider metadata. Selecting a variation changes the candidate without writing document history, and unwanted candidates can be deleted before Apply. The final remaining candidate is protected.

Apply updates the existing image layer in one undoable transaction and preserves its id, ordering, layout, transforms, effects, and relationships. The document retains an immutable source snapshot and records the mask assets, provider/runtime, quality, seed, accepted variation, and placement/output frame. Bounded patches follow the image's crop, uniform fit, rotation, and flip placement; tiled, perspective-warped, cropped-out, and non-uniformly stretched placements are refused with an explanation instead of being applied at an incorrect location. From the Adjustments inspector, Duplicate as Layer creates a separate editable copy of the accepted result. Rendering, reopening, and exporting the accepted result do not require the model to remain installed.

Undo and redo operate on the embedded scene data and do not run inference again. Reopening the Generative Edit dialog restores the accepted recipe, mask, output frame, and retained candidates without rerunning inference. Choose Edit mask to refine the saved mask while keeping the prompt and candidates; a new generation is required before Apply can create a new edit. Save/reopen, Layers, the inspector, clipboard, and export therefore see the same accepted result.

When a result becomes stale

If the source image, placement, mask, settings, output frame, target, or document identity changes while a job is running, the result is discarded instead of being applied to the wrong pixels. Unrelated document edits do not invalidate it. Cancel also leaves the document unchanged. Generate again after making edits to the source.

What this tool does not promise

PatchMatch and LaMa can produce useful reconstructions, but they do not understand semantic instructions, guarantee repeating patterns, or solve every transparent, reflective, or highly structured image. Expansion continues what is already near the boundary; it does not invent requested objects, recover information that was never photographed, or make a sharp new subject out of a soft generated border. Text, logos, diagrams, pixel art, and screenshots are not supported expansion targets. Inspect the result at 1:1 and keep the source layer until the edit is approved.

Search Varve