|
|
--- |
|
|
tags: |
|
|
- autotrain |
|
|
- stable-diffusion |
|
|
- stable-diffusion-diffusers |
|
|
- text-to-image |
|
|
- diffusers |
|
|
- lora |
|
|
- template:sd-lora |
|
|
|
|
|
base_model: stablediffusionapi/dreamshaperv8 |
|
|
instance_prompt: photo of sruthi |
|
|
license: openrail++ |
|
|
--- |
|
|
# ModelsLab LoRA DreamBooth Training - stablediffusionapi/my-stablediffusion-lora-4303 |
|
|
These are LoRA adaption weights for stablediffusionapi/dreamshaperv8. The weights were trained on photo of sruthi using [ModelsLab](https://modelslab.com). |
|
|
LoRA for the text encoder was enabled: False. |
|
|
|
|
|
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers) |
|
|
```py |
|
|
!pip install -q transformers accelerate peft diffusers |
|
|
from diffusers import DiffusionPipeline |
|
|
import torch |
|
|
|
|
|
pipe_id = "Lykon/DreamShaper" |
|
|
pipe = DiffusionPipeline.from_pretrained(pipe_id, torch_dtype=torch.float16).to("cuda") |
|
|
pipe.load_lora_weights("stablediffusionapi/my-stablediffusion-lora-4303", weight_name="pytorch_lora_weights.safetensors", adapter_name="abc") |
|
|
prompt = "abc of a hacker with a hoodie" |
|
|
lora_scale = 0.9 |
|
|
image = pipe( |
|
|
prompt, |
|
|
num_inference_steps=30, |
|
|
cross_attention_kwargs={"scale": 0.9}, |
|
|
generator=torch.manual_seed(0) |
|
|
).images[0] |
|
|
image |
|
|
``` |