Text-to-Image
Diffusers
TensorBoard
English
art
code
stable-diffusion-xl
stable-diffusion-xl-diffusers
lora
template:sd-lora
Instructions to use ritwikraha/khabib_sketch_LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ritwikraha/khabib_sketch_LoRA with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("fill-in-base-model", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("ritwikraha/khabib_sketch_LoRA") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Khabib Sketch SDXL LoRA
A LoRA adaptation of SDXL to produce sketches of the MMA fighter and G.O.A.T Khabib.
These are LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.
The weights were trained on sketches of Khabib by ritwikraha using DreamBooth.
You can find some example images in the following.
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
DataSet: custom hand-drawn sketches by ritwikraha
Usage
!pip install diffusers accelerate -q
import torch
from PIL import Image
from diffusers import DiffusionPipeline, AutoencoderKL
vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
pipe = DiffusionPipeline.from_pretrained(
"stabilityai/stable-diffusion-xl-base-1.0",
vae=vae,
torch_dtype=torch.float16,
variant="fp16",
use_safetensors=True
)
pipe.load_lora_weights('ritwikraha/khabib_sketch_LoRA')
_ = pipe.to("cuda")
prompt = "a sketch of TOK khabib pointing at another khabib like the spiderman meme, monchrome, pen sketch"
negative_prompt ="ugly face, multiple bodies, bad anatomy, disfigured, extra fingers"
image = pipe(prompt=prompt,
negative_prompt=negative_prompt,
guidance_scale=3,
num_inference_steps=50).images[0]
image
Examples
Tips
- The examples are all sketches created in Procreate so prompts with words like sketch, and monochrome work best
- Use a negative prompt and guidance scale for the model
- Images at 1024X1024 will be better than other dimensions
- Downloads last month
- 14



