TryOn is a Chrome Extension and backend service that allows users to upload a person image once and try different clothes virtually by uploading garment images. The system uses gemini-2.5-flash-image-preview A.K.A Nano banana model to generate try-on previews.
- Upload person image once and store it locally.
- Upload different cloth images for try-on.
- AI model generates a preview of how the clothes look on the person.
- Works as a Chrome Extension with a simple UI.
- Backend server for handling image processing.
├── tryon/
│ ├── index.js # Express.js backend
│ ├── package.json # Node dependencies
│ └── ... # Other server files
| tryon-chrome-extension/
│ ├── popup.html # Chrome Extension UI
│ ├── style.css # Styling for popup
│ ├── popup.js # Frontend logic
│ └── manifest.json # Chrome Extension config
└── README.md
- Node.js (v18 or above)
- npm
- Google Chrome (for extension usage)
- Postman (optional, for API testing)
-
Clone this repository:
git clone https://github.com/tryon.git cd tryon -
Install dependencies:
npm install
-
Create an
.envfile in the server folder and add or directly add it inindex.jsfile :GEMINI_API_KEY=your_api_key_here -
Run the server:
node index.js
The backend will start at
http://localhost:5000.
- Go to
chrome://extensions/in Chrome. - Enable Developer Mode (top-right).
- Click Load unpacked and select the
tryon-chrome-extensionfolder. - The extension will appear in the toolbar. Pin it for easy access.
- Open the TryOn extension popup.
- Upload your person image once (it will be saved in local storage).
- Upload different cloth images to generate try-on results.
- The result will be displayed inside the extension popup.
- Person image is stored in browser localStorage for convenience.
- Generated results are fetched from the backend.
- Make sure your backend server is running before using the extension.