File size: 1,304 Bytes
ca04e63
 
 
 
 
 
a5aee95
 
ca04e63
 
 
04240bb
ca04e63
04240bb
ca04e63
04240bb
 
 
 
 
 
 
 
 
 
 
 
 
 
ca04e63
04240bb
 
 
 
 
 
ca04e63
 
04240bb
 
 
 
 
ca04e63
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
title: Swapperface
emoji: 🎭
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 6.21.0
python_version: '3.10'
app_file: app.py
pinned: false
---

# 🎭 Swapperface

Face Swapper powered by [InsightFace](https://github.com/deepinsight/insightface) corriendo en **Hugging Face ZeroGPU**.

## ⚡ ZeroGPU

Este Space usa **ZeroGPU**, la infraestructura de GPU dinámica de Hugging Face:
- GPU se asigna **solo durante la inferencia** y se libera al terminar
- Decorador `@spaces.GPU(duration=90)` en las funciones de inferencia

## Características

- 🔄 **Face Swap** con `inswapper_128.onnx`
- 🧠 **Detección facial** en CPU (estable en ZeroGPU)
- 🚀 **Swap en GPU** vía ONNX Runtime CUDA
- 🖥️ **Interfaz web** con Gradio

## Estructura

| Archivo | Descripción |
|---------|-------------|
| `app.py` | App principal con `@spaces.GPU` |
| `requirements.txt` | Dependencias incluyendo `spaces` |
| `inswapper_128.onnx` | Modelo face swap (554 MB) |
| `codeformer.pth` | Modelo restauración (377 MB) |
| `RealESRGAN_x4plus.pth` | Modelo upscaling (67 MB) |
| `basicsr/` | Módulo BasicSR |
| `facelib/` | Utilidades faciales |

## Créditos

- [InsightFace](https://github.com/deepinsight/insightface)
- [inswapper](https://github.com/haofanwang/inswapper)
- Hugging Face ZeroGPU