Welcome to OpenTryOn
OpenTryOn is an open-source AI toolkit for fashion technology and virtual try-on. Current release: v0.0.3 on PyPI.
π― What is OpenTryOn?β
OpenTryOn gives you three ways to run fashion AI models:
- CLI β
opentryon <service> --model <model> β¦ - MCP server β tools for Cursor, Claude, and tryon-studio
- Python APIs β
tryon.apiadapters +invoke_model()
Plus preprocessing, datasets, Gradio demos, and TryOnDiffusion research code.
π Key Features (v0.0.3)β
Developer surfacesβ
- Unified registry-driven CLI with
--dry-run - FastMCP server β every registry model is a tool
- OpenAPI / Swagger + Postman snapshots for upstream media APIs (guide)
Virtual try-onβ
Cloud adapters including FLUX VTO, Nova Canvas, Kling AI, Segmind, Pruna P-Image-Try-On, FASHN, and Nano Banana 2 Lite composition.
Image generate / editβ
Nano Banana family, FLUX.2, GPT Image, Luma Photon, Seedream 5.0 Pro, Ideogram 4.0, Grok Imagine Image, Pruna P-Image / Edit / Upscale, plus local FLUX.2-dev Turbo.
Videoβ
Veo, Sora, Luma Ray 2 + Ray 3.2, Seedance 2.5, Kling 3.0 / Omni / Turbo, Grok Imagine Video, Gemini Omni Flash, Pruna P-Video / Replace / Avatar / Animate.
Understanding & otherβ
Kimi K2.6 / K2.7 Code / K3 (API), Kimi-VL & LLaVA-NeXT (local), BEN2 bg-remove, fashion datasets, garment/pose preprocessing.
Interactive demosβ
Gradio apps in-repo; the Next.js playground/studio UI lives in tryon-studio and talks to OpenTryOn over MCP.
π What You'll Learnβ
In this documentation, you'll find:
- Installation Guide: Get OpenTryOn up and running (
pip install opentryon) - Quick Start: First successful runs
- Configuration: API keys and
.env - Unified CLI: Service β model β params
- MCP Server: Agent / IDE tool surface
- OpenAPI & Postman: Swagger for upstream media APIs
- Fashion ML Engineer Path: Train β eval β invoke β workflow (toward v0.1.0)
- Datasets Module: Fashion-MNIST, VITON-HD, Subjects200K
- API Reference: Adapters and provider docs
- Examples: Real-world usage examples
- Advanced Guides: Training and customization
- Roadmap: Shipped vs remaining work
π Prerequisitesβ
Before you begin, you should have:
- Python 3.10 or higher
- Basic knowledge of Python programming
- Familiarity with computer vision concepts (helpful but not required)
- CUDA-capable GPU (recommended for best performance)
π‘ Quick Examplesβ
Here are some simple examples to get you started:
Virtual Try-On with Segmindβ
from dotenv import load_dotenv
load_dotenv()
from tryon.api import SegmindVTONAdapter
# Initialize adapter
adapter = SegmindVTONAdapter()
# Generate virtual try-on
images = adapter.generate_and_decode(
model_image="person.jpg",
cloth_image="shirt.jpg",
category="Upper body"
)
# Save result
images[0].save("result.png")
Using Fashion-MNIST Datasetβ
from tryon.datasets import FashionMNIST
# Create dataset instance (downloads automatically)
dataset = FashionMNIST(download=True)
# Load the dataset
(train_images, train_labels), (test_images, test_labels) = dataset.load(
normalize=True,
flatten=False
)
print(f"Training set: {train_images.shape}") # (60000, 28, 28)
print(f"Class 0: {dataset.get_class_name(0)}") # 'T-shirt/top'
Garment Preprocessingβ
from dotenv import load_dotenv
load_dotenv()
from tryon.preprocessing import segment_garment, extract_garment
# Segment garment
segment_garment(
inputs_dir="data/original_cloth",
outputs_dir="data/garment_segmented",
cls="upper"
)
# Extract garment
extract_garment(
inputs_dir="data/original_cloth",
outputs_dir="data/cloth",
cls="upper",
resize_to_width=400
)
π€ Get Involvedβ
OpenTryOn is an open-source project, and we welcome contributions!
- GitHub: github.com/tryonlabs/opentryon
- Discord: Join our community
- Contributing: See our Contributing Guide
π Licenseβ
All material is made available under Creative Commons BY-NC 4.0. You can use the material for non-commercial purposes, as long as you give appropriate credit and indicate any changes.
πΊοΈ Roadmapβ
Check out our Roadmap to see what's coming next!
π Need Help?β
- Check our Troubleshooting Guide
- Join our Discord community
- Open an issue on GitHub
Ready to get started? Head over to the Installation Guide!