| | --- |
| | license: openrail++ |
| | base_model: runwayml/stable-diffusion-v1-5 |
| | tags: |
| | - stable-diffusion |
| | - stable-diffusion-diffusers |
| | - text-to-image |
| | - diffusers |
| | - lora |
| | - cartoon |
| | - illustration |
| | datasets: |
| | - juliaturc/captioned-cartoons |
| | --- |
| | |
| | # cartoon-lora-aggressive-medium |
| |
|
| | Fine-tuned LoRA model for generating colorful cartoon-style illustrations. |
| |
|
| | ## Model Details |
| |
|
| | - **Base Model:** runwayml/stable-diffusion-v1-5 |
| | - **Dataset:** juliaturc/captioned-cartoons |
| | - **Training Framework:** Diffusers + LoRA |
| | - **Task:** Text-to-Image Generation (Cartoon Style) |
| |
|
| | ## Training Configuration |
| |
|
| | ```json |
| | { |
| | "learning_rate": 0.0001, |
| | "max_train_steps": 1500, |
| | "rank": 48, |
| | "lr_scheduler": "cosine" |
| | } |
| | ``` |
| |
|
| | ## Usage |
| |
|
| | ### Install dependencies |
| |
|
| | ```bash |
| | pip install diffusers transformers torch |
| | ``` |
| |
|
| | ### Load and generate |
| |
|
| | ```python |
| | 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-aggressive-medium") |
| | |
| | # 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") |
| | ``` |
| |
|
| | ## Example Prompts |
| |
|
| | 1. `Two people walking in a park with dogs, colorful cartoon style, woman in pink shirt, man in green vest, fall scenery` |
| | 2. `A young woman sitting on a bench reading a book in a city park, wearing a yellow sweater and jeans, autumn trees, colorful cartoon illustration` |
| | 3. `A happy family having a picnic in a meadow, parents and two children, red checkered blanket, colorful cartoon style` |
| |
|
| |
|
| | ## Training Details |
| |
|
| | This model was fine-tuned on a cartoon illustration dataset with detailed captions describing: |
| | - Characters and their appearance |
| | - Clothing and accessories |
| | - Actions and poses |
| | - Environment and scenery |
| | - Composition and style |
| |
|
| | The training used Low-Rank Adaptation (LoRA) to efficiently fine-tune Stable Diffusion while keeping the base model frozen. |
| |
|
| | ## Limitations |
| |
|
| | - Works best with detailed, descriptive prompts |
| | - Optimized for cartoon/illustration style |
| | - May not perform well on photorealistic requests |
| | - Based on Stable Diffusion 1.5 architecture |
| |
|
| | ## Citation |
| |
|
| | ```bibtex |
| | @misc{cartoon-lora-ai54, |
| | author = {AI54 Course}, |
| | title = {Cartoon LoRA for Stable Diffusion}, |
| | year = {2026}, |
| | publisher = {HuggingFace}, |
| | url = {https://huggingface.co/yzhdvbQ/cartoon-lora-aggressive-medium} |
| | } |
| | ``` |
| |
|
| | ## License |
| |
|
| | This model inherits the license from Stable Diffusion (OpenRAIL++) |
| |
|