Skip to main content

Open-source AI toolkit for fashion tech and virtual try-on

Project description

OpenTryOn

Documentation Discord License

Open-source AI toolkit for fashion technology: virtual try-on, image/video generation & editing, multimodal understanding, background removal, preprocessing, datasets, and TryOnDiffusion research code.

📚 Full documentation: https://tryonlabs.github.io/opentryon/
API tutorials, configuration, examples, and agent guides live there — not in this README.

What you get

Category Highlights
Virtual try-on FLUX VTO, Nova Canvas, Kling AI, Segmind, Pruna P-Image-Try-On, FASHN, Nano Banana 2 Lite
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; local FLUX.2-dev Turbo
Understand Kimi K2.6 / K2.7 Code / K3 (API), Kimi-VL & LLaVA-NeXT (local)
Video Veo, Sora, Luma Ray 2 + Ray 3.2, Seedance 2.5, Kling 3.0 / Omni / Turbo, Grok Imagine Video 1.5, Gemini Omni Flash, Pruna P-Video / Replace / Avatar / Animate
Other BEN2 background removal, garment/human preprocessing, fashion datasets, LangChain agents

Three ways to use it

  1. CLIopentryon <service> --model <model> [params...]
  2. MCP server — expose every registry model as tools for Claude, Cursor, or tryon-studio
  3. Pythonfrom tryon.api import ... (and tryon.cli.runner.invoke_model)

The unified Next.js + Tailwind web UI is not in this repo — it lives in tryon-studio and talks to OpenTryOn over MCP.

Install

git clone https://github.com/tryonlabs/opentryon.git
cd opentryon
conda env create -f environment.yml
conda activate opentryon
pip install -e .
# Optional local/GPU models: pip install -e ".[local]"

Or with pip: pip install -r requirements.txt && pip install -e .

cp env.template .env   # add the API keys you need

Details: Installation · Configuration

Quick start

# Dry-run (no API call) — verifies CLI + registry wiring
opentryon vton --model flux-vto \
  --person-image data/model-1.jpg --garment-image data/garment.png --dry-run

# Real call (needs BFL_API_KEY in .env)
opentryon vton --model flux-vto \
  --person-image data/model-1.jpg --garment-image data/garment.png \
  --garment-description "olive green bomber jacket"

# Multimodal understanding (needs MOONSHOT_API_KEY)
opentryon understand --model kimi-k3 --image data/model-1.jpg \
  --prompt "Describe this outfit for a product listing." --reasoning-effort high
from tryon.api import KimiUnderstandAdapter

adapter = KimiUnderstandAdapter(model="kimi-k3")
result = adapter.understand_image(
    "data/model-1.jpg",
    prompt="Describe this outfit.",
    reasoning_effort="high",
)
print(result["text"])

More examples: Quickstart · CLI · API Reference

CLI services

opentryon <service> --model <model> [params...]
opentryon understand --help                    # list models
opentryon understand --model kimi-k3 --help    # list that model's flags
Service Purpose Example models
vton Virtual try-on flux-vto, p-image-tryon, fashn-tryon-max, …
generate Text-to-image nano-banana-pro, flux2-pro, gpt-image, …
edit Image editing nano-banana-2, flux2-flex, gpt-image, …
understand Image/video understanding kimi-k2.6, kimi-k3, kimi-vl, …
video-generate Text/image-to-video veo, sora, gemini-omni, …
bg-remove Background removal ben2

Models marked local need pip install opentryon[local]. Full table and flags: Unified CLI.

MCP server

cd mcp-server
pip install -r requirements.txt
python server.py                                    # stdio (Claude Desktop / Cursor)
python server.py --transport http --host 127.0.0.1 --port 8000

Tools are generated from tryon/cli/registry.py — the same registry as the CLI. See mcp-server/README.md.

Demos & notebooks

This package ships Gradio demos and Jupyter notebooks only:

python run_demo.py --name extract_garment   # also: model_swap, outfit_generator

Notebooks: notebooks/. Web UI: tryon-studio.

Layout

opentryon/
├── tryon/           # Package: api/, cli/, models/, agents/, datasets/, preprocessing/
├── tryondiffusion/  # Research diffusion training / inference
├── mcp-server/      # FastMCP server (registry → tools)
├── demo/            # Gradio demos
├── notebooks/       # Jupyter examples
├── docs/            # Docusaurus documentation site
├── tests/           # CLI / adapter smoke checks
└── env.template     # API key template

Documentation map

Topic Where
Install & config Getting Started
CLI CLI guide
Per-provider APIs API Reference
Local / GPU models Local Models
Agents Agents
Add a new model New model checklist
TryOnDiffusion Overview · paper

When contributing docs or APIs: put long tutorials in docs/, not this README. Keep README as the project front door only.

Contributing

See CONTRIBUTING.md. Open an issue before large changes; prefer PRs that update the registry, tests, and docs together.

License

Creative Commons BY-NC 4.0. Non-commercial use with attribution to this repository; indicate any changes you make.

Star History

Star History Chart


Made with ❤️ by TryOn Labs · Discord

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentryon-0.0.3.tar.gz (201.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opentryon-0.0.3-py3-none-any.whl (254.6 kB view details)

Uploaded Python 3

File details

Details for the file opentryon-0.0.3.tar.gz.

File metadata

  • Download URL: opentryon-0.0.3.tar.gz
  • Upload date:
  • Size: 201.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for opentryon-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2c6e13a9731da2c1ac3f6637b871321435829b58bc973b70581ff40eea4f4d75
MD5 53e6a1da70ab8a602ac18a1800f41d46
BLAKE2b-256 13990778ddfe96815be75915d239361e8682e9f5ad1f6ff37840f9b4c95132f1

See more details on using hashes here.

File details

Details for the file opentryon-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: opentryon-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 254.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for opentryon-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 70e5ac5f51b25e8af9a34e6c3cbddc5f05a346d0256d21e9d243aff46b2e66c4
MD5 cec806edd4002927e5b88908b5009cf9
BLAKE2b-256 5529e447fb36a24e56aa2d5006e8eda9eb9a8c86f8222dd6622c623f7fe43e20

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page