Spaces:
Running on Zero
Running on Zero
Commit History
-
Remove InsightFace swapper and GFPGAN; use Flux2 as the only swap mode
Drops inswapper_128.onnx, GFPGAN, and the fast-mode pipeline entirely. InsightFace FaceAnalysis is kept for face detection and bbox cropping. Face limit raised from 2 to 8, mode toggle removed from the UI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1311044 -
Add Flux2 Quality mode for selective face swap
Introduces FLUX.2 Klein 9B + BFS-Best-Face-Swap LoRA as an optional Quality backend alongside the existing Fast (InsightFace/inswapper) mode. For each selected face, crops the expanded head region from the target, runs the Flux2 pipeline with the source face, and composites the result back — making Flux2 multi-face-aware for the first time. - pipeline_flux.py: bbox expansion, resize-for-flux, lazy pipeline loader, and run_swap_flux (crop → Flux2 → paste per selected face) - app.py: swap_faces_quality() with @spaces.GPU(duration=300), lazy _flux_pipe global, new hidden #run-quality-btn wired to Gradio - templates/app.html: ⚡ Fast / ✨ Quality toggle in Run panel - wire_outputs.js: swapMode state, updateMode(), Quality guard (max 2 faces), clickGradioRunBtn() routes to correct hidden button - app.css: mode toggle styles, .app-badge.flux, quality-warning - requirements.txt / pyproject.toml: add diffusers (git), peft, transformers, accelerate; pin onnxruntime<1.21 for local dev C…81fb298