Restructure SAM rough mask workflow for sidebar preview

- Add roughMaskThumbnailScale state with $watch to sync with main scale slider
- Update sidebar thumbnail to use transform:scale() for consistent zoom between views
- Modify openRoughMaskInNewWindow() to create HTML page with matching scale
- Add denoise strength slider (10-100%) visible only when rough mask exists
- Backend already supports denoise_strength parameter in prepare_mask_workflow_with_start()
- Rough mask auto-clears after successful extraction
- Add Playwright tests for UI changes and API parameter acceptance
This commit is contained in:
2026-03-28 10:42:27 -07:00
parent c94988561c
commit 7c9a25dd91
6 changed files with 240 additions and 72 deletions

View File

@@ -116,6 +116,7 @@ def api_mask_extract():
comfy_url = data.get('comfy_url', COMFYUI_BASE_URL)
count = min(max(data.get('count', 1), 1), 10)
start_mask_path = data.get('start_mask_path', None)
denoise_strength = data.get('denoise_strength', 0.8)
logger.info(f"[MASK EXTRACT] Subject: {subject}")
logger.info(f"[MASK EXTRACT] Use polygon: {use_polygon}")
@@ -195,6 +196,7 @@ def api_mask_extract():
polygon_points=polygon_points,
polygon_color=polygon_color,
polygon_width=polygon_width,
denoise_strength=denoise_strength,
workflow_template=workflow_template
)
else: