feat: Add inpainting (局部重绘) feature for timeline editor

- Add canvas-based mask drawing tools (brush, eraser, rect, lasso)
- Add undo/redo history support for mask editing
- Integrate inpainting UI into preview player
- Add backend API endpoint for inpainting requests
- Add MediaService.inpaint method with ComfyUI workflow support
- Add Flux inpainting workflows for selfhost and RunningHub

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
empty
2026-01-05 23:44:51 +08:00
parent 56db9bf9d2
commit 79a6c2ef3e
17 changed files with 1444 additions and 5 deletions

View File

@@ -108,3 +108,16 @@ class RegenerateAudioResponse(BaseModel):
duration: float
success: bool = True
class InpaintRequest(BaseModel):
"""Request to inpaint (局部重绘) frame image"""
mask: str = Field(..., description="Base64 encoded mask image (white=inpaint, black=keep)")
prompt: Optional[str] = Field(None, description="Optional prompt for inpainted region")
denoise_strength: float = Field(0.8, ge=0.0, le=1.0, description="Denoise strength (0.0-1.0)")
class InpaintResponse(BaseModel):
"""Response after inpainting"""
image_path: str
success: bool = True