dbvb2k/artisticstyletransfer
0
Artistic Style Transfer with Stable Diffusion
This project provides a web interface for generating images using Stable Diffusion with various artistic styles and loss functions.
Features
- Multiple pre-trained artistic styles
- Various loss functions for different effects
- User-friendly web interface
- Real-time image generation
- Customizable parameters (seed, style, loss type)
Setup
- Install the required dependencies:
pip install -r requirements.txt- Make sure you have the style embeddings in the
style_embedsdirectory:
style_embeds/
├── midjourney_embeds.bin
├── rahkshi-bionicle_embeds.bin
├── black-and-white-design_embeds.bin
├── cat-toy_embeds.bin
└── madhubani-art_embeds.bin- Run the web application:
python app.pyUsage
- Open the web interface in your browser (the URL will be displayed when you run the app)
- Enter a text prompt describing the image you want to generate
- Select an artistic style from the dropdown menu
- Choose a loss function type
- (Optional) Adjust the random seed
- Click "Generate" and wait for your image
Loss Functions
- Blue: Standard blue-channel optimization
- Color: Color-aware optimization
- EPS: Epsilon prediction optimization
- TAP: Texture-aware perceptual loss
- SA: Self-attention guided loss
Artistic Styles
- Midjourney: Professional, detailed artistic style
- Black and White Design: Monochromatic artistic designs
- Cat Toy: Playful and cute style
- Madhubani Art: Traditional Indian folk art style
- Rahkshi Bionicle: Mechanical and sci-fi style
Requirements
- Python 3.8 or higher
- CUDA-capable GPU (recommended)
- 8GB+ RAM
- Internet connection for first-time model downloads
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Stable Diffusion by CompVis
- Hugging Face for model hosting
- Gradio for the web interface
