CoolFace
Apppublic

dbvb2k/artisticstyletransfer

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

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

  1. 1.Install the required dependencies:
bash
pip install -r requirements.txt
  1. 1.Make sure you have the style embeddings in the style_embeds directory:
style_embeds/
    ├── midjourney_embeds.bin
    ├── rahkshi-bionicle_embeds.bin
    ├── black-and-white-design_embeds.bin
    ├── cat-toy_embeds.bin
    └── madhubani-art_embeds.bin
  1. 1.Run the web application:
bash
python app.py

Usage

  1. 1.Open the web interface in your browser (the URL will be displayed when you run the app)
  2. 2.Enter a text prompt describing the image you want to generate
  3. 3.Select an artistic style from the dropdown menu
  4. 4.Choose a loss function type
  5. 5.(Optional) Adjust the random seed
  6. 6.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