Edit model card
Configuration Parsing Warning: In adapter_config.json: "peft.base_model_name_or_path" must be a string
Configuration Parsing Warning: In adapter_config.json: "peft.task_type" must be a string

Usage

from peft import PeftModel
from diffusers import LCMScheduler, AutoPipelineForText2Image

model_id = "segmind/tiny-sd"
adapter_id = "akameswa/lcm-lora-tiny-sd"

pipe = AutoPipelineForText2Image.from_pretrained(model_id)
pipe.scheduler = LCMScheduler.from_config(pipe.scheduler.config)
pipe.to("cuda")

PeftModel.from_pretrained(pipe.unet, adapter_id)

prompt = "a dog wearing a knitted hat on the floor"
image = pipe(prompt=prompt, num_inference_steps=4, guidance_scale=1.0).images[0]
display(image)

Saving complete model

pipe.fuse_lora(lora_scale=1.0)
pipe.unload_lora_weights()

for param in pipe.unet.parameters():
    param.data = param.data.contiguous()

pipe.save_pretrained("./lcm-tiny-sd")
Downloads last month
8
Inference Examples
Inference API (serverless) does not yet support peft models for this pipeline type.

Model tree for akameswa/lcm-lora-tiny-sd

Finetuned
segmind/tiny-sd
Adapter
(1)
this model

Collection including akameswa/lcm-lora-tiny-sd