Downloads · 30 days
0
rajkr/sdxl-pokemon-lora
sdxl-pokemon-lora is a text-to-image model from rajkr. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as openrail++.
Generate stunning images from text prompts — works everywhere: local, Colab, Kaggle.
Downloads · 30 days
0
Access
Public
Updated Apr 27, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py22.9 KB · 60%
From the Hugging Face model README
Generate stunning images from text prompts — works everywhere: local, Colab, Kaggle.
git clone https://huggingface.co/rajkr/sdxl-pokemon-lora
cd sdxl-pokemon-lora
pip install -r clients/requirements.txt
# Download once (~7GB), generate forever — auto-cached to ~/.cache/huggingface
python clients/generate.py "a majestic dragon flying over a crystal lake"
python clients/generate.py "an astronaut riding a horse on Mars" --steps 50 --guidance 8.0 --seed 42
python clients/generate.py --list-models
| GPU | Speed | Notes |
|---|---|---|
| RTX 4090 (24GB) | ~20s/image | Best |
| RTX 3090 (24GB) | ~25s/image | Great |
| Colab T4 (16GB) | ~60s/image | Free |
| Apple M-series | ~5min/image | Slow but works |
| CPU only | ~10min/image | Very slow |
Download and open this notebook in Colab, then set GPU Runtime:
Steps:
Steps:
from diffusers import AutoPipelineForText2Image
import torch
# Downloads once (~7GB), then runs locally
pipe = AutoPipelineForText2Image.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
torch_dtype=torch.float16,
variant="fp16",
).to("cuda")
# Generate
image = pipe(
"a cute fire pokemon with blue flames, anime style",
num_inference_steps=30,
guidance_scale=7.5,
).images[0]
image.save("pokemon.png")
| File | Description |
|---|---|
train_sdxl_lora.py | Full training script — fine-tune SDXL with LoRA on any image+caption dataset |
clients/generate.py | CLI tool — python generate.py "prompt" — works like Ollama |
clients/requirements.txt | pip install -r this for local setup |
clients/colab_notebook.ipynb | Google Colab notebook (free T4 GPU) |
clients/kaggle_notebook.ipynb | Kaggle notebook (free T4 GPU) |
Fine-tune SDXL with LoRA on your own dataset:
pip install torch torchvision diffusers transformers accelerate peft datasets xformers
git clone https://huggingface.co/rajkr/sdxl-pokemon-lora
cd sdxl-pokemon-lora
accelerate launch train_sdxl_lora.py
The LoRA weights will be pushed to: rajkr/sdxl-pokemon-lora
| Parameter | Value |
|---|---|
| Base Model | stabilityai/stable-diffusion-xl-base-1.0 |
| VAE | madebyollin/sdxl-vae-fp16-fix |
| Dataset | reach-vb/pokemon-blip-captions |
| Method | LoRA (rank=16) |
| Trainable Params | ~4.7M (vs. ~2.6B full UNet) |
| Batch Size | 2 × 4 (gradient accumulation) |
| Resolution | 1024×1024 |
| Epochs | 3 |
| LR | 1e-4 (AdamW, cosine) |
| Mixed Precision | fp16 |
| VRAM | ~20-24GB |
| Hardware | A100, A10G, RTX 4090 |
python clients/generate.py "a majestic dragon flying over a crystal lake at sunset, epic fantasy art"
python clients/generate.py "an astronaut riding a horse on Mars, cinematic shot" --steps 50
python clients/generate.py "a cozy coffee shop interior with rain outside" --model stabilityai/stable-diffusion-2-1
python clients/generate.py "a futuristic city skyline at night with neon lights" --guidance 10
train_sdxl_lora.py