Skip to main content

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:

  1. CLI β€” opentryon <service> --model <model> …
  2. MCP server β€” tools for Cursor, Claude, and tryon-studio
  3. Python APIs β€” tryon.api adapters + 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:

πŸŽ“ 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!

πŸ“„ 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?​


Ready to get started? Head over to the Installation Guide!