--- license: cc-by-2.0 library_name: diffusers tags: - art - code - stable-diffusion-xl - stable-diffusion-xl-diffusers --- # SDXL LoRA DreamBooth - comic_style_LoRA | Image 1 | Image 2 | |---|---| | ![example 1](./1.png) | ![example 2](./2.png) | | Image 3 | Image 4 | |---|---| | ![example 3](./3.png) | ![sample 4](./4.png) | ## Model description These are comic_style LoRA adaption weights for `stabilityai/stable-diffusion-xl-base-1.0`. The weights were trained using [DreamBooth](https://dreambooth.github.io/). LoRA for the text encoder was enabled. Special VAE used for training: `madebyollin/sdxl-vae-fp16-fix`. DataSet: custom hand-drawn sketches by [ritwikraha](https://www.ritwikraha.com/) ## Trigger words You should use a photo in the style of TOK comics to trigger the image generation. ## Usage ``` !pip install diffusers accelerate -q import torch from PIL import Image from diffusers import DiffusionPipeline, AutoencoderKL vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16) pipe = DiffusionPipeline.from_pretrained( "stabilityai/stable-diffusion-xl-base-1.0", vae=vae, torch_dtype=torch.float16, variant="fp16", use_safetensors=True ) pipe.load_lora_weights('ritwikraha/comics_style_LoRA') _ = pipe.to("cuda") prompt = "a photo of 18th century London in the style of TOK comics, 8k" negative_prompt ="ugly face, multiple bodies, bad anatomy, disfigured, extra fingers" image = pipe(prompt=prompt, negative_prompt=negative_prompt, guidance_scale=3, num_inference_steps=50).images[0] image ``` ## Download model Weights for this model are available in Safetensors format. [Download](ritwikraha/comics_style_LoRA/tree/main) them in the Files & versions tab. ---