feat: media expansion surfaces — edit mask, upscale, background removal, interpolation, diarization, meshgen (ADR-0020)
- imagegen.EditRequest.Mask -> sd-server img2img inpainting (white=repaint) - imagegen.Upscaler + BackgroundRemover, videogen.Interpolator, audio.DiarizationModel: new optional provider-minted surfaces - NEW meshgen leaf package (image->3D, glb/stl/obj) - provider/llamaswap: all five via the /upstream/<model>/<path> passthrough (upstreamPath helper, shared one-file multipart builder); binary success bodies validated (non-image, non-video, JSON-mesh rejection); diarization pins output=json (vtt/srt drop speaker labels) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,12 @@ type EditRequest struct {
|
||||
// Init is the initial image the edit starts from. Required.
|
||||
Init Image
|
||||
|
||||
// Mask restricts the edit to a region (inpainting): a single-channel or
|
||||
// RGB image the same size as Init where WHITE pixels are repainted and
|
||||
// BLACK pixels are kept. Empty = whole-image edit. Backends without mask
|
||||
// support must reject a masked request rather than silently ignoring it.
|
||||
Mask Image
|
||||
|
||||
// Strength is the denoising strength in [0,1] — how far the result may
|
||||
// depart from Init (0 = return the input, 1 = ignore it); nil = backend
|
||||
// default.
|
||||
@@ -45,6 +51,9 @@ type EditRequest struct {
|
||||
// are applied to a copy of the request, so an EditRequest value can be reused.
|
||||
type EditOption func(*EditRequest)
|
||||
|
||||
// WithEditMask restricts the edit to a region (white = repaint, black = keep).
|
||||
func WithEditMask(m Image) EditOption { return func(r *EditRequest) { r.Mask = m } }
|
||||
|
||||
// WithEditStrength sets the denoising strength in [0,1].
|
||||
func WithEditStrength(s float64) EditOption { return func(r *EditRequest) { r.Strength = &s } }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user