jonknownothing
commited on
Commit
•
d955249
1
Parent(s):
f9eb089
End of training
Browse files- .gitattributes +2 -0
- README.md +96 -0
- image_0.png +0 -0
- image_1.png +3 -0
- image_2.png +3 -0
- image_3.png +0 -0
- logs/dreambooth-lora-sd-xl/1712917674.7482882/events.out.tfevents.1712917674.2bc29049008e.3171.1 +3 -0
- logs/dreambooth-lora-sd-xl/1712917674.7503743/hparams.yml +76 -0
- logs/dreambooth-lora-sd-xl/events.out.tfevents.1712917674.2bc29049008e.3171.0 +3 -0
- pytorch_lora_weights.safetensors +3 -0
- sdxl-lora-advanced.safetensors +3 -0
- sdxl-lora-advanced_emb.safetensors +3 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
image_1.png filter=lfs diff=lfs merge=lfs -text
|
37 |
+
image_2.png filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,96 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- stable-diffusion-xl
|
4 |
+
- stable-diffusion-xl-diffusers
|
5 |
+
- diffusers-training
|
6 |
+
- text-to-image
|
7 |
+
- diffusers
|
8 |
+
- lora
|
9 |
+
- template:sd-lora
|
10 |
+
widget:
|
11 |
+
|
12 |
+
- text: 'Photo of a <s0><s1> person,riding a horse'
|
13 |
+
output:
|
14 |
+
url:
|
15 |
+
"image_0.png"
|
16 |
+
|
17 |
+
- text: 'Photo of a <s0><s1> person,riding a horse'
|
18 |
+
output:
|
19 |
+
url:
|
20 |
+
"image_1.png"
|
21 |
+
|
22 |
+
- text: 'Photo of a <s0><s1> person,riding a horse'
|
23 |
+
output:
|
24 |
+
url:
|
25 |
+
"image_2.png"
|
26 |
+
|
27 |
+
- text: 'Photo of a <s0><s1> person,riding a horse'
|
28 |
+
output:
|
29 |
+
url:
|
30 |
+
"image_3.png"
|
31 |
+
|
32 |
+
base_model: stabilityai/stable-diffusion-xl-base-1.0
|
33 |
+
instance_prompt: Photo of a <s0><s1> person,
|
34 |
+
license: openrail++
|
35 |
+
---
|
36 |
+
|
37 |
+
# SDXL LoRA DreamBooth - jonknownothing/sdxl-lora-advanced
|
38 |
+
|
39 |
+
<Gallery />
|
40 |
+
|
41 |
+
## Model description
|
42 |
+
|
43 |
+
### These are jonknownothing/sdxl-lora-advanced LoRA adaption weights for stabilityai/stable-diffusion-xl-base-1.0.
|
44 |
+
|
45 |
+
## Download model
|
46 |
+
|
47 |
+
### Use it with UIs such as AUTOMATIC1111, Comfy UI, SD.Next, Invoke
|
48 |
+
|
49 |
+
- **LoRA**: download **[`sdxl-lora-advanced.safetensors` here 💾](/jonknownothing/sdxl-lora-advanced/blob/main/sdxl-lora-advanced.safetensors)**.
|
50 |
+
- Place it on your `models/Lora` folder.
|
51 |
+
- On AUTOMATIC1111, load the LoRA by adding `<lora:sdxl-lora-advanced:1>` to your prompt. On ComfyUI just [load it as a regular LoRA](https://comfyanonymous.github.io/ComfyUI_examples/lora/).
|
52 |
+
- *Embeddings*: download **[`sdxl-lora-advanced_emb.safetensors` here 💾](/jonknownothing/sdxl-lora-advanced/blob/main/sdxl-lora-advanced_emb.safetensors)**.
|
53 |
+
- Place it on it on your `embeddings` folder
|
54 |
+
- Use it by adding `sdxl-lora-advanced_emb` to your prompt. For example, `Photo of a sdxl-lora-advanced_emb person,`
|
55 |
+
(you need both the LoRA and the embeddings as they were trained together for this LoRA)
|
56 |
+
|
57 |
+
|
58 |
+
## Use it with the [🧨 diffusers library](https://github.com/huggingface/diffusers)
|
59 |
+
|
60 |
+
```py
|
61 |
+
from diffusers import AutoPipelineForText2Image
|
62 |
+
import torch
|
63 |
+
from huggingface_hub import hf_hub_download
|
64 |
+
from safetensors.torch import load_file
|
65 |
+
|
66 |
+
pipeline = AutoPipelineForText2Image.from_pretrained('stabilityai/stable-diffusion-xl-base-1.0', torch_dtype=torch.float16).to('cuda')
|
67 |
+
pipeline.load_lora_weights('jonknownothing/sdxl-lora-advanced', weight_name='pytorch_lora_weights.safetensors')
|
68 |
+
embedding_path = hf_hub_download(repo_id='jonknownothing/sdxl-lora-advanced', filename='sdxl-lora-advanced_emb.safetensors', repo_type="model")
|
69 |
+
state_dict = load_file(embedding_path)
|
70 |
+
pipeline.load_textual_inversion(state_dict["clip_l"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder, tokenizer=pipeline.tokenizer)
|
71 |
+
pipeline.load_textual_inversion(state_dict["clip_g"], token=["<s0>", "<s1>"], text_encoder=pipeline.text_encoder_2, tokenizer=pipeline.tokenizer_2)
|
72 |
+
|
73 |
+
image = pipeline('Photo of a <s0><s1> person,riding a horse').images[0]
|
74 |
+
```
|
75 |
+
|
76 |
+
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)
|
77 |
+
|
78 |
+
## Trigger words
|
79 |
+
|
80 |
+
To trigger image generation of trained concept(or concepts) replace each concept identifier in you prompt with the new inserted tokens:
|
81 |
+
|
82 |
+
to trigger concept `TOK` → use `<s0><s1>` in your prompt
|
83 |
+
|
84 |
+
|
85 |
+
|
86 |
+
## Details
|
87 |
+
All [Files & versions](/jonknownothing/sdxl-lora-advanced/tree/main).
|
88 |
+
|
89 |
+
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).
|
90 |
+
|
91 |
+
LoRA for the text encoder was enabled. False.
|
92 |
+
|
93 |
+
Pivotal tuning was enabled: True.
|
94 |
+
|
95 |
+
Special VAE used for training: madebyollin/sdxl-vae-fp16-fix.
|
96 |
+
|
image_0.png
ADDED
image_1.png
ADDED
Git LFS Details
|
image_2.png
ADDED
Git LFS Details
|
image_3.png
ADDED
logs/dreambooth-lora-sd-xl/1712917674.7482882/events.out.tfevents.1712917674.2bc29049008e.3171.1
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6d127084520006d94f7357c9123867996b46897cef46181cbb5f93d551ca8127
|
3 |
+
size 3692
|
logs/dreambooth-lora-sd-xl/1712917674.7503743/hparams.yml
ADDED
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
adam_beta1: 0.9
|
2 |
+
adam_beta2: 0.99
|
3 |
+
adam_epsilon: 1.0e-08
|
4 |
+
adam_weight_decay: 0.0001
|
5 |
+
adam_weight_decay_text_encoder: null
|
6 |
+
allow_tf32: false
|
7 |
+
cache_dir: null
|
8 |
+
cache_latents: false
|
9 |
+
caption_column: prompt
|
10 |
+
center_crop: false
|
11 |
+
checkpointing_steps: 2000
|
12 |
+
checkpoints_total_limit: null
|
13 |
+
class_data_dir: null
|
14 |
+
class_prompt: null
|
15 |
+
dataloader_num_workers: 0
|
16 |
+
dataset_config_name: null
|
17 |
+
dataset_name: ./3d_icon
|
18 |
+
do_edm_style_training: false
|
19 |
+
enable_xformers_memory_efficient_attention: false
|
20 |
+
gradient_accumulation_steps: 1
|
21 |
+
gradient_checkpointing: false
|
22 |
+
hub_model_id: null
|
23 |
+
hub_token: null
|
24 |
+
image_column: image
|
25 |
+
instance_data_dir: null
|
26 |
+
instance_prompt: Photo of a <s0><s1> person,
|
27 |
+
learning_rate: 1.0
|
28 |
+
local_rank: -1
|
29 |
+
logging_dir: logs
|
30 |
+
lr_num_cycles: 1
|
31 |
+
lr_power: 1.0
|
32 |
+
lr_scheduler: constant
|
33 |
+
lr_warmup_steps: 0
|
34 |
+
max_grad_norm: 1.0
|
35 |
+
max_train_steps: 1000
|
36 |
+
mixed_precision: bf16
|
37 |
+
noise_offset: 0
|
38 |
+
num_class_images: 100
|
39 |
+
num_new_tokens_per_abstraction: 2
|
40 |
+
num_train_epochs: 36
|
41 |
+
num_validation_images: 4
|
42 |
+
optimizer: prodigy
|
43 |
+
output_dir: sdxl-lora-advanced
|
44 |
+
pretrained_model_name_or_path: stabilityai/stable-diffusion-xl-base-1.0
|
45 |
+
pretrained_vae_model_name_or_path: madebyollin/sdxl-vae-fp16-fix
|
46 |
+
prior_generation_precision: null
|
47 |
+
prior_loss_weight: 1.0
|
48 |
+
prodigy_beta3: null
|
49 |
+
prodigy_decouple: true
|
50 |
+
prodigy_safeguard_warmup: true
|
51 |
+
prodigy_use_bias_correction: true
|
52 |
+
push_to_hub: true
|
53 |
+
random_flip: false
|
54 |
+
rank: 4
|
55 |
+
repeats: 1
|
56 |
+
report_to: tensorboard
|
57 |
+
resolution: 1024
|
58 |
+
resume_from_checkpoint: null
|
59 |
+
revision: null
|
60 |
+
sample_batch_size: 4
|
61 |
+
scale_lr: false
|
62 |
+
seed: 0
|
63 |
+
snr_gamma: 5.0
|
64 |
+
text_encoder_lr: 1.0
|
65 |
+
token_abstraction: TOK
|
66 |
+
train_batch_size: 1
|
67 |
+
train_text_encoder: false
|
68 |
+
train_text_encoder_frac: 1.0
|
69 |
+
train_text_encoder_ti: true
|
70 |
+
train_text_encoder_ti_frac: 0.5
|
71 |
+
use_8bit_adam: false
|
72 |
+
use_dora: false
|
73 |
+
validation_epochs: 50
|
74 |
+
validation_prompt: Photo of a <s0><s1> person,riding a horse
|
75 |
+
variant: null
|
76 |
+
with_prior_preservation: false
|
logs/dreambooth-lora-sd-xl/events.out.tfevents.1712917674.2bc29049008e.3171.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3722b3bd8e8ea673d264c94fd066352cd8a77779a2580de913ccfdeae157ea39
|
3 |
+
size 9721421
|
pytorch_lora_weights.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b842ab185fb7126786c1f43f3669ef23cd6e9324cca88dc029a10a8dbf3cbb9e
|
3 |
+
size 23390424
|
sdxl-lora-advanced.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ba669dc86cf4f22a8ffdd1fceee3b5243e86bbff4b260d0dc60d20fb8881d26e
|
3 |
+
size 23473224
|
sdxl-lora-advanced_emb.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b3a57e321f11c1d3379cc63e863a915b777b6e988d4e617ac72d11aaf5073690
|
3 |
+
size 16536
|