Now you can load the lora fine-tuning weights for trial. For example, the awesome Hyper-SD from ByteDance can generate an image on a laptop CPU in 1 minute! Paste the following code in your python console to generate a cute cat.
from mindone.diffusers import DiffusionPipeline, DDIMScheduler
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
pipe.load_lora_weights("ByteDance/Hyper-SD", weight_name="Hyper-SD15-2steps-lora.safetensors")
pipe.scheduler = DDIMScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing")
prompt = "a photo of a cat"
image = pipe(prompt=prompt, num_inference_steps=2, guidance_scale=0)[0][0]
image.save("cat.jpg")
Try it out!
Fixes # (issue)
Adds # (feature)
Before submitting
[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes? E.g. record bug fixes or new features in What's New. Here are the
documentation guidelines
[ ] Did you build and run the code without any errors?
[ ] Did you report the running environment (NPU type/MS version) and performance in the doc? (better record it for data loading, model inference, or training tasks)
[ ] Did you write any new necessary tests?
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
What does this PR do?
We support LoRA!
Now you can load the lora fine-tuning weights for trial. For example, the awesome Hyper-SD from ByteDance can generate an image on a laptop CPU in 1 minute! Paste the following code in your python console to generate a cute cat.
Try it out!
Fixes # (issue)
Adds # (feature)
Before submitting
What's New
. Here are the documentation guidelinesWho can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag members/contributors who may be interested in your PR.
@xxx