Run this model with HF Jobs

Run ByteDance/Hyper-SD on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/ByteDance/Hyper-SD. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/ByteDance/Hyper-SD on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Why we have to fuse the LoRA, can we just load lora weights ?

#69
by Adenialzz - opened

Why we have to fuse the LoRA, can we just load lora weights ? I tried but find that it dose not work only loading weights.


pipe.unload_lora_weights()
pipe.load_lora_weights(ckpt_path, cross_attention_kwargs={"scale": 0.125})
# pipe.load_lora_weights(ckpt_path)
seed = 1
image1 = pipe(
    prompt="a photo of a cat",
    num_inference_steps=20,
    guidance_scale=3.5,
    generator=torch.Generator(device='cpu').manual_seed(seed)
).images[0]

pipe.fuse_lora(lora_scale=0.125)
image2 = pipe(
    prompt="a photo of a cat",
    num_inference_steps=20,
    guidance_scale=3.5,
    generator=torch.Generator(device='cpu').manual_seed(seed)
).images[0]

plot_multi_images([image1, image2], ['before fuse', 'after fuse'])

image.png

Sign up or log in to comment