metadata
title: Stable Diffusion Using Text Inversion
emoji: π
colorFrom: gray
colorTo: purple
sdk: gradio
sdk_version: 5.22.0
app_file: app.py
pinned: false
short_description: Stable Diffusion using Text Inversion
Stable Diffusion using Text Inversion
A Gradio web application that generates images using Stable Diffusion with various text inversion concepts and loss functions.
Features
- Generate images using Stable Diffusion v1.4
- Apply different artistic styles using text inversion concepts:
- Dreams
- Midjourney Style
- Moebius
- Marc Allante
- WLOP
- Automatic application of multiple loss functions:
- No Loss (Base generation)
- Blue Channel Loss
- Elastic Transformation Loss
- Symmetry Loss
- Saturation Loss
- User-friendly interface with preset prompts and custom prompt input
- Side-by-side comparison of different loss function effects
Usage
- Select a preset prompt or enter your own custom prompt
- Choose a style concept from the dropdown menu
- Click "Submit" to generate images
- View the results showing different loss function effects side by side
Installation
- Clone this repository
- Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
Requirements
- Python 3.7+
- PyTorch
- Diffusers
- Transformers
- Gradio
- Torchvision
- PIL
Model Details
The application uses the CompVis/stable-diffusion-v1-4 model with text inversion concepts from the Hugging Face SD concepts library. The model runs with float16 precision and supports CUDA, MPS, and CPU devices.
License
This project uses the CompVis/stable-diffusion-v1-4 model which is subject to the CreativeML Open RAIL-M license.