Downloads · 30 days
22
3% of all-time downloads
ritwikraha/comics_style_LoRA
comics_style_LoRA is a machine learning model from ritwikraha. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for diffusers. The card lists the license as cc-by-2.0.
Downloads · 30 days
22
3% of all-time downloads
All-time downloads
779
Public
Repo size
29.5 MB
Likes
1
Public
Click a slice to open those files.
.safetensors23.4 MB · 79%
From the Hugging Face model README
| Image 1 | Image 2 |
|---|---|
![]() | ![]() |
| Image 3 | Image 4 |
| --- | --- |
![]() | ![]() |
These are comic_style LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.
The weights were trained using DreamBooth.
LoRA for the text encoder was enabled.
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
DataSet: custom hand-drawn sketches by ritwikraha
You should use a photo in the style of TOK comics to trigger the image generation.
!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
Weights for this model are available in Safetensors format.
Download them in the Files & versions tab.