A web application that generates images based on text prompts using Stability AI's SDXL model through Replicate.
- Simple and intuitive user interface
- Real-time image generation
- Powered by Stability AI's SDXL model
- Responsive design
- Python 3.7+
- Replicate API token
- Clone the repository
- Install the required dependencies:
pip install -r requirements.txt - Set up your Replicate API token in the
.envfile:You can get an API token from Replicate by creating an account.REPLICATE_API_TOKEN=your_replicate_api_token_here - Run the application:
python app.py - Open your web browser and go to
http://localhost:5000
- Enter a detailed text prompt in the text area
- Click the "Generate Image" button
- Wait for the image to be generated
- The generated image will be displayed below
- More detailed and specific prompts tend to yield better results
- Image generation may take 10-30 seconds depending on the complexity of the prompt
- The application uses Stability AI's SDXL model with a 1024x1024 resolution
- A negative prompt is automatically applied to reduce common issues like poor quality and bad anatomy
If you encounter any issues:
- Ensure your Replicate API token is valid and has sufficient credits
- Check the console for any error messages
- Make sure all dependencies are installed correctly