End of training
Browse files- README.md +77 -0
- SDXL_LoRA_macbook2.safetensors +3 -0
- SDXL_LoRA_macbook2_emb.safetensors +3 -0
- pytorch_lora_weights.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- stable-diffusion-xl
|
| 4 |
+
- stable-diffusion-xl-diffusers
|
| 5 |
+
- text-to-image
|
| 6 |
+
- diffusers
|
| 7 |
+
- lora
|
| 8 |
+
- template:sd-lora
|
| 9 |
+
widget:
|
| 10 |
+
|
| 11 |
+
- text: 'photo of a <s0><s1> laptop'
|
| 12 |
+
|
| 13 |
+
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
| 14 |
+
instance_prompt: photo of a <s0><s1> laptop
|
| 15 |
+
license: openrail++
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# SDXL LoRA DreamBooth - DavideTHU/SDXL_LoRA_macbook2
|
| 19 |
+
|
| 20 |
+
<Gallery />
|
| 21 |
+
|
| 22 |
+
## Model description
|
| 23 |
+
|
| 24 |
+
### These are DavideTHU/SDXL_LoRA_macbook2 LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.
|
| 25 |
+
|
| 26 |
+
## Download model
|
| 27 |
+
|
| 28 |
+
### Use it with UIs such as AUTOMATIC1111, Comfy UI, SD.Next, Invoke
|
| 29 |
+
|
| 30 |
+
- **LoRA**: download **[`SDXL_LoRA_macbook2.safetensors` here 💾](/DavideTHU/SDXL_LoRA_macbook2/blob/main/SDXL_LoRA_macbook2.safetensors)**.
|
| 31 |
+
- Place it on your `models/Lora` folder.
|
| 32 |
+
- On AUTOMATIC1111, load the LoRA by adding `<lora:SDXL_LoRA_macbook2:1>` to your prompt. On ComfyUI just [load it as a regular LoRA](https://comfyanonymous.github.io/ComfyUI_examples/lora/).
|
| 33 |
+
- *Embeddings*: download **[`SDXL_LoRA_macbook2_emb.safetensors` here 💾](/DavideTHU/SDXL_LoRA_macbook2/blob/main/SDXL_LoRA_macbook2_emb.safetensors)**.
|
| 34 |
+
- Place it on it on your `embeddings` folder
|
| 35 |
+
- Use it by adding `SDXL_LoRA_macbook2_emb` to your prompt. For example, `photo of a SDXL_LoRA_macbook2_emb laptop`
|
| 36 |
+
(you need both the LoRA and the embeddings as they were trained together for this LoRA)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
|
| 40 |
+
|
| 41 |
+
```py
|
| 42 |
+
from diffusers import AutoPipelineForText2Image
|
| 43 |
+
import torch
|
| 44 |
+
from huggingface_hub import hf_hub_download
|
| 45 |
+
from safetensors.torch import load_file
|
| 46 |
+
|
| 47 |
+
pipeline = AutoPipelineForText2Image.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=torch.float16).to('cuda')
|
| 48 |
+
pipeline.load_lora_weights('DavideTHU/SDXL_LoRA_macbook2', weight_name='pytorch_lora_weights.safetensors')
|
| 49 |
+
embedding_path = hf_hub_download(repo_id='DavideTHU/SDXL_LoRA_macbook2', filename='SDXL_LoRA_macbook2_emb.safetensors' repo_type="model")
|
| 50 |
+
state_dict = load_file(embedding_path)
|
| 51 |
+
pipeline.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer)
|
| 52 |
+
pipeline.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder_2, tokenizer=pipeline.tokenizer_2)
|
| 53 |
+
|
| 54 |
+
image = pipeline('photo of a <s0><s1> laptop').images[0]
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
For more details, including weighting, merging and fusing LoRAs, check the [documentation on loading LoRAs in diffusers](https://huggingface.co/docs/diffusers/main/en/using-diffusers/loading_adapters)
|
| 58 |
+
|
| 59 |
+
## Trigger words
|
| 60 |
+
|
| 61 |
+
To trigger image generation of trained concept(or concepts) replace each concept identifier in you prompt with the new inserted tokens:
|
| 62 |
+
|
| 63 |
+
to trigger concept `TOK` → use `<s0><s1>` in your prompt
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
## Details
|
| 68 |
+
All [Files & versions](/DavideTHU/SDXL_LoRA_macbook2/tree/main).
|
| 69 |
+
|
| 70 |
+
The weights were trained using [🧨 diffusers Advanced Dreambooth Training Script](https://github.com/huggingface/diffusers/blob/main/examples/advanced_diffusion_training/train_dreambooth_lora_sdxl_advanced.py).
|
| 71 |
+
|
| 72 |
+
LoRA for the text encoder was enabled. False.
|
| 73 |
+
|
| 74 |
+
Pivotal tuning was enabled: True.
|
| 75 |
+
|
| 76 |
+
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
|
| 77 |
+
|
SDXL_LoRA_macbook2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a1c5d2a7f2cf0f1bba28d9104f56f3cdce88d519e2655a0582f1cc6c99647fec
|
| 3 |
+
size 46698072
|
SDXL_LoRA_macbook2_emb.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cacafa17051c386b2e79bf1521140c18ed122913bc314096ac9ab60c99f28498
|
| 3 |
+
size 8344
|
pytorch_lora_weights.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:df2ef2d14f74837145ff1285cb80cfc294377f275b0ef39eef996cd78ee18101
|
| 3 |
+
size 46615272
|