Image Alter is a cutting-edge Gradio-based web application that empowers users to create and edit images using advanced Stable Diffusion models. Leveraging state-of-the-art AI technology, including the Flux model by Black Forest Labs and Stable Diffusion XL Refiner 1.0 by Stability AI, the app offers two primary functionalities: Text-to-Image generation and Image-to-Image transformation. With its intuitive interface, Image Alter allows users to transform text prompts into stunning visuals and enhance existing images with AI-driven alterations. Whether you're a professional designer, a digital artist, or an enthusiast exploring AI-generated imagery, Image Alter provides a powerful platform to bring your creative visions to life, pushing the boundaries of digital image manipulation.
- Create images from text prompts
- Customize generation parameters:
- Number of images (1-5)
- Number of inference steps (1-124)
- Guidance scale (0.0-10.0)
- Image height and width (256-2048 pixels)
- Seed value (0-2147483647, 0 for random seed)
- View generated images in an interactive gallery
- Accumulate generated images in an output gallery
- Example prompts provided for inspiration
- Edit existing images using text prompts
- Customize transformation parameters (similar to Text-to-Image)
- View transformed images in an interactive gallery
- Accumulate transformed images in an output gallery
- Tabbed interface for easy navigation between Text-to-Image and Image-to-Image modes
- Responsive design with radial gradient background
- Advanced settings accordion for fine-tuning generation parameters
- Responsive image galleries with download and fullscreen options
- Clone the repository:
git clone https://github.com/JakeFurtaw/ImageAlter.git
- Install the required dependencies:
pip install gradio torch diffusers transformers pillow numpy
- Run the Gradio app:
gradio imagealter.py
- The app will automatically open in your default web browser.
- Enter a text prompt in the "Image Prompt" field
- (Optional) Use one of the provided example prompts
- Adjust the generation parameters in the "Advanced Settings" accordion (optional)
- Press Enter or click Submit to generate images
- View the generated images in the output gallery and accumulated gallery
- Upload an input image to the left input section
- Enter a text prompt for editing in the "Image Prompt" field
- Adjust the transformation parameters in the "Advanced Settings" accordion (optional)
- Press Enter or click Submit to generate edited images
- View the transformed images in the output gallery and accumulated gallery
- Base Model for Text-to-Image: FluxPipeline ("black-forest-labs/FLUX.1-schnell")
- Refiner Model for Image-to-Image: DiffusionPipeline ("stabilityai/stable-diffusion-xl-refiner-1.0")
imagealter.py
: Main Gradio application fileutils.py
: Utility functions for image generation and transformation
Contributions are welcome! Please feel free to submit a Pull Request.
This project uses the FLUX.1-schnell model from Black Forest Labs and the Stable Diffusion XL Refiner model from Stability AI.