Add Lora support to stable diffusion #483
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Example:
optimum-cli export neuron -m hf-internal-testing/tiny-stable-diffusion-torch --task stable-diffusion --batch_size 1 --height 64 --width 64 --num_images_per_prompt 4 --auto_cast matmul --lora_model_ids Jingya/tiny-stable-diffusion-lora-64 --lora_weight_names pytorch_lora_weights.safetensors --lora_adapter_names poke --lora_scales 0.9 --auto_cast_type bf16 tiny_sd_neuron_lora/
optimum-cli export neuron -m stabilityai/stable-diffusion-xl-base-1.0 --task stable-diffusion-xl --batch_size 1 --height 1024 --width 1024 --num_images_per_prompt 4 --auto_cast matmul --lora_model_ids CiroN2022/toy-face --lora_weight_names toy_face_sdxl.safetensors --lora_adapter_names toy --lora_scales 0.9 --auto_cast_type bf16 sd_neuron_lora_xl/
Next:
Add examples and doc.
Before submitting