juliaturc/captioned-cartoons
Viewer • Updated • 100 • 38 • 4
How to use yzhdvbQ/cartoon-lora-conservative-high with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("yzhdvbQ/cartoon-lora-conservative-high")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("yzhdvbQ/cartoon-lora-conservative-high")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]Fine-tuned LoRA model for generating colorful cartoon-style illustrations.
{
"learning_rate": 5e-05,
"max_train_steps": 1500,
"rank": 32,
"lr_scheduler": "cosine"
}
pip install diffusers transformers torch
import torch
from diffusers import StableDiffusionPipeline
# Load base model
model_id = "runwayml/stable-diffusion-v1-5"
pipe = StableDiffusionPipeline.from_pretrained(
model_id,
torch_dtype=torch.float16
)
pipe = pipe.to("cuda")
# Load LoRA weights
pipe.load_lora_weights("yzhdvbQ/cartoon-lora-conservative-high")
# Generate image
prompt = "Two people walking in a park with dogs, colorful cartoon style, woman in pink shirt, man in green vest, fall scenery"
image = pipe(prompt, num_inference_steps=30).images[0]
image.save("output.png")
Two people walking in a park with dogs, colorful cartoon style, woman in pink shirt, man in green vest, fall sceneryA young woman sitting on a bench reading a book in a city park, wearing a yellow sweater and jeans, autumn trees, colorful cartoon illustrationA happy family having a picnic in a meadow, parents and two children, red checkered blanket, colorful cartoon styleThis model was fine-tuned on a cartoon illustration dataset with detailed captions describing:
The training used Low-Rank Adaptation (LoRA) to efficiently fine-tune Stable Diffusion while keeping the base model frozen.
@misc{cartoon-lora-ai54,
author = {AI54 Course},
title = {Cartoon LoRA for Stable Diffusion},
year = {2026},
publisher = {HuggingFace},
url = {https://huggingface.co/yzhdvbQ/cartoon-lora-conservative-high}
}
This model inherits the license from Stable Diffusion (OpenRAIL++)
Base model
runwayml/stable-diffusion-v1-5