Spaces:
Runtime error
Runtime error
Commit History
-
Show full source face in thumbnail using object-fit contain
Prevents portrait-oriented head crops from being clipped at the top/bottom. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f2ed620 -
Fix drag-and-drop disabled on no-face source slot
The no-face box was missing dragover/dragleave/drop listeners, so users could not drag a replacement image onto it. Also adds amber drag-over highlight to match the normal empty slot behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>e574102 -
Auto-detect and crop source face on upload
When a user uploads a source image, the server now runs InsightFace on it (CPU), crops to the head region via expand_bbox_for_head, and returns the cropped image. The slot shows a spinner while processing and a red warning if no face is found, keeping the swap button disabled until every source is valid. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>6c691e6
-
Fix Swap Faces and Download buttons to match dark amber theme
Browser UA stylesheet was overriding custom CSS on disabled/button elements. Added appearance:none resets and !important guards so the themed amber styles render correctly instead of browser-default gray. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4e9d506 -
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
-
Position upload text independently above SVG icon in drop zone
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>b997b37 -
Revert upload prompt position; shrink SVG icon to fit drop zone
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>de1ba41 -
Shift upload prompt slightly upward in drop zone
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>f9d13c4 -
Switch theme from purple to amber/orange palette for better visibility
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1963c43 -
Fix double bullet: suppress Gradio's prose ul list-style on notice list
Gradio's .prose ul { list-style: circle inside } was adding a circle marker alongside our ::before dot. Scoping to .app-notice and adding !important beats the Gradio rule. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1cc0618 -
Darken background layers while keeping borders and accents
Pull page bg (#1a0a38→#0d0520), app shell (#2d1060→#180840), and all content-area fills back toward darker without touching borders, text, or accent colours. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>408abe9 -
Refresh theme to medium-dark purple palette
Replace near-black backgrounds (#0d0010/#1a0024) with richer purples (#1a0a38/#2d1060), visible borders (#7c3aed), brighter accents (#c084fc/#7c3aed), and lighter text (#faf5ff/#ddd6fe/#c4b5fd). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>709360f -
Fix all text colors by overriding Gradio CSS variable at app-shell
Gradio's typography.css applies '.prose * { color: var(--body-text-color) }' to all descendants, and --body-text-color defaults to #27272a (neutral_800). Setting --body-text-color:#e4e4e7 on .app-shell overrides the variable for our entire UI without needing !important on individual elements. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3bad4da -
Move js to launch(); use !important to override Gradio text colors
In Gradio 6 the js param moved from Blocks() to launch(). Also add !important to all text colors overridden by Gradio's injected styles since the .gradio-container prefix approach had no effect. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>3dd1a64 -
Fix text colors by raising specificity with .gradio-container prefix
Gradio's own injected CSS wins over plain class selectors. Prefixing affected rules with .gradio-container beats Gradio's specificity without needing !important overrides. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>4288102 -
Force Gradio dark mode; remove workaround !important overrides
Adding 'dark' class to <html> at init makes Gradio use its own light text palette instead of #27272a, so per-element !important hacks on .hint-text, .consent-label, and strong tags are no longer needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>81a5429 -
Fix strong tag color overridden by Gradio stylesheet
Gradio applies color:#27272a to strong elements globally; reset all strong tags in the app shell to inherit, then explicitly set the notice strong color to match surrounding text. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>449d949 -
Force consent and hint text colors over Gradio overrides
Gradio injects its own color (#27272a) that was winning over our .consent-label and .hint-text rules; adding !important fixes it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>727ce14 -
Improve text readability on dark theme
Brighten secondary and placeholder text colors that were nearly invisible against the dark purple backgrounds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>9da214c -
Add consent checkbox gating the Swap Faces button
A checkbox labelled with a link to the Privacy Policy must be checked before the run button enables. The check resets on every page load (no localStorage) so consent is explicit for each session. updateRunButton() now requires consent in addition to face selection and source images being ready. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>160bddb -
Add GDPR-compliant logging disclosure and Privacy Policy
Adds a notice bullet informing users that uploaded images and results are logged to a private dataset and auto-deleted after 7 days, plus an expandable Privacy Policy covering what is collected, legal basis (GDPR Art. 6(1)(f)), storage, retention, data subject rights, and complaint routes. Pattern adapted from FireRed-Experimental-Turbo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>81b7a29
-
Remove face data notice and privacy policy from UI
No data is stored, so the logging notice and privacy policy section are no longer accurate or needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>17e45e9 -
Initial implementation of Selectable Face Swap space
- Detect up to 8 faces automatically on target image upload (CPU) - Click face thumbnails to select which faces to swap - Dynamic source image upload boxes per selected face - Face swap via InsightFace inswapper_128 + GFPGAN enhancement (ZeroGPU) - Logging to private HF dataset via logging_utils (Parquet, async) - GDPR-compliant privacy notice for biometric data Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>c84d21d