vton-backend / README.md
StableVITON Deployer
Trigger clean deployment v1.0.1
40b16c9
|
Raw
History Blame Contribute Delete
1.22 kB
---
title: StableVITON Virtual Try-On
emoji: 👕
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
app_port: 7860
version: 1.0.1
---
# StableVITON Virtual Try-On Backend
AI-powered virtual try-on service using StableVITON and FastAPI.
## Features
- Virtual try-on inference via REST API
- Support for JPEG/PNG images
- Automatic image preprocessing and validation
- GPU-optimized inference (CUDA support)
- Single-request processing to prevent OOM
- Comprehensive error handling
## API Documentation
### POST /tryon
Perform virtual try-on inference.
**Request:**
- `person_image`: Full-body photo (multipart/form-data)
- `garment_image`: Garment image (multipart/form-data)
**Response:**
```json
{
"success": true,
"result_image": "data:image/png;base64,...",
"processing_time": 23.4,
"model_version": "stablevton-v1"
}
```
### GET /health
Health check endpoint.
## Local Development
```bash
# Install dependencies
pip install -r requirements.txt
# Run server
python main.py
```
## Deployment
This project is designed to run on Hugging Face Spaces with Docker SDK.
1. Create a Space with Docker SDK
2. Select GPU hardware (T4 small is sufficient)
3. Push the code to the Space