An AI-powered virtual try-on application that allows users to visualize how clothing items would look on their photos. Built with Next.js and integrated with the OOTDiffusion model.
- Virtual try-on functionality for clothing items
- Support for different clothing categories
- Customizable generation parameters
- Real-time image processing
- Error handling and retry mechanisms
- Frontend: Next.js, React
- Backend: Next.js API Routes
- AI Model: OOTDiffusion via Gradio Client
- Deployment: Vercel
Before you begin, ensure you have installed:
- Node.js (version 16 or higher)
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/yourusername/virtual-cloth-try-on-ai.git
cd virtual-cloth-try-on-ai
- Install dependencies:
npm install
# or
yarn install
- Create a
.env.local
file in the root directory and add your Hugging Face token:
HUGGING_FACE_TOKEN=your_token_here
Start the development server:
npm run dev
# or
yarn dev
Open http://localhost:3000 with your browser to see the application.
The application is configured for deployment on Vercel. Important notes:
- The serverless function timeout is set to 60 seconds (Vercel hobby plan limitation)
- Ensure all environment variables are properly set in your Vercel project settings
To deploy:
vercel --prod
- Maximum processing time: 60 seconds per request
- Image size and format requirements: [Add specific requirements]
- API rate limits: [Add rate limit details]
Contributions are welcome! Please feel free to submit a Pull Request.
- Ali Hamza Kamboh (@ahkamboh)
MIT License
-
OOTDiffusion model by ahkamboh
-
Next.js framework by Vercel