A modern web application that generates high-quality images using Stable Diffusion XL Turbo, powered by Modal's A10G GPU infrastructure.
Youtube demo : https://youtu.be/gO-RcNphq44
- Fast Image Generation: Generate high-quality images in under 2 seconds
- Real-time Updates: Live loading states and image preview
- Efficient Storage: Automated image storage using Vercel Blob Storage
- Next.js 14 (React)
- TypeScript
- Tailwind CSS
- React Hooks
- Next.js API Routes
- Modal Cloud GPU (NVIDIA A10G)
- Stable Diffusion XL Turbo
- Vercel Blob Storage
- Clone the repository:
git clone https://github.com/yourusername/project-name.git- Install dependencies:
npm install- Set up environment variables:
Create a
.envfile in the root directory with the following variables:
PENTAGRAM_URL=your_pentagram_url
API_TOKEN_PENTAGRAM=your_api_token
BLOB_READ_WRITE_TOKEN=your_blob_token ( from vercel)- Run the development server:
npm run dev- Open the application in your browser
- Enter a description of the image you want to generate
- Click "Generate" and wait for your image
- The generated image will be displayed and automatically saved
graph LR
A[User Input] --> B[Next.js API]
B --> C[Modal A10G GPU]
C --> D[SDXL-Turbo]
D --> E[Vercel Blob Storage]
E --> F[Client Display]
PENTAGRAM_URL: URL for the image generation service (from modal)API_TOKEN_PENTAGRAM: Authentication token for the APIBLOB_READ_WRITE_TOKEN: Token for Vercel Blob Storage access
This project is optimized for deployment on Vercel:
- Push your code to GitHub
- Connect your repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy!
- Image Generation: ~2 seconds
- API Response Time: ~200ms
- Blob Storage Upload: ~500ms
- Modal for GPU infrastructure
- Stable Diffusion for the SDXL-Turbo model
- Vercel for hosting and blob storage
Made with ❤️ by Sheick
