aegon-h idlebg commited on
Commit
6f2f4c6
0 Parent(s):

Duplicate from FFusion/FFusionXL-BASE

Browse files

Co-authored-by: idle stoev <idlebg@users.noreply.huggingface.co>

This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. .gitattributes +37 -0
  2. FFusionXL-BASE-v1-vae.safetensors +3 -0
  3. FFusionXL-BASE-v1.safetensors +3 -0
  4. FFusionXL-LoRa-SDXL-Potion-Art-Engine.safetensors +3 -0
  5. LICENSE.md +35 -0
  6. README.md +580 -0
  7. model.safetensors +3 -0
  8. model_index.json +34 -0
  9. openvino_model_vae_decoder.fp32.bin +3 -0
  10. openvino_model_vae_decoder.fp32.xml +3 -0
  11. scheduler/scheduler_config.json +18 -0
  12. text_encoder/config.json +24 -0
  13. text_encoder/model.fp16.safetensors +3 -0
  14. text_encoder/model.onnx +3 -0
  15. text_encoder/model.safetensors +3 -0
  16. text_encoder/openvino_model.bin +3 -0
  17. text_encoder/openvino_model.xml +3 -0
  18. text_encoder_2/config.json +24 -0
  19. text_encoder_2/model.fp16.safetensors +3 -0
  20. text_encoder_2/model.onnx +3 -0
  21. text_encoder_2/model.onnx.data +3 -0
  22. text_encoder_2/model.onnx_data +3 -0
  23. text_encoder_2/model.safetensors +3 -0
  24. text_encoder_2/openvino_model.bin +3 -0
  25. text_encoder_2/openvino_model.xml +3 -0
  26. tokenizer/merges.txt +0 -0
  27. tokenizer/special_tokens_map.json +24 -0
  28. tokenizer/tokenizer_config.json +33 -0
  29. tokenizer/vocab.json +0 -0
  30. tokenizer_2/merges.txt +0 -0
  31. tokenizer_2/special_tokens_map.json +24 -0
  32. tokenizer_2/tokenizer_config.json +33 -0
  33. tokenizer_2/vocab.json +0 -0
  34. unet/config.json +69 -0
  35. unet/diffusion_pytorch_model.fp16.safetensors +3 -0
  36. unet/diffusion_pytorch_model.safetensors +3 -0
  37. unet/model.onnx +3 -0
  38. unet/model.onnx.data +3 -0
  39. unet/model.onnx_data +3 -0
  40. unet/openvino_model.bin +3 -0
  41. unet/openvino_model.xml +3 -0
  42. vae/config.json +31 -0
  43. vae/diffusion_pytorch_model.fp16.safetensors +3 -0
  44. vae/diffusion_pytorch_model.safetensors +3 -0
  45. vae_0_9/config.json +31 -0
  46. vae_0_9/diffusion_pytorch_model.fp16.safetensors +3 -0
  47. vae_0_9/diffusion_pytorch_model.safetensors +3 -0
  48. vae_1_0/config.json +31 -0
  49. vae_1_0/diffusion_pytorch_model.fp16.safetensors +3 -0
  50. vae_1_0/diffusion_pytorch_model.safetensors +3 -0
.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz 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
+ *.onnx.data filter=lfs diff=lfs merge=lfs -text
37
+ *.xml filter=lfs diff=lfs merge=lfs -text
FFusionXL-BASE-v1-vae.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c426701eec9bf0a551c69448244b5c0f5ae828c7c0b9294744366fd21c19cab
3
+ size 7105347960
FFusionXL-BASE-v1.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:095c6c4054ea32f057fb25e59a444b9fa0f33971ebca3a08ae4799b9ac7801e7
3
+ size 6938040714
FFusionXL-LoRa-SDXL-Potion-Art-Engine.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2b7f0eae69015cc25e0f89f4eee99371dc9880fa395da7e137661c2a8907a41
3
+ size 15223776
LICENSE.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FFusionXL 1.0 RESEARCH LICENSE AGREEMENT
2
+ Copyright (c) 2023 FFusion AI Ltd. and Source Code Bulgaria Ltd.
3
+
4
+ This License Agreement (as may be amended in accordance with this License Agreement, �License�), between you, or your employer or other entity (if you are entering into this agreement on behalf of your employer or other entity) (�Licensee� or �you�) and FFusion AI Ltd. (�FFusion AI� or �we�) and Source Code Bulgaria Ltd. ("Source Code Bulgaria" or "we") applies to your use of any computer program, algorithm, source code, object code, software, models, or model weights that is made available by FFusion AI and Source Code Bulgaria under this License (�Software�) and any specifications, manuals, documentation, and other written information provided by FFusion AI and Source Code Bulgaria related to the Software (�Documentation�).
5
+
6
+ By using the Software, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to use the Software or Documentation (collectively, the �Software Products�), and you must immediately cease using the Software Products. If you are agreeing to be bound by the terms of this License on behalf of your employer or other entity, you represent and warrant to FFusion AI and Source Code Bulgaria that you have full legal authority to bind your employer or such entity to this License. If you do not have the requisite authority, you may not accept the License or access the Software Products on behalf of your employer or other entity.
7
+
8
+ Use-based Restrictions: The Software Products cannot be used for certain restricted uses. These include violating any applicable law or regulation, exploiting or harming minors, generating or disseminating false information or personal identifiable information that can harm an individual, defaming or harassing others, and more.
9
+
10
+
11
+ Output Generation: FFusion AI and Source Code Bulgaria claim no rights in the output generated using the Software Products. The user is accountable for the output they generate and its subsequent uses.
12
+
13
+
14
+ Updates and Runtime Restrictions: FFusion AI and Source Code Bulgaria reserve the right to restrict usage of the Software Products in violation of this License.
15
+
16
+ Disclaimer of Warranty and Limitation of Liability: The Software Products are provided on an "AS IS" basis, without warranties or conditions of any kind. FFusion AI and Source Code Bulgaria are not liable for damages arising as a result of this License or out of the use or inability to use the Software Products.
17
+
18
+
19
+ ATTRIBUTION
20
+ Together with any copies of the Software Products (as well as derivative works thereof or works incorporating the Software Products) that you distribute, you must provide (i) a copy of this License, and (ii) the following attribution notice: �FFusionXL 1.0 is licensed under the FFusionXL Research License, Copyright (c) FFusion AI Ltd. All Rights Reserved. FFusionXL-BASE is developed and maintained by FFusion.AI, a division of Source Code Bulgaria Ltd. All Rights Reserved.�
21
+
22
+
23
+ ADDITIONAL TERMS FOR FFUSION.AI
24
+ In addition to the terms set forth above, the following terms apply specifically to the FFusionXL-BASE model developed by FFusion.AI, a division of Source Code Bulgaria Ltd:
25
+
26
+ a. Any use of the FFusionXL-BASE model must include proper attribution to FFusion.AI and Source Code Bulgaria Ltd. in any publication or public work that includes results achieved by or data generated by the model.
27
+
28
+ b. The FFusionXL-BASE model is provided for non-commercial research purposes only. Any commercial use requires a separate license agreement with Source Code Bulgaria Ltd.
29
+
30
+ c. You may not reverse engineer, decompile, or disassemble the FFusionXL-BASE model.
31
+
32
+ d. You agree to indemnify and hold harmless Source Code Bulgaria Ltd. and its affiliates from any claims, damages, liabilities, costs, losses, and expenses (including reasonable attorney's fees) arising out of your use of the FFusionXL-BASE model.
33
+
34
+
35
+ Acknowledgement of Original Work and Modifications: This Software is based on the Stable Diffusion XL Base 1.0 model developed by Stability AI Ltd. FFusion AI and Source Code Bulgaria Ltd. have made modifications and enhancements to the original Software for the creation of the FFusionXL-BASE model. While FFusion AI and Source Code Bulgaria Ltd. maintain the rights to their modifications and enhancements, all rights to the original Software and associated intellectual property remain with Stability AI Ltd. Use of the FFusionXL-BASE model is subject to the terms of this License, as well as any terms and conditions set forth by Stability AI Ltd. for the use of the original Software.
README.md ADDED
@@ -0,0 +1,580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: openrail++
3
+ base_model: diffusers/stable-diffusion-xl-base-1.0
4
+ tags:
5
+ - stable-diffusion-xl
6
+ - stable-diffusion-xl-diffusers
7
+ - stable-diffusion
8
+ - text-to-image
9
+ - diffusers
10
+ - di.FFusion.ai
11
+ inference: true
12
+ widget:
13
+ - text: >-
14
+ a dog in colorful exploding clouds, dreamlike surrealism colorful smoke and fire coming
15
+ out of it, explosion of data fragments, exploding background,realistic explosion, 3d digital art
16
+ example_title: Dogo FFusion
17
+ - text: >-
18
+ a sprinkled donut sitting on top of a table, colorful hyperrealism, everything is made of candy, hyperrealistic digital
19
+ painting, covered in sprinkles and crumbs, vibrant colors hyper realism,colorful smoke explosion background
20
+ example_title: Donut FFusion
21
+ - text: >-
22
+ a cup of coffee with a tree in it, surreal art, awesome great composition,
23
+ surrealism, ice cubes in tree, colorful clouds, perfectly realistic yet surreal
24
+ example_title: CoFFee FFusion
25
+ - text: >-
26
+ brightly colored headphones with a splash of colorful paint splash, vibing
27
+ to music, stunning artwork, music is life, beautiful digital artwork, concept art, cinematic, dramatic, intricate details, dark
28
+ lighting
29
+ example_title: Headset FFusion
30
+ - text: >-
31
+ high-quality game character digital design, Unreal Engine, Water color painting, Mecha- Monstrous high quality game fantasy rpg character design, dark rainbow Fur Scarf, inside of a Superficial Outhouse, at Twilight, Overdetailed art
32
+ example_title: Digital Fusion
33
+
34
+ language:
35
+ - en
36
+ model-index:
37
+ - name: FFusion/FFusionXL-BASE
38
+ results:
39
+ - task:
40
+ type: text-to-image
41
+ name: Text to Image Generation
42
+ dataset:
43
+ type: poloclub/diffusiondb
44
+ name: DiffusionDB
45
+ split: train
46
+ metrics:
47
+ - type: is
48
+ value: 4.9797071218490601
49
+ name: Inception Score
50
+ verified: true
51
+ - type: fid
52
+ value: 311.33686580590006
53
+ name: Fréchet Inception Distance
54
+ verified: true
55
+ - type: text-image-similarity
56
+ value: 14.368797302246094
57
+ name: Similarity Score (CLIP)
58
+ thumbnail: >-
59
+ https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/p54u7dEP1u8en0--NMEjS.png
60
+ ---
61
+
62
+ ![FFusionXL-openvino-onnx-directml.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/Yhp6RIF2oKbx7cLPXCxMe.png)
63
+ <div style="display: flex; flex-wrap: wrap; gap: 2px;">
64
+ <a href="https://huggingface.co/FFusion/"><img src="https://img.shields.io/badge/ONNX_Version-Available-brightgreen" alt="ONNX Version Available"></a>
65
+ <a href="https://huggingface.co/FFusion/"><img src="https://img.shields.io/badge/OpenVINO-Support-blue" alt="OpenVINO Support"></a>
66
+ <a href="https://huggingface.co/FFusion/"><img src="https://img.shields.io/badge/Compatibility-Intel%20|%20AMD%20|%20NVIDIA-orange" alt="Intel/AMD/NVIDIA Compatible"></a>
67
+ </div>
68
+
69
+ ## 🌟 Overview
70
+
71
+
72
+ - 🚀 Fast Training: Optimized for high-speed training, allowing rapid experimentation.
73
+ - 🧩 Versatility: Suitable for various applications and standards, from NLP to Computer Vision.
74
+ - 🎓 Train Your Way: A base for training your own models, tailored to your needs.
75
+ - 🌐 Multilingual Support: Train models in multiple languages.
76
+ - 🛡️ Robust Architecture: Built on proven technologies to ensure stability and reliability.
77
+
78
+
79
+ ## 📜 Model Description
80
+
81
+ FFusionXL "Base" is a foundational model designed to accelerate training processes. Crafted with flexibility in mind, it serves as a base for training custom models across a variety of standards, enabling innovation and efficiency.
82
+
83
+
84
+ <div style="display: flex; flex-wrap: wrap; gap: 2px;">
85
+ <a href="#"><img src="https://img.shields.io/badge/Safetensor-FP16%20%26%20FP32-blue" alt="Safetensor checkpoints"></a>
86
+ <a href="#"><img src="https://img.shields.io/badge/Diffusers(Safetensors)-FP16%20%26%20FP32-green" alt="Diffusers(safetensors)"></a>
87
+ <a href="#"><img src="https://img.shields.io/badge/Diffusers(PyTorch%20Bin)-FP16%20%26%20FP32-orange" alt="Diffusers(pytorch bin)"></a>
88
+ <a href="#"><img src="https://img.shields.io/badge/ONNX-Unoptimized%20FP32-red" alt="ONNX un-optimized FP32"></a>
89
+ <a href="#"><img src="https://img.shields.io/badge/ONNX%20Optimized-FP16%20DirectML%20Support-blueviolet" alt="ONNX Optimized FP16 full DirectML support"></a>
90
+ <a href="#"><img src="https://img.shields.io/badge/Intel®%20OpenVINO™-FP32%20%26%20FP16-brightgreen" alt="Intel® OpenVINO™ FP32 & FP16"></a>
91
+ </div>
92
+
93
+
94
+
95
+ **Available formats for training:**
96
+ - Safetensor checkpoints fp16 & fp32
97
+ - Diffusers(safetensors) FP 16 & FP32
98
+ - Diffusers(pytorch bin) FP16 & FP32
99
+
100
+ - ONNX un-optimzed FP32
101
+ - **ONNX Optimized** FP16 full **DirectML** support / AMD / NVIDIA
102
+ - Intel® OpenVINO™ FP32 - unoptimized
103
+ - **Intel® OpenVINO™** FP16
104
+
105
+ - **Trained by:** FFusion AI
106
+ - **Model type:** Diffusion-based text-to-image generative model
107
+ - **License:** [FFXL Research License](https://huggingface.co/FFusion/FFusionXL-09-SDXL/blob/main/LICENSE.md)
108
+ - **Model Description:** This is a trained model based on SDXL that can be used to generate and modify images based on text prompts. It is a [Latent Diffusion Model](https://arxiv.org/abs/2112.10752) that uses two fixed, pretrained text encoders ([OpenCLIP-ViT/G](https://github.com/mlfoundations/open_clip) and [CLIP-ViT/L](https://github.com/openai/CLIP/tree/main)).
109
+ - **Resources for more information:** [SDXL paper on arXiv](https://arxiv.org/abs/2307.01952).
110
+
111
+ ## 📊 Model Sources
112
+
113
+ - **Demo:** [FFusionXL SDXL DEMO](https://huggingface.co/spaces/FFusion/FFusionXL-SDXL-DEMO)
114
+ ![ffusionXL-Demo.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/qN9C9hn1lmhjD03wH34fo.png)
115
+
116
+
117
+ ## Table of Contents
118
+
119
+ 1. [📌 ONNX Version](#📌-onnx-version)
120
+ 1. [🔖 ### 📌 ONNX Details](#🔖-###-📌-onnx-details)
121
+ 2. [🔖 ### 📌 AMD Support for Microsoft® DirectML Optimization of Stable Diffusion](#🔖-###-📌-amd-support-for-microsoft®-directml-optimization-of-stable-diffusion)
122
+ 3. [🔖 ### 📌 ONNX Inference Instructions](#🔖-###-📌-onnx-inference-instructions)
123
+ 4. [🔖 ### 📌 Text-to-Image](#🔖-###-📌-text-to-image)
124
+ 2. [📌 Intel® OpenVINO™ Version](#📌-intel®-openvino™-version)
125
+ 1. [📌 OpenVINO Inference with FFusion/FFusionXL-BASE](#📌-openvino-inference-with-ffusion/ffusionxl-base)
126
+ 2. [🔖 ### 📌 Installing Dependencies](#🔖-###-📌-installing-dependencies)
127
+ 3. [🔖 ### 📌 Text-to-Image](#🔖-###-📌-text-to-image)
128
+ 4. [🔖 ### 📌 Text-to-Image with Textual Inversion](#🔖-###-📌-text-to-image-with-textual-inversion)
129
+ 5. [🔖 ### 📌 Image-to-Image](#🔖-###-📌-image-to-image)
130
+ 6. [🔖 ### 📌 Refining the Image Output](#🔖-###-📌-refining-the-image-output)
131
+ 3. [📜 Part 003: 🧨 Model Diffusers, Fast LoRa Loading, and Training](#📜-part-001:-🧨-model-diffusers,-fast-lora-loading,-and-training)
132
+ 1. [📌 Model Diffusers: Unleashing the Power of FFusion/FFusionXL-BASE](#📌-model-diffusers:-unleashing-the-power-of-ffusion/ffusionxl-base)
133
+ 2. [📌 Installing the dependencies](#📌-installing-the-dependencies)
134
+ 3. [📌 Training](#📌-training)
135
+ 4. [📌 Inference](#📌-inference)
136
+ 5. [📌 Training](#📌-training)
137
+ 6. [📌 Finetuning the text encoder and UNet](#📌-finetuning-the-text-encoder-and-unet)
138
+ 7. [📌 Inference](#📌-inference)
139
+ 4. [📌 Evaluation](#📌-evaluation)
140
+
141
+
142
+
143
+
144
+
145
+
146
+ ### ### 📌 ONNX Version
147
+ ![preview-ffusionAI__base_00026_ copy.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/tJgVy8KKQljYCgW3SH--K.jpeg)
148
+
149
+ We are proud to announce a fully optimized Microsoft ONNX Version exclusively compatible with the latest DirectML Execution Provider. All the ONNX files are optimized (Quantization) to fp16 for fast inference and training across all devices.
150
+
151
+ The Vae_Decoder is kept at fp32 with settings:
152
+
153
+ ```json
154
+ "float16": false,
155
+ "use_gpu": true,
156
+ "keep_io_types": true,
157
+ "force_fp32_ops": ["RandomNormalLike"]
158
+ ```
159
+
160
+ to avoid black screens and broken renders. As soon as a proper solution for a full fp16 VAE decoder arrives, we will update it. VAE encoder and everything else is fully optimized 🤟.
161
+
162
+ Our ONNX is OPTIMIZED using ONNX v8:
163
+
164
+ - **producer:** onnxruntime.transformers 1.15.1
165
+ - **imports:** ai.onnx v18, com.microsoft.nchwc v1, ai.onnx.ml v3, com.ms.internal.nhwc v19, ai.onnx.training v1, ai.onnx.preview.training v1, com.microsoft v1, com.microsoft.experimental v1, org.pytorch.aten v1, com.microsoft.dml v1, graph: torch_jit
166
+
167
+
168
+ #### 🔖 ### 📌 ONNX Details
169
+
170
+ **NETRON** Detrails:
171
+ ![onxxapp-nutron-ffusionai.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/8dpibhpV7_Uo0B8_7zQXk.jpeg)
172
+ ## Install
173
+
174
+ **macOS**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.dmg` file or run `brew install --cask netron`
175
+
176
+ **Linux**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.AppImage` file or run `snap install netron`
177
+
178
+ **Windows**: [**Download**](https://github.com/lutzroeder/netron/releases/latest) the `.exe` installer or run `winget install -s winget netron`
179
+
180
+
181
+ https://netron.app/
182
+
183
+ -- **NETRON browser version**: [Start **Text Encoder**](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/text_encoder/model.onnx)
184
+ [![Text Encoder1 FFusionXL.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/KdC7aG_qiUsLctMb6Ij3Y.jpeg)](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/text_encoder/model.onnx)
185
+
186
+
187
+ --**NETRON browser version**: [Start **Text Encoder 2**](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/text_encoder_2/model.onnx)
188
+ [![TextEncoder2 FFusionXL.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/faCpPKG1fHmqQmi7BdlbO.jpeg)](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/text_encoder_2/model.onnx)
189
+
190
+ --**NETRON browser version**: [Start **VAE decoder**](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/vae_decoder/model.onnx)
191
+
192
+ --**NETRON browser version**: [Start **VAE encoder**](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/vae_encoder/model.onnx)
193
+ [![VAE encoder FFUSION-ai-Screenshot_2016.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/pm824V7Fyv22x7yHjDsfE.jpeg)](https://netron.app/?url=https://huggingface.co/FFusion/FFusionXL-BASE/blob/main/vae_encoder/model.onnx)
194
+
195
+ --**NETRON browser version**: [Start **UNET**](https://netron.app/?url=https://huggingface.co/stabilityai/FFusion/FFusionXL-BASE/blob/main/unet/model.onnx)
196
+
197
+
198
+
199
+ ##### 🔖 ### 📌 AMD Support for Microsoft® DirectML Optimization of Stable Diffusion
200
+
201
+ ![FFusionXL-directML.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/AWcddnCm1rEpSW0Ta6beV.jpeg)
202
+
203
+ AMD has released support for Microsoft DirectML optimizations for Stable Diffusion, working closely with Microsoft for optimal performance on AMD devices.
204
+
205
+ [Microsoft DirectML](https://microsoft.github.io/DirectML/)
206
+ [AMD Microsoft DirectML Stable Diffusion](https://gpuopen.com/amd-microsoft-directml-stable-diffusion/)
207
+
208
+
209
+ #### 🔖 ### 📌 ONNX Inference Instructions
210
+ ![Onnx-FFusionXL1.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/QJjulnRe4iJHhWPb1c2nY.jpeg)
211
+
212
+
213
+
214
+ ##### 🔖 ### 📌 Text-to-Image
215
+
216
+ Here is an example of how you can load an ONNX Stable Diffusion model and run inference using ONNX Runtime:
217
+
218
+ ```python
219
+ from optimum.onnxruntime import ORTStableDiffusionPipeline
220
+
221
+ model_id = "FFusion/FFusionXL-BASE"
222
+ pipeline = ORTStableDiffusionPipeline.from_pretrained(model_id)
223
+ prompt = "sailing ship in storm by Leonardo da Vinci"
224
+ images = pipeline(prompt).images
225
+ ```
226
+
227
+
228
+
229
+
230
+ ### ### 📌 Intel® OpenVINO™ Version
231
+
232
+ A converted Intel® OpenVINO™ model is also included for inference testing and training. No Quantization and optimization applied yet.
233
+
234
+
235
+
236
+
237
+
238
+ ---
239
+
240
+ ### ### 📌 OpenVINO Inference with FFusion/FFusionXL-BASE
241
+
242
+ #### 🔖 ### 📌 Installing Dependencies
243
+
244
+ Before using `OVStableDiffusionXLPipeline`, make sure to have `diffusers` and `invisible_watermark` installed. You can install the libraries as follows:
245
+
246
+ ```bash
247
+ pip install diffusers
248
+ pip install invisible-watermark>=0.2.0
249
+ ```
250
+
251
+ #### 🔖 ### 📌 Text-to-Image
252
+
253
+ Here is an example of how you can load a FFusion/FFusionXL-BASE OpenVINO model and run inference using OpenVINO Runtime:
254
+
255
+ ```python
256
+ from optimum.intel import OVStableDiffusionXLPipeline
257
+
258
+ model_id = "FFusion/FFusionXL-BASE"
259
+ base = OVStableDiffusionXLPipeline.from_pretrained(model_id)
260
+ prompt = "train station by Caspar David Friedrich"
261
+ image = base(prompt).images[0]
262
+ image.save("train_station.png")
263
+ ```
264
+
265
+ #### 🔖 ### 📌 Text-to-Image with Textual Inversion
266
+
267
+ First, you can run the original pipeline without textual inversion:
268
+
269
+ ```python
270
+ from optimum.intel import OVStableDiffusionXLPipeline
271
+ import numpy as np
272
+
273
+ model_id = "FFusion/FFusionXL-BASE"
274
+ prompt = "charturnerv2, multiple views of the same character in the same outfit, a character turnaround of a beautiful cyber female wearing a black corset and pink latex shirt, scifi best quality, intricate details."
275
+ np.random.seed(0)
276
+
277
+ base = OVStableDiffusionXLPipeline.from_pretrained(model_id, export=False, compile=False)
278
+ base.compile()
279
+ image1 = base(prompt, num_inference_steps=50).images[0]
280
+ image1.save("sdxl_without_textual_inversion.png")
281
+ ```
282
+
283
+ Then, you can load `charturnerv2` textual inversion embedding and run the pipeline with the same prompt again:
284
+
285
+ ```python
286
+ # Reset stable diffusion pipeline
287
+ base.clear_requests()
288
+
289
+ # Load textual inversion into stable diffusion pipeline
290
+ base.load_textual_inversion("./charturnerv2.pt", "charturnerv2")
291
+
292
+ # Compile the model before the first inference
293
+ base.compile()
294
+ image2 = base(prompt, num_inference_steps=50).images[0]
295
+ image2.save("sdxl_with_textual_inversion.png")
296
+ ```
297
+
298
+ ![SDXL-preview.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/HocDOL_Tlxsqe9qKMRwyp.png)
299
+ ![FFusi1onXL_with_textual_inveaarsion1.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/bkkQSPWD8Zt736eihubEi.png)
300
+ ![FFusionXL_with_textual_inversion1.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/oX4CWQwbuQn4WiBDbOwM6.png)
301
+
302
+
303
+ #### 🔖 ### 📌 Image-to-Image
304
+
305
+ Here is an example of how you can load a PyTorch FFusion/FFusionXL-BASE model, convert it to OpenVINO on-the-fly, and run inference using OpenVINO Runtime for image-to-image:
306
+
307
+ ```python
308
+ from optimum.intel import OVStableDiffusionXLImg2ImgPipeline
309
+ from diffusers.utils import load_image
310
+
311
+ model_id = "FFusion/FFusionXL-BASE-refiner-1.0"
312
+ pipeline = OVStableDiffusionXLImg2ImgPipeline.from_pretrained(model_id, export=True)
313
+
314
+ url = "https://huggingface.co/datasets/optimum/documentation-images/resolve/main/intel/openvino/sd_xl/castle_friedrich.png"
315
+ image = load_image(url).convert("RGB")
316
+ prompt = "medieval castle by Caspar David Friedrich"
317
+ image = pipeline(prompt, image=image).images[0]
318
+ pipeline.save_pretrained("openvino-FF-xl-refiner-1.0")
319
+ ```
320
+
321
+ #### 🔖 ### 📌 Refining the Image Output
322
+
323
+ The image can be refined by making use of a model like `FFusion/FFusionXL-BASE-refiner-1.0`. In this case, you only have to output the latents from the base model.
324
+
325
+ ```python
326
+ from optimum.intel import OVStableDiffusionXLImg2ImgPipeline
327
+
328
+ model_id = "FFusion/FFusionXL-BASE-refiner-1.0"
329
+ refiner = OVStableDiffusionXLImg2ImgPipeline.from_pretrained(model_id, export=True)
330
+
331
+ image = base(prompt=prompt, output_type="latent").images[0]
332
+ image = refiner(prompt=prompt, image=image[None, :]).images[0]
333
+ ```
334
+
335
+ ## 📜 Part 003: 🧨 Model Diffusers, Fast LoRa Loading, and Training
336
+
337
+ ### ### 📌 Model Diffusers: Unleashing the Power of FFusion/FFusionXL-BASE
338
+
339
+ Whether you're an artist, researcher, or AI enthusiast, our model is designed to make your journey smooth and exciting.
340
+ Make sure to upgrade diffusers to >= 0.19.3:
341
+ ```bash
342
+ pip install diffusers --upgrade
343
+ ```
344
+ In addition, make sure to install `transformers`, `safetensors`, `accelerate`, and the invisible watermark:
345
+ ```bash
346
+ pip install invisible_watermark transformers accelerate safetensors
347
+ ```
348
+
349
+ You can use the model then as follows:
350
+ ```python
351
+ from diffusers import DiffusionPipeline
352
+ import torch
353
+
354
+ pipe = DiffusionPipeline.from_pretrained("FFusion/FFusionXL-09-SDXL", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
355
+ pipe.to("cuda")
356
+
357
+ # if using torch < 2.0
358
+ # pipe.enable_xformers_memory_efficient_attention()
359
+
360
+ prompt = "An astronaut riding a green horse"
361
+
362
+ images = pipe(prompt=prompt).images[0]
363
+ ```
364
+
365
+ ## 📜 Diffusers Training Guide: Training FFusion/FFusionXL-BASE with LoRA
366
+
367
+ # Stable Diffusion XL text-to-image fine-tuning
368
+
369
+ The `train_text_to_image_sdxl.py` script shows how to fine-tune Stable Diffusion XL (SDXL) on your own dataset.
370
+
371
+ 🚨 This script is experimental. The script fine-tunes the whole model and often times the model overfits and runs into issues like catastrophic forgetting. It's recommended to try different hyperparamters to get the best result on your dataset. 🚨
372
+
373
+ ## 📜 Running locally with PyTorch
374
+
375
+ ### ### 📌 Installing the dependencies
376
+
377
+ Before running the scripts, make sure to install the library's training dependencies:
378
+
379
+ **Important**
380
+
381
+ To make sure you can successfully run the latest versions of the example scripts, we highly recommend **installing from source** and keeping the install up to date as we update the example scripts frequently and install some example-specific requirements. To do this, execute the following steps in a new virtual environment:
382
+
383
+ ```bash
384
+ git clone https://github.com/huggingface/diffusers
385
+ cd diffusers
386
+ pip install -e .
387
+ ```
388
+
389
+ Then cd in the `examples/text_to_image` folder and run
390
+ ```bash
391
+ pip install -r requirements_sdxl.txt
392
+ ```
393
+
394
+ And initialize an [🤗Accelerate](https://github.com/huggingface/accelerate/) environment with:
395
+
396
+ ```bash
397
+ accelerate config
398
+ ```
399
+
400
+ Or for a default accelerate configuration without answering questions about your environment
401
+
402
+ ```bash
403
+ accelerate config default
404
+ ```
405
+
406
+ Or if your environment doesn't support an interactive shell (e.g., a notebook)
407
+
408
+ ```python
409
+ from accelerate.utils import write_basic_config
410
+ write_basic_config()
411
+ ```
412
+
413
+ When running `accelerate config`, if we specify torch compile mode to True there can be dramatic speedups.
414
+
415
+
416
+
417
+
418
+
419
+ ### ### 📌 Training
420
+
421
+ ```bash
422
+ export MODEL_NAME="FFusion/FFusionXL-BASE"
423
+ export VAE="madebyollin/sdxl-vae-fp16-fix"
424
+ export DATASET_NAME="lambdalabs/pokemon-blip-captions"
425
+
426
+ accelerate launch train_text_to_image_sdxl.py \
427
+ --pretrained_model_name_or_path=$MODEL_NAME \
428
+ --pretrained_vae_model_name_or_path=$VAE \
429
+ --dataset_name=$DATASET_NAME \
430
+ --enable_xformers_memory_efficient_attention \
431
+ --resolution=512 --center_crop --random_flip \
432
+ --proportion_empty_prompts=0.2 \
433
+ --train_batch_size=1 \
434
+ --gradient_accumulation_steps=4 --gradient_checkpointing \
435
+ --max_train_steps=10000 \
436
+ --use_8bit_adam \
437
+ --learning_rate=1e-06 --lr_scheduler="constant" --lr_warmup_steps=0 \
438
+ --mixed_precision="fp16" \
439
+ --report_to="wandb" \
440
+ --validation_prompt="a cute Sundar Pichai creature" --validation_epochs 5 \
441
+ --checkpointing_steps=5000 \
442
+ --output_dir="sdxl-pokemon-model" \
443
+ --push_to_hub
444
+ ```
445
+
446
+ **Notes**:
447
+
448
+ * The `train_text_to_image_sdxl.py`(diffusers/examples/text_to_image) script pre-computes text embeddings and the VAE encodings and keeps them in memory. While for smaller datasets like [`lambdalabs/pokemon-blip-captions`](https://hf.co/datasets/lambdalabs/pokemon-blip-captions), it might not be a problem, it can definitely lead to memory problems when the script is used on a larger dataset. For those purposes, you would want to serialize these pre-computed representations to disk separately and load them during the fine-tuning process. Refer to [this PR](https://github.com/huggingface/diffusers/pull/4505) for a more in-depth discussion.
449
+ * The training script is compute-intensive and may not run on a consumer GPU like Tesla T4.
450
+ * The training command shown above performs intermediate quality validation in between the training epochs and logs the results to Weights and Biases. `--report_to`, `--validation_prompt`, and `--validation_epochs` are the relevant CLI arguments here.
451
+ examples/text_to_image
452
+ ### ### 📌 Inference
453
+
454
+ ```python
455
+ from diffusers import DiffusionPipeline
456
+ import torch
457
+
458
+ model_path = "FFusion/FFusionXL-BASE" # <-- change this to your new trained model
459
+ pipe = DiffusionPipeline.from_pretrained(model_path, torch_dtype=torch.float16)
460
+ pipe.to("cuda")
461
+
462
+ prompt = "A pokemon with green eyes and red legs."
463
+ image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5).images[0]
464
+ image.save("pokemon.png")
465
+ ```
466
+
467
+ ## 📜 LoRA training example for Stable Diffusion XL (SDXL)
468
+
469
+ Low-Rank Adaption of Large Language Models was first introduced by Microsoft in [LoRA: Low-Rank Adaptation of Large Language Models](https://arxiv.org/abs/2106.09685) by *Edward J. Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, Weizhu Chen*.
470
+
471
+ In a nutshell, LoRA allows adapting pretrained models by adding pairs of rank-decomposition matrices to existing weights and **only** training those newly added weights. This has a couple of advantages:
472
+
473
+ - Previous pretrained weights are kept frozen so that model is not prone to [catastrophic forgetting](https://www.pnas.org/doi/10.1073/pnas.1611835114).
474
+ - Rank-decomposition matrices have significantly fewer parameters than original model, which means that trained LoRA weights are easily portable.
475
+ - LoRA attention layers allow to control to which extent the model is adapted toward new training images via a `scale` parameter.
476
+
477
+ [cloneofsimo](https://github.com/cloneofsimo) was the first to try out LoRA training for Stable Diffusion in the popular [lora](https://github.com/cloneofsimo/lora) GitHub repository.
478
+
479
+ With LoRA, it's possible to fine-tune Stable Diffusion on a custom image-caption pair dataset
480
+ on consumer GPUs like Tesla T4, Tesla V100.
481
+
482
+ ### ### 📌 Training
483
+
484
+ First, you need to set up your development environment as is explained in the [installation section](#installing-the-dependencies). Make sure to set the `MODEL_NAME` and `DATASET_NAME` environment variables. Here, we will use [Stable Diffusion XL 1.0-base](https://huggingface.co/FFusion/FFusionXL-BASE) and the [Pokemons dataset](https://huggingface.co/datasets/lambdalabs/pokemon-blip-captions).
485
+
486
+ **___Note: It is quite useful to monitor the training progress by regularly generating sample images during training. [Weights and Biases](https://docs.wandb.ai/quickstart) is a nice solution to easily see generating images during training. All you need to do is to run `pip install wandb` before training to automatically log images.___**
487
+
488
+ ```bash
489
+ export MODEL_NAME="FFusion/FFusionXL-BASE"
490
+ export DATASET_NAME="lambdalabs/pokemon-blip-captions"
491
+ ```
492
+
493
+ For this example we want to directly store the trained LoRA embeddings on the Hub, so
494
+ we need to be logged in and add the `--push_to_hub` flag.
495
+
496
+ ```bash
497
+ huggingface-cli login
498
+ ```
499
+
500
+ Now we can start training!
501
+
502
+ ```bash
503
+ accelerate launch train_text_to_image_lora_sdxl.py \
504
+ --pretrained_model_name_or_path=$MODEL_NAME \
505
+ --dataset_name=$DATASET_NAME --caption_column="text" \
506
+ --resolution=1024 --random_flip \
507
+ --train_batch_size=1 \
508
+ --num_train_epochs=2 --checkpointing_steps=500 \
509
+ --learning_rate=1e-04 --lr_scheduler="constant" --lr_warmup_steps=0 \
510
+ --seed=42 \
511
+ --output_dir="sd-pokemon-model-lora-sdxl" \
512
+ --validation_prompt="cute dragon creature" --report_to="wandb" \
513
+ --push_to_hub
514
+ ```
515
+
516
+ The above command will also run inference as fine-tuning progresses and log the results to Weights and Biases.
517
+
518
+ ### ### 📌 Finetuning the text encoder and UNet
519
+
520
+ The script also allows you to finetune the `text_encoder` along with the `unet`.
521
+
522
+ 🚨 Training the text encoder requires additional memory.
523
+
524
+ Pass the `--train_text_encoder` argument to the training script to enable finetuning the `text_encoder` and `unet`:
525
+
526
+ ```bash
527
+ accelerate launch train_text_to_image_lora_sdxl.py \
528
+ --pretrained_model_name_or_path=$MODEL_NAME \
529
+ --dataset_name=$DATASET_NAME --caption_column="text" \
530
+ --resolution=1024 --random_flip \
531
+ --train_batch_size=1 \
532
+ --num_train_epochs=2 --checkpointing_steps=500 \
533
+ --learning_rate=1e-04 --lr_scheduler="constant" --lr_warmup_steps=0 \
534
+ --seed=42 \
535
+ --output_dir="sd-pokemon-model-lora-sdxl-txt" \
536
+ --train_text_encoder \
537
+ --validation_prompt="cute dragon creature" --report_to="wandb" \
538
+ --push_to_hub
539
+ ```
540
+
541
+ ### ### 📌 Inference
542
+
543
+ Once you have trained a model using above command, the inference can be done simply using the `DiffusionPipeline` after loading the trained LoRA weights. You
544
+ need to pass the `output_dir` for loading the LoRA weights which, in this case, is `sd-pokemon-model-lora-sdxl`.
545
+
546
+ ```python
547
+ from diffusers import DiffusionPipeline
548
+ import torch
549
+
550
+ model_path = "takuoko/sd-pokemon-model-lora-sdxl"
551
+ pipe = DiffusionPipeline.from_pretrained("FFusion/FFusionXL-BASE", torch_dtype=torch.float16)
552
+ pipe.to("cuda")
553
+ pipe.load_lora_weights(model_path)
554
+
555
+ prompt = "A pokemon with green eyes and red legs."
556
+ image = pipe(prompt, num_inference_steps=30, guidance_scale=7.5).images[0]
557
+ image.save("pokemon.png")
558
+ ```
559
+
560
+
561
+ ### ### 📌 Evaluation
562
+
563
+ ![evaluation-ffusionAI.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/NPrW6dc_JsAxZrZZRDC_M.jpeg)
564
+ ![evaluation-ffusionXL.jpg](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/b0Z2M7wp-MqCXes595ulX.jpeg)
565
+
566
+ ![image_comparisons.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/m890TYI3HTk6xYMPBrLQN.png)
567
+ ![combined_FFigure.png](https://cdn-uploads.huggingface.co/production/uploads/6380cf05f496d57325c12194/I67ri4P06doH7l2n7x1G0.png)
568
+
569
+
570
+ Utilizing yuvalkirstain/PickScore_v1 model, this analysis was conducted by FFusion.AI. It serves as a vital contribution to the ongoing research in testing Stable Diffusion Models' prompt win rate and accuracy.
571
+
572
+
573
+ 📧 For any inquiries or support, please contact di@ffusion.ai. We're here to help you every step of the way!
574
+
575
+
576
+
577
+
578
+
579
+
580
+
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:095c6c4054ea32f057fb25e59a444b9fa0f33971ebca3a08ae4799b9ac7801e7
3
+ size 6938040714
model_index.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "StableDiffusionXLPipeline",
3
+ "_diffusers_version": "0.20.0.dev0",
4
+ "add_watermarker": null,
5
+ "force_zeros_for_empty_prompt": true,
6
+ "scheduler": [
7
+ "diffusers",
8
+ "EulerDiscreteScheduler"
9
+ ],
10
+ "text_encoder": [
11
+ "transformers",
12
+ "CLIPTextModel"
13
+ ],
14
+ "text_encoder_2": [
15
+ "transformers",
16
+ "CLIPTextModelWithProjection"
17
+ ],
18
+ "tokenizer": [
19
+ "transformers",
20
+ "CLIPTokenizer"
21
+ ],
22
+ "tokenizer_2": [
23
+ "transformers",
24
+ "CLIPTokenizer"
25
+ ],
26
+ "unet": [
27
+ "diffusers",
28
+ "UNet2DConditionModel"
29
+ ],
30
+ "vae": [
31
+ "diffusers",
32
+ "AutoencoderKL"
33
+ ]
34
+ }
openvino_model_vae_decoder.fp32.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2cccd5064c093ba6690a622ffacf92c59e1ffe5dd5a68c2af351a8fadc0a0970
3
+ size 197961232
openvino_model_vae_decoder.fp32.xml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d2bae42a380fe5d3c37460b187b2fc5758de68333e53f08350bdcb613470ec0f
3
+ size 1024173
scheduler/scheduler_config.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "EulerDiscreteScheduler",
3
+ "_diffusers_version": "0.20.0.dev0",
4
+ "beta_end": 0.012,
5
+ "beta_schedule": "scaled_linear",
6
+ "beta_start": 0.00085,
7
+ "clip_sample": false,
8
+ "interpolation_type": "linear",
9
+ "num_train_timesteps": 1000,
10
+ "prediction_type": "epsilon",
11
+ "sample_max_value": 1.0,
12
+ "set_alpha_to_one": false,
13
+ "skip_prk_steps": true,
14
+ "steps_offset": 1,
15
+ "timestep_spacing": "leading",
16
+ "trained_betas": null,
17
+ "use_karras_sigmas": false
18
+ }
text_encoder/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModel"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "quick_gelu",
10
+ "hidden_size": 768,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "projection_dim": 768,
21
+ "torch_dtype": "float16",
22
+ "transformers_version": "4.32.0.dev0",
23
+ "vocab_size": 49408
24
+ }
text_encoder/model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91402733c2b731c52fe768ecf2749f26af0bfa20f288d650288b800244d9366a
3
+ size 246144152
text_encoder/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b3219696dc3c6aad9dc7b5e2e190ba9a1f11742ba540b1ff42d0e6aa53116fc
3
+ size 246426368
text_encoder/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d02ec17d248b6a1f77fb499fa6b975baade4db8ab4f131bf464127190b5d02e
3
+ size 492265168
text_encoder/openvino_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7691637d14da4ec8905a473a2a877e4119c7c7ea99a9f60c4d5129798041a1e
3
+ size 246121702
text_encoder/openvino_model.xml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ba85772ce517c04ada1ffe10a31c3cd76e3ea54c99120f585f5320e48cd81d40
3
+ size 1223594
text_encoder_2/config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModelWithProjection"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_size": 1280,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5120,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 20,
18
+ "num_hidden_layers": 32,
19
+ "pad_token_id": 1,
20
+ "projection_dim": 1280,
21
+ "torch_dtype": "float16",
22
+ "transformers_version": "4.32.0.dev0",
23
+ "vocab_size": 49408
24
+ }
text_encoder_2/model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:364750659e50ae09d4a8d2b7499061d7b426abbbce35cfc9baaa4b594ca3f399
3
+ size 1389382176
text_encoder_2/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:985bdf4dc6c5284aa06e1363d9134883d0105da96913f8031ac7aa2d8387a39a
3
+ size 1390097801
text_encoder_2/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ea09303caf1385a6701d372684c246755cd23f546bfdec2fb1038b5a7891c57
3
+ size 2778639360
text_encoder_2/model.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ea09303caf1385a6701d372684c246755cd23f546bfdec2fb1038b5a7891c57
3
+ size 2778639360
text_encoder_2/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f8d688d1071dd50718eda961bea02eff217f416c76e9762056f5cec02c118d3
3
+ size 2778702264
text_encoder_2/openvino_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:049b885604d855b5ce1b06c949ca16e4dcb75d6de7db6bd50cc69a39fcbb48c3
3
+ size 1389320426
text_encoder_2/openvino_model.xml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c829ab06d6b4bf04c6419b2f98d86bcfba42b70b306c665361a70fcd7fc742d
3
+ size 3258235
tokenizer/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<|endoftext|>",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer/tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "clean_up_tokenization_spaces": true,
12
+ "do_lower_case": true,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "<|endoftext|>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "errors": "replace",
22
+ "model_max_length": 77,
23
+ "pad_token": "<|endoftext|>",
24
+ "tokenizer_class": "CLIPTokenizer",
25
+ "unk_token": {
26
+ "__type": "AddedToken",
27
+ "content": "<|endoftext|>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_2/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_2/special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<|startoftext|>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "<|endoftext|>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "!",
17
+ "unk_token": {
18
+ "content": "<|endoftext|>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer_2/tokenizer_config.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": {
4
+ "__type": "AddedToken",
5
+ "content": "<|startoftext|>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false
10
+ },
11
+ "clean_up_tokenization_spaces": true,
12
+ "do_lower_case": true,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "<|endoftext|>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "errors": "replace",
22
+ "model_max_length": 77,
23
+ "pad_token": "!",
24
+ "tokenizer_class": "CLIPTokenizer",
25
+ "unk_token": {
26
+ "__type": "AddedToken",
27
+ "content": "<|endoftext|>",
28
+ "lstrip": false,
29
+ "normalized": true,
30
+ "rstrip": false,
31
+ "single_word": false
32
+ }
33
+ }
tokenizer_2/vocab.json ADDED
The diff for this file is too large to render. See raw diff
 
unet/config.json ADDED
@@ -0,0 +1,69 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "UNet2DConditionModel",
3
+ "_diffusers_version": "0.20.0.dev0",
4
+ "act_fn": "silu",
5
+ "addition_embed_type": "text_time",
6
+ "addition_embed_type_num_heads": 64,
7
+ "addition_time_embed_dim": 256,
8
+ "attention_head_dim": [
9
+ 5,
10
+ 10,
11
+ 20
12
+ ],
13
+ "block_out_channels": [
14
+ 320,
15
+ 640,
16
+ 1280
17
+ ],
18
+ "center_input_sample": false,
19
+ "class_embed_type": null,
20
+ "class_embeddings_concat": false,
21
+ "conv_in_kernel": 3,
22
+ "conv_out_kernel": 3,
23
+ "cross_attention_dim": 2048,
24
+ "cross_attention_norm": null,
25
+ "down_block_types": [
26
+ "DownBlock2D",
27
+ "CrossAttnDownBlock2D",
28
+ "CrossAttnDownBlock2D"
29
+ ],
30
+ "downsample_padding": 1,
31
+ "dual_cross_attention": false,
32
+ "encoder_hid_dim": null,
33
+ "encoder_hid_dim_type": null,
34
+ "flip_sin_to_cos": true,
35
+ "freq_shift": 0,
36
+ "in_channels": 4,
37
+ "layers_per_block": 2,
38
+ "mid_block_only_cross_attention": null,
39
+ "mid_block_scale_factor": 1,
40
+ "mid_block_type": "UNetMidBlock2DCrossAttn",
41
+ "norm_eps": 1e-05,
42
+ "norm_num_groups": 32,
43
+ "num_attention_heads": null,
44
+ "num_class_embeds": null,
45
+ "only_cross_attention": false,
46
+ "out_channels": 4,
47
+ "projection_class_embeddings_input_dim": 2816,
48
+ "resnet_out_scale_factor": 1.0,
49
+ "resnet_skip_time_act": false,
50
+ "resnet_time_scale_shift": "default",
51
+ "sample_size": 128,
52
+ "time_cond_proj_dim": null,
53
+ "time_embedding_act_fn": null,
54
+ "time_embedding_dim": null,
55
+ "time_embedding_type": "positional",
56
+ "timestep_post_act": null,
57
+ "transformer_layers_per_block": [
58
+ 1,
59
+ 2,
60
+ 10
61
+ ],
62
+ "up_block_types": [
63
+ "CrossAttnUpBlock2D",
64
+ "CrossAttnUpBlock2D",
65
+ "UpBlock2D"
66
+ ],
67
+ "upcast_attention": true,
68
+ "use_linear_projection": true
69
+ }
unet/diffusion_pytorch_model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1647e274099ac92768bc35ddd16ab79090324a817b5774020298fd26ec3e2d53
3
+ size 5135149760
unet/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7818f857d6b6fb6128b92d26be76946515e4bec670cf585bb1c7e906ecd168ac
3
+ size 10270077736
unet/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b9d4f5c9eed99df968be84568a2ccfde39ec132b8ef936a291ced9f3962dd88
3
+ size 3607328
unet/model.onnx.data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a77668d99734dcf573f1e04fd223d1ccd4cde79a42b7c4258b6fddb4038eb7f2
3
+ size 5134736640
unet/model.onnx_data ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:24f0b9404fb3ceccf0b1f69732975f9225d8ad47f2a887b65530bca3637d5dae
3
+ size 10269854720
unet/openvino_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:400cd33a057aefcf055a5d86ff6a4bcecd7baa9a54afc8bf776c15b1edb67cb9
3
+ size 5134928342
unet/openvino_model.xml ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0034acc941225d41403a86c54226779052ce5a000a2429535053a1ee1e394901
3
+ size 25207274
vae/config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.20.0.dev0",
4
+ "act_fn": "silu",
5
+ "block_out_channels": [
6
+ 128,
7
+ 256,
8
+ 512,
9
+ 512
10
+ ],
11
+ "down_block_types": [
12
+ "DownEncoderBlock2D",
13
+ "DownEncoderBlock2D",
14
+ "DownEncoderBlock2D",
15
+ "DownEncoderBlock2D"
16
+ ],
17
+ "force_upcast": true,
18
+ "in_channels": 3,
19
+ "latent_channels": 4,
20
+ "layers_per_block": 2,
21
+ "norm_num_groups": 32,
22
+ "out_channels": 3,
23
+ "sample_size": 1024,
24
+ "scaling_factor": 0.13025,
25
+ "up_block_types": [
26
+ "UpDecoderBlock2D",
27
+ "UpDecoderBlock2D",
28
+ "UpDecoderBlock2D",
29
+ "UpDecoderBlock2D"
30
+ ]
31
+ }
vae/diffusion_pytorch_model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:082a3a880fa55b0f894a894cc3ca3f9cbf1e3c18913870ae280ce7e1f6268146
3
+ size 167335342
vae/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71da7eaea2e81f2d8f8f6f45db2d3f953b833b9ea58d02030e4043f2c6975ec0
3
+ size 334643268
vae_0_9/config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.20.0.dev0",
4
+ "act_fn": "silu",
5
+ "block_out_channels": [
6
+ 128,
7
+ 256,
8
+ 512,
9
+ 512
10
+ ],
11
+ "down_block_types": [
12
+ "DownEncoderBlock2D",
13
+ "DownEncoderBlock2D",
14
+ "DownEncoderBlock2D",
15
+ "DownEncoderBlock2D"
16
+ ],
17
+ "force_upcast": true,
18
+ "in_channels": 3,
19
+ "latent_channels": 4,
20
+ "layers_per_block": 2,
21
+ "norm_num_groups": 32,
22
+ "out_channels": 3,
23
+ "sample_size": 512,
24
+ "scaling_factor": 0.13025,
25
+ "up_block_types": [
26
+ "UpDecoderBlock2D",
27
+ "UpDecoderBlock2D",
28
+ "UpDecoderBlock2D",
29
+ "UpDecoderBlock2D"
30
+ ]
31
+ }
vae_0_9/diffusion_pytorch_model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcb60880a46b63dea58e9bc591abe15f8350bde47b405f9c38f4be70c6161e68
3
+ size 167335342
vae_0_9/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1598f3d24932bcfe6634e8b618ea1e30ab1d57f5aad13a6d2de446d2199f2341
3
+ size 334643268
vae_1_0/config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_class_name": "AutoencoderKL",
3
+ "_diffusers_version": "0.19.0.dev0",
4
+ "act_fn": "silu",
5
+ "block_out_channels": [
6
+ 128,
7
+ 256,
8
+ 512,
9
+ 512
10
+ ],
11
+ "down_block_types": [
12
+ "DownEncoderBlock2D",
13
+ "DownEncoderBlock2D",
14
+ "DownEncoderBlock2D",
15
+ "DownEncoderBlock2D"
16
+ ],
17
+ "force_upcast": true,
18
+ "in_channels": 3,
19
+ "latent_channels": 4,
20
+ "layers_per_block": 2,
21
+ "norm_num_groups": 32,
22
+ "out_channels": 3,
23
+ "sample_size": 1024,
24
+ "scaling_factor": 0.13025,
25
+ "up_block_types": [
26
+ "UpDecoderBlock2D",
27
+ "UpDecoderBlock2D",
28
+ "UpDecoderBlock2D",
29
+ "UpDecoderBlock2D"
30
+ ]
31
+ }
vae_1_0/diffusion_pytorch_model.fp16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eb6516ab7e1104d5d1a174a4d65c57835ae38061531d0a2192103aecfb790cc1
3
+ size 167335342
vae_1_0/diffusion_pytorch_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:27ed3b02e09638568e99d4398c67bc654dde04e6c0db61fb2d21dba630e7058a
3
+ size 334643268