Downloads · 30 days
0
saba-0908/railway-lora-sdxl
railway-lora-sdxl is a machine learning model from saba-0908. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a Low-Rank Adaptation (LoRA) fine-tuned SDXL model specialized in generating high-quality, realistic images of Indian Railways — including locomotives, passenger coaches, and railway-related scenes.
Downloads · 30 days
0
Access
Public
Updated May 28, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.toml2.5 KB · 41%
From the Hugging Face model README
This is a Low-Rank Adaptation (LoRA) fine-tuned SDXL model specialized in generating high-quality, realistic images of Indian Railways — including locomotives, passenger coaches, and railway-related scenes.
Indian Railways WAP-7 locomotive hauling LHB coaches on a broad gauge track, realistic lighting, cinematic composition, 4k quality
from diffusers import StableDiffusionXLPipeline
from peft import PeftModel
import torch
# Load SDXL base
pipe = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16).to("cuda")
# Load LoRA weights
pipe.unet.load_attn_procs("YOUR_USERNAME/YOUR_MODEL_NAME")
# Generate
prompt = "Indian Railways SE1 coach interior, ultra detailed, cinematic light"
image = pipe(prompt, num_inference_steps=28, guidance_scale=7).images[0]
image.save("output.png")
This model is released under the CreativeML Open RAIL-M license. Use responsibly and credit the author when applicable.