Stable Diffusion Implementation, our method is built on Prompt-to-Prompt and Null-Text
Project Page Paper
Setup
This code was tested with Python 3.8, Pytorch 1.11 using pre-trained models through huggingface / diffusers. Specifically, we implemented our method over Latent Diffusion and Stable Diffusion. Additional required packages are listed in the requirements file. The code was tested on a RTX3090 24GB but should work on other cards with at least 23GB VRAM.
You can set up the conda environment (with python3.8+CUDA11.1) using the command below:
pip install -r requirements.txt
QuickStart
To quickly generate results with different styles and different extents, you can use the following command:
bash bash/exp_styles.sh
To quickly generate results with editable style transfer, you can use the following command:
bash bash/exp_modify.sh
Alternatively, you can use the following command to generate results with specific parameters:
python cartoon_styles.py --description "A handsome man in short hair" --path example_images/portrait5.jpg --blend man --self_ratio 0.4
The --description parameter allows you to provide a description of the image. The --path parameter allows you to specify the path of the image. The --blend parameter allows you to specify the part of the image that you want to modify. The --self_ratio parameter allows you to control the strength of the style, with a range of
