shivank-pixis commited on
Commit
69168d3
1 Parent(s): 3fdc687

End of training

Browse files
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: 'in the style of <s0><s1>'
12
+
13
+ base_model: stabilityai/stable-diffusion-xl-base-1.0
14
+ instance_prompt: in the style of <s0><s1>
15
+ license: openrail++
16
+ ---
17
+
18
+ # SDXL LoRA DreamBooth - shivank-pixis/testy-lora
19
+
20
+ <Gallery />
21
+
22
+ ## Model description
23
+
24
+ ### These are shivank-pixis/testy-lora 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 **[`testy-lora.safetensors` here 💾](/shivank-pixis/testy-lora/blob/main/testy-lora.safetensors)**.
31
+ - Place it on your `models/Lora` folder.
32
+ - On AUTOMATIC1111, load the LoRA by adding `<lora:testy-lora:1>` to your prompt. On ComfyUI just [load it as a regular LoRA](https://comfyanonymous.github.io/ComfyUI_examples/lora/).
33
+ - *Embeddings*: download **[`testy-lora_emb.safetensors` here 💾](/shivank-pixis/testy-lora/blob/main/testy-lora_emb.safetensors)**.
34
+ - Place it on it on your `embeddings` folder
35
+ - Use it by adding `testy-lora_emb` to your prompt. For example, `in the style of testy-lora_emb`
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('shivank-pixis/testy-lora', weight_name='pytorch_lora_weights.safetensors')
49
+ embedding_path = hf_hub_download(repo_id='shivank-pixis/testy-lora', filename='testy-lora_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('in the style of <s0><s1>').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](/shivank-pixis/testy-lora/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
+
pytorch_lora_weights.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:88b3442a06c1e112d974d812bc76d532ae75b6afab8244aaa38999c955acdc02
3
+ size 46615272
testy-lora.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:983901b83db6f91f6499c640997f2774cb1de5971ede9bcec34b9e6269ad5583
3
+ size 46698072
testy-lora_emb.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cacafa17051c386b2e79bf1521140c18ed122913bc314096ac9ab60c99f28498
3
+ size 8344