No description
  • Python 94%
  • Shell 6%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-13 00:22:31 +05:30
test_images Add virtual try-on sample inputs and results 2026-09-13 00:22:31 +05:30
tests Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
.gitignore Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
.python-version Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
app.py Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
HANDOFF.md Document project setup and development handoff 2026-09-12 23:48:50 +05:30
images.py Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
README.md Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
requirements-ai.txt Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
requirements.txt Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
run.sh Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
setup.sh Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30
worker.py Initial commit: local virtual wear desktop app 2026-09-12 19:40:23 +05:30

Virtual Wear

A Linux desktop app for realistic AI clothing try-on from two uploaded photos. Uses a native PySide6 window and FASHN VTON 1.5 running on your CPU.

Current status

The desktop interface, model setup, CPU inference integration, cancellation, photo preparation and PNG export are implemented. Dependencies and models were not installed in the development session because download permission was declined. The desktop window and real AI generation therefore remain unverified. Image processing and offline configuration have automated tests.

Install and launch

You need Linux, Python 3.10 or newer with venv and pip, Git, and a graphical desktop session. On Ubuntu/Debian, missing system dependencies can be installed with:

sudo apt install python3-venv python3-pip git libgl1 libegl1 libxcb-cursor0 libxkbcommon-x11-0

Open a terminal in this folder and run:

This project selects the system Python through pyenv's .python-version because the installed pyenv Python 3.12.10 build lacks _ctypes, required by PyTorch. Its local virtual environment is .venv/. Setup reuses that environment if it already exists. To activate it manually, run source .venv/bin/activate.

./setup.sh
./run.sh

Setup needs internet. It creates .venv/ here, installs CPU-only PyTorch and ONNX Runtime, and downloads the try-on, pose and human-parser models into models/. The try-on/pose weights are roughly 2 GB; parser weights and Python dependencies require additional space. Allow several GB of free disk space. Setup downloads the current upstream FASHN code and records resolved packages in models/installed-versions.txt; dependency versions are not fully locked.

If setup is interrupted, run it again. Completed Hugging Face downloads are reused. The desktop app also has a Download / repair models button after the AI dependencies have been installed.

Try on clothing

  1. Choose a clear photo of one person. Show the part of the body receiving clothing.
  2. Choose a photo of a single garment, preferably against a plain background.
  3. Select Tops, Bottoms or One-piece, and whether the clothing photo shows a garment alone or a person wearing it.
  4. Start with Quick quality, then click Generate try-on.
  5. Review the preview and click Save PNG. Change the variation seed for another result.

Generation runs in a separate process so the window remains responsive. Cancel stops that process and releases its memory. Closing the app also stops active processing. Results are temporary until exported; export a result before starting the next generation or closing the window.

CPU performance

No NVIDIA GPU is required by this configuration. CPU inference uses float32; it can take several minutes or substantially longer depending on hardware. There is no measured speed or RAM guarantee for this app yet. A low-memory computer may be unable to finish; close other heavy applications if necessary. The progress indicator shows activity and elapsed time, not an estimated percentage. The model loads afresh for each generation to release RAM when the job ends.

Local processing

The app has no upload service, API key, account or web server. Downloading models requires internet during setup. Generation enables Hugging Face and Transformers offline modes before importing the AI libraries, and disables their telemetry. This is application configuration, not an operating-system network sandbox.

Selected images are normalized into temporary copies. Original files are not edited. Copies and unexported results are removed on normal exit; an OS crash or forced termination can leave temporary files in the system temp directory. Exported PNG files stay where you choose to save them.

Troubleshooting

  • Setup needed: finish ./setup.sh. All three primary weight files and the parser cache must be available. If files were deleted, use model repair.
  • Qt platform plugin error: install the Linux libraries listed above; launch from a graphical session. For Wayland issues, try QT_QPA_PLATFORM=xcb ./run.sh.
  • Processing fails: inspect the details at the bottom of the window. Missing caches require model repair; an abruptly killed process may mean insufficient RAM.
  • Unexpected appearance: try a front-facing, unobstructed person and a clear garment image with the correct category and photo type. Results are generated visualizations; they do not measure physical fit or guarantee exact garment details.

Developer checks

python3 -m unittest discover -s tests -v
python3 -m py_compile app.py worker.py images.py
bash -n setup.sh run.sh

These checks do not exercise Qt or real inference. To validate the full app after installation, launch it, select two photos, generate a result, save it, then run a second job and cancel it. Disconnect the network and repeat generation to confirm that all models were cached by setup.

Model sources

FASHN VTON is Apache-2.0 licensed. Its dependencies and model components have their own licenses; see their repositories for applicable terms.