Generate cutting-edge images locally using state-of-the-art AI models like FLUX.1 and Stable Diffusion XL.
- 🚀 Fast Models: SDXL Turbo (ultra-fast) and Stable Diffusion XL
- 💻 Local Generation: Everything runs on your machine - no cloud dependencies
- 🎯 Text-to-Image: Generate images from text descriptions
- 🖼️ Image-to-Image: Transform existing images with text prompts
- 🌐 Web Interface: Easy-to-use Gradio web interface
- ⚡ Command Line: Direct CLI for batch processing
- 🎛️ Full Control: Adjust steps, guidance, seeds, dimensions
-
Clone and setup:
cd /Users/kylemathewson/Generation source venv/bin/activate
-
Dependencies are already installed in the virtual environment
Launch the user-friendly web interface:
source venv/bin/activate
python simple_interface.pyOr use the launcher: ./launch.sh
Then open http://localhost:7860 in your browser.
Generate images directly from the terminal:
Text-to-Image with SDXL Turbo (ultra-fast):
source venv/bin/activate
python image_generator.py -p "A majestic dragon soaring over a medieval castle at sunset" --model flux -o dragon.pngContinuous Generation with High Variability:
python image_generator.py -p "fantasy castle" --model flux --continuous --prompt-variations --temperature 1.5 --prefix castle_variationsText-to-Image with SDXL (faster):
python image_generator.py -p "A cyberpunk cityscape with neon lights" --model sdxl -s 20 -g 7.5 -o cyberpunk.pngImage-to-Image (SDXL only):
python image_generator.py -p "Transform into a watercolor painting" -i input.jpg --model sdxl --strength 0.7 -o watercolor.png--prompt, -p Text prompt (required)
--negative, -n Negative prompt (what to avoid)
--model, -m Model: 'flux' (best quality) or 'sdxl' (faster)
--width, -w Image width (default: 1024)
--height, -h Image height (default: 1024)
--steps, -s Inference steps (flux: 4, sdxl: 20)
--guidance, -g Guidance scale (flux: 0.0, sdxl: 7.5)
--seed Random seed for reproducibility
--input-image, -i Input image for img2img
--strength Transformation strength for img2img (0.0-1.0)
--output, -o Output filename
--continuous, -c Continuous generation mode (press ENTER to stop)
--base-seed Base seed for continuous mode (increments each iteration)
--prefix Filename prefix for continuous mode
--prompt-variations Add random style/mood variations to prompt
--temperature Creativity temperature (0.5-2.0, higher = more varied)
| Model | Quality | Speed | VRAM | Use Case |
|---|---|---|---|---|
| FLUX (Turbo) | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Medium | Ultra-fast, 1-step generation |
| SDXL | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | Medium | High quality, img2img support |
- FLUX (Turbo) Settings: Use 1 step, guidance=0.0 for ultra-fast results
- SDXL Settings: Use 20+ steps, guidance=7.5 for quality
- Negative Prompts: Add "blurry, low quality, distorted" to improve quality
- Seeds: Use the same seed for consistent results
- Image-to-Image: Start with strength=0.7, adjust based on desired change
- macOS: Apple Silicon (M1/M2/M3) recommended for MPS acceleration
- Memory: 8GB+ RAM, 16GB+ recommended
- Storage: 10GB+ free space for models
Model download slow? Models download automatically on first use (~6GB each).
Out of memory? Try:
- Using SDXL instead of FLUX
- Reducing image dimensions (512x512)
- Closing other applications
Poor quality? Try:
- More inference steps
- Better prompts with more detail
- Negative prompts to avoid unwanted elements
Generation/
├── venv/ # Virtual environment
├── image_generator.py # CLI interface
├── gradio_interface.py # Web interface
├── requirements.txt # Dependencies
└── README.md # This file
Photography:
- "A professional portrait of a person, natural lighting, shallow depth of field, 85mm lens"
Art Styles:
- "A landscape painting in the style of Van Gogh, swirling brushstrokes, vibrant colors"
Fantasy:
- "A magical forest with glowing mushrooms, fairy lights, ethereal atmosphere, fantasy art"
Architecture:
- "Modern glass house in the forest, minimalist design, large windows, natural lighting"
Enjoy creating amazing images locally! 🎉
