Views
No views yet
1{
2 "learning_rate": 0.0001,
3 "max_train_steps": 1000,
4 "rank": 24,
5 "lr_scheduler": "constant"
6}pip install diffusers transformers torch1import torch
2from diffusers import StableDiffusionPipeline
3
4# Load base model
5model_id = "runwayml/stable-diffusion-v1-5"
6pipe = StableDiffusionPipeline.from_pretrained(
7 model_id,
8 torch_dtype=torch.float16
9)
10pipe = pipe.to("cuda")
11
12# Load LoRA weights
13pipe.load_lora_weights("yzhdvbQ/cartoon-lora-balanced-constant")
14
15# Generate image
16prompt = "Two people walking in a park with dogs, colorful cartoon style, woman in pink shirt, man in green vest, fall scenery"
17image = pipe(prompt, num_inference_steps=30).images[0]
18image.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 style1@misc{cartoon-lora-ai54,
2 author = {AI54 Course},
3 title = {Cartoon LoRA for Stable Diffusion},
4 year = {2026},
5 publisher = {HuggingFace},
6 url = {https://huggingface.co/yzhdvbQ/cartoon-lora-balanced-constant}
7}