Spaces:
Sleeping
Sleeping
metadata
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:
{
"success": true,
"result_image": "data:image/png;base64,...",
"processing_time": 23.4,
"model_version": "stablevton-v1"
}
GET /health
Health check endpoint.
Local Development
# 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.
- Create a Space with Docker SDK
- Select GPU hardware (T4 small is sufficient)
- Push the code to the Space