Spaces:
Running
A newer version of the Gradio SDK is available: 6.24.0
title: ChitraTech Virtual Try-On
emoji: 👕
colorFrom: pink
colorTo: indigo
sdk: gradio
sdk_version: 6.5.1
app_file: app.py
pinned: false
license: mit
ChitraTech Virtual Try-On
This repository is a Hugging Face Space for an on-demand virtual try-on experience powered by CatVTON.
Planned flow
- A shopper clicks Try On on your ecommerce product page.
- Your frontend sends the shopper photo and the selected clothing image to this Hugging Face Space.
- The Space runs CatVTON inference only for that request.
- The generated try-on image is returned to the frontend for preview.
Current status
The current Space now includes:
- a Gradio interface for person and garment uploads,
- lazy pipeline initialization for on-demand inference,
- automatic detection of CatVTON code under
CatVTON/, - automatic detection of model weights under
checkpoints/CatVTON/, - a safe demo fallback when CatVTON is not fully installed yet.
Repository structure
Recommended layout:
app.pyrequirements.txtCatVTON/for the cloned CatVTON repositorycheckpoints/CatVTON/for model weights- optional
examples/for demo assets
Setup steps
1. Add CatVTON source code
Clone or copy your CatVTON implementation into:
CatVTON/
If your fork uses a different folder, set:
CATVTON_REPO_DIR
2. Add model weights
Place CatVTON checkpoints in:
checkpoints/CatVTON/
Or set:
CATVTON_MODEL_DIR
3. Confirm the inference entrypoint
The current app tries common Python and script entrypoints automatically. If your CatVTON fork uses different class names, function names, or CLI arguments, update the loading logic in app.py.
4. Push to Hugging Face Spaces
After adding the CatVTON repo and weights references, push the repository. Hugging Face will rebuild the Space automatically.
Frontend integration
Your ecommerce frontend can call the Hugging Face Space directly when needed, making this a free, on-demand approach without keeping a GPU server running continuously.
Important note
This app is now deployment-ready as a shell, but real try-on output depends on your exact CatVTON fork and checkpoint format. If the repository layout differs, app.py may need a small adapter for the correct import path or inference call.