Downloads · 30 days
2.5K
7% of all-time downloads
h1t/TCD-SD15-LoRA
TCD-SD15-LoRA is a text-to-image model from h1t. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as mit.
Official TCD LoRA for Stable Diffusion v1.5 of the paper Trajectory Consistency Distillation.
Downloads · 30 days
2.5K
7% of all-time downloads
All-time downloads
33.7K
Public
Repo size
135 MB
Likes
30
Public
Click a slice to open those files.
.safetensors135 MB · 100%
From the Hugging Face model README
Official TCD LoRA for Stable Diffusion v1.5 of the paper Trajectory Consistency Distillation.
For more usage please found at Project Page
Here is a simple example: `
import torch
from diffusers import StableDiffusionPipeline, TCDScheduler
device = "cuda"
base_model_id = "runwayml/stable-diffusion-v1-5"
tcd_lora_id = "h1t/TCD-SD15-LoRA"
pipe = StableDiffusionPipeline.from_pretrained(base_model_id, torch_dtype=torch.float16, variant="fp16").to(device)
pipe.scheduler = TCDScheduler.from_config(pipe.scheduler.config)
pipe.load_lora_weights(tcd_lora_id)
pipe.fuse_lora()
prompt = "Beautiful woman, bubblegum pink, lemon yellow, minty blue, futuristic, high-detail, epic composition, watercolor."
image = pipe(
prompt=prompt,
num_inference_steps=4,
guidance_scale=0,
# Eta (referred to as `gamma` in the paper) is used to control the stochasticity in every step.
# A value of 0.3 often yields good results.
# We recommend using a higher eta when increasing the number of inference steps.
eta=0.3,
generator=torch.Generator(device=device).manual_seed(42),
).images[0]
