idlebg commited on
Commit
9035a1e
1 Parent(s): 080e441

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +389 -1
README.md CHANGED
@@ -1,3 +1,391 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
2
  library_name: diffusers
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: other
3
+ base_model: diffusers/stable-diffusion-xl-base-0.9
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
  library_name: diffusers
13
+ extra_gated_prompt: >-
14
+ Copyright (c) Stability AI Ltd.
15
+ FFXL-SDXL09 RESEARCH LICENSE AGREEMENT
16
+
17
+
18
+ Copyright (c) Stability AI Ltd. and Source Code Bulgaria Ltd.
19
+
20
+ This License Agreement (as may be amended in accordance with this License
21
+ Agreement, “License”), between you, or your employer or other entity (if you are
22
+ entering into this agreement on behalf of your employer or other entity)
23
+ (“Licensee” or “you”) and Stability AI Ltd. (“Stability AI” or “we”) and Source
24
+ Code Bulgaria Ltd. ("Source Code Bulgaria" or "we") applies to your use of any
25
+ computer program, algorithm, source code, object code, software, models, or
26
+ model weights that is made available by Stability AI and Source Code Bulgaria
27
+ under this License (“Software”) and any specifications, manuals, documentation,
28
+ and other written information provided by Stability AI and Source Code Bulgaria
29
+ related to the Software (“Documentation”).
30
+
31
+ By using the Software, you agree to the terms of this License. If you do not
32
+ agree to this License, then you do not have any rights to use the Software or
33
+ Documentation (collectively, the “Software Products”), and you must immediately
34
+ cease using the Software Products. If you are agreeing to be bound by the terms
35
+ of this License on behalf of your employer or other entity, you represent and
36
+ warrant to Stability AI and Source Code Bulgaria that you have full legal
37
+ authority to bind your employer or such entity to this License. If you do not
38
+ have the requisite authority, you may not accept the License or access the
39
+ Software Products on behalf of your employer or other entity.
40
+
41
+ This Model is a derivative work based on the SDXL 0.9 software provided by Stability AI Ltd under the SDXL Research License,
42
+ Copyright (c) Stability AI Ltd. All Rights Reserved.
43
+ Use of the Model must adhere to the terms outlined in the original SDXL Research License, which can be found at https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/blob/main/LICENSE.md
44
+
45
+ If you have any questions or seek permissions beyond those granted in this License, please reach out to [email protected]
46
+
47
+
48
+ 1. LICENSE GRANT
49
+
50
+ a. Subject to your compliance with the Documentation and Sections 2, 3, and 5,
51
+ Stability AI grants you a non-exclusive, worldwide, non-transferable,
52
+ non-sublicensable, revocable, royalty free and limited license under Stability
53
+ AI’s copyright interests to use, reproduce, and create derivative works of the
54
+ Software solely for your non-commercial research purposes. The foregoing
55
+ license is personal to you, and you may not assign, sublicense, distribute,
56
+ publish, host, or otherwise make available this Software, derivative works of
57
+ the Software, models or model weights associated with the Software, this
58
+ License, or any other rights or obligations under this License without
59
+ Stability AI’s prior written consent; any such assignment or sublicense
60
+ without Stability AI’s prior written consent will be void and will
61
+ automatically and immediately terminate this License. For sake of clarity,
62
+ this License does not grant to you the right or ability to extend any license
63
+ to the Software, derivative works of the Software, or associated models or
64
+ model weights to a non-Licensee, nor does this License permit you to create a
65
+ new Licensee, such as by making available a copy of this License. If you
66
+ would like rights not granted by this License, you may seek permission by
67
+ sending an email to [email protected].
68
+
69
+ b. You may make a reasonable number of copies of the Documentation solely for
70
+ your use in connection with the license to the Software granted above.
71
+
72
+ c. The grant of rights expressly set forth in this Section 1 (License Grant)
73
+ are the complete grant of rights to you in the Software Products, and no other
74
+ licenses are granted, whether by waiver, estoppel, implication, equity or
75
+ otherwise. Stability AI and its licensors reserve all rights not expressly
76
+ granted by this License.
77
+
78
+
79
+ 2. RESTRICTIONS
80
+
81
+ You will not, and will not permit, assist or cause any third party to:
82
+
83
+ a. use, modify, copy, reproduce, create derivative works of, or distribute the
84
+ Software Products (or any derivative works thereof, works incorporating the
85
+ Software Products, or any data produced by the Software), in whole or in part,
86
+ for (i) any commercial or production purposes, (ii) military purposes or in
87
+ the service of nuclear technology, (iii) purposes of surveillance, including
88
+ any research or development relating to surveillance, (iv) biometric
89
+ processing, (v) in any manner that infringes, misappropriates, or otherwise
90
+ violates any third-party rights, or (vi) in any manner that violates any
91
+ applicable law and violating any privacy or security laws, rules, regulations,
92
+ directives, or governmental requirements (including the General Data Privacy
93
+ Regulation (Regulation (EU) 2016/679), the California Consumer Privacy Act,
94
+ and any and all laws governing the processing of biometric information), as
95
+ well as all amendments and successor laws to any of the foregoing;
96
+
97
+ b. alter or remove copyright and other proprietary notices which appear on or
98
+ in the Software Products;
99
+
100
+ c. utilize any equipment, device, software, or other means to circumvent or
101
+ remove any security or protection used by Stability AI in connection with the
102
+ Software, or to circumvent or remove any usage restrictions, or to enable
103
+ functionality disabled by Stability AI; or
104
+
105
+ d. offer or impose any terms on the Software Products that alter, restrict, or
106
+ are inconsistent with the terms of this License.
107
+
108
+ e. 1) violate any applicable U.S. and non-U.S. export control and trade
109
+ sanctions laws (“Export Laws”); 2) directly or indirectly export, re-export,
110
+ provide, or otherwise transfer Software Products: (a) to any individual,
111
+ entity, or country prohibited by Export Laws; (b) to anyone on U.S. or
112
+ non-U.S. government restricted parties lists; or (c) for any purpose
113
+ prohibited by Export Laws, including nuclear, chemical or biological weapons,
114
+ or missile technology applications; 3) use or download Software Products if
115
+ you or they are: (a) located in a comprehensively sanctioned jurisdiction, (b)
116
+ currently listed on any U.S. or non-U.S. restricted parties list, or (c) for
117
+ any purpose prohibited by Export Laws; and (4) will not disguise your location
118
+ through IP proxying or other methods.
119
+
120
+
121
+ 3. ATTRIBUTION
122
+
123
+ Together with any copies of the Software Products (as well as derivative works
124
+ thereof or works incorporating the Software Products) that you distribute, you
125
+ must provide (i) a copy of this License, and (ii) the following attribution
126
+
127
+ notice: “SDXL 0.9 is licensed under the SDXL Research License, Copyright (c)
128
+ Stability AI Ltd. All Rights Reserved. FFusionXL-09-SDXL is developed and
129
+ maintained by FFusion.AI, a division of Source Code Bulgaria Ltd. All Rights
130
+ Reserved.”
131
+
132
+
133
+ 4. DISCLAIMERS
134
+
135
+ THE SOFTWARE PRODUCTS ARE PROVIDED “AS IS” AND “WITH ALL FAULTS” WITH NO
136
+ WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. STABILITY AI EXPRESSLY DISCLAIMS ALL
137
+ REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, WHETHER BY STATUTE,
138
+ CUSTOM, USAGE OR OTHERWISE AS TO ANY MATTERS RELATED TO THE SOFTWARE PRODUCTS,
139
+ INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
140
+ FITNESS FOR A PARTICULAR PURPOSE, TITLE, SATISFACTORY QUALITY, OR
141
+ NON-INFRINGEMENT. STABILITY AI MAKES NO WARRANTIES OR REPRESENTATIONS THAT THE
142
+ SOFTWARE PRODUCTS WILL BE ERROR FREE OR FREE OF VIRUSES OR OTHER HARMFUL
143
+ COMPONENTS, OR PRODUCE ANY PARTICULAR RESULTS.
144
+
145
+
146
+ 5. LIMITATION OF LIABILITY
147
+
148
+ TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL STABILITY AI BE
149
+ LIABLE TO YOU (A) UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT,
150
+ TORT, NEGLIGENCE, STRICT LIABILITY, WARRANTY, OR OTHERWISE UNDER THIS LICENSE,
151
+ OR (B) FOR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, PUNITIVE OR
152
+ SPECIAL DAMAGES OR LOST PROFITS, EVEN IF STABILITY AI HAS BEEN ADVISED OF THE
153
+ POSSIBILITY OF SUCH DAMAGES. THE SOFTWARE PRODUCTS, THEIR CONSTITUENT
154
+ COMPONENTS, AND ANY OUTPUT (COLLECTIVELY, “SOFTWARE MATERIALS”) ARE NOT
155
+ DESIGNED OR INTENDED FOR USE IN ANY APPLICATION OR SITUATION WHERE FAILURE OR
156
+ FAULT OF THE SOFTWARE MATERIALS COULD REASONABLY BE ANTICIPATED TO LEAD TO
157
+ SERIOUS INJURY OF ANY PERSON, INCLUDING POTENTIAL DISCRIMINATION OR VIOLATION
158
+ OF AN INDIVIDUAL’S PRIVACY RIGHTS, OR TO SEVERE PHYSICAL, PROPERTY, OR
159
+ ENVIRONMENTAL DAMAGE (EACH, A “HIGH-RISK USE”). IF YOU ELECT TO USE ANY OF THE
160
+ SOFTWARE MATERIALS FOR A HIGH-RISK USE, YOU DO SO AT YOUR OWN RISK. YOU AGREE
161
+ TO DESIGN AND IMPLEMENT APPROPRIATE DECISION-MAKING AND RISK-MITIGATION
162
+ PROCEDURES AND POLICIES IN CONNECTION WITH A HIGH-RISK USE SUCH THAT EVEN IF
163
+ THERE IS A FAILURE OR FAULT IN ANY OF THE SOFTWARE MATERIALS, THE SAFETY OF
164
+ PERSONS OR PROPERTY AFFECTED BY THE ACTIVITY STAYS AT A LEVEL THAT IS
165
+ REASONABLE, APPROPRIATE, AND LAWFUL FOR THE FIELD OF THE HIGH-RISK USE.
166
+
167
+
168
+ 6. INDEMNIFICATION
169
+
170
+ You will indemnify, defend and hold harmless Stability AI and our subsidiaries
171
+ and affiliates, and each of our respective shareholders, directors, officers,
172
+ employees, agents, successors, and assigns (collectively, the “Stability AI
173
+ Parties”) from and against any losses, liabilities, damages, fines, penalties,
174
+ and expenses (including reasonable attorneys’ fees) incurred by any Stability
175
+ AI Party in connection with any claim, demand, allegation, lawsuit,
176
+ proceeding, or investigation (collectively, “Claims”) arising out of or
177
+ related to: (a) your access to or use of the Software Products (as well as any
178
+ results or data generated from such access or use), including any High-Risk
179
+ Use (defined below); (b) your violation of this License; or (c) your
180
+ violation, misappropriation or infringement of any rights of another
181
+ (including intellectual property or other proprietary rights and privacy
182
+ rights). You will promptly notify the Stability AI Parties of any such Claims,
183
+ and cooperate with Stability AI Parties in defending such Claims. You will
184
+ also grant the Stability AI Parties sole control of the defense or settlement,
185
+ at Stability AI’s sole option, of any Claims. This indemnity is in addition
186
+ to, and not in lieu of, any other indemnities or remedies set forth in a
187
+ written agreement between you and Stability AI or the other Stability AI
188
+ Parties.
189
+
190
+
191
+ 7. TERMINATION; SURVIVAL
192
+
193
+ a. This License will automatically terminate upon any breach by you of the
194
+ terms of this License.
195
+
196
+ b. We may terminate this License, in whole or in part, at any time upon notice
197
+ (including electronic) to you.
198
+
199
+ c. The following sections survive termination of this License: 2
200
+ (Restrictions), 3 (Attribution), 4 (Disclaimers), 5 (Limitation on Liability),
201
+ 6 (Indemnification) 7 (Termination; Survival), 8 (Third Party Materials), 9
202
+ (Trademarks), 10 (Applicable Law; Dispute Resolution), and 11 (Miscellaneous).
203
+
204
+
205
+ 8. THIRD PARTY MATERIALS
206
+
207
+ The Software Products may contain third-party software or other components
208
+ (including free and open source software) (all of the foregoing, “Third Party
209
+ Materials”), which are subject to the license terms of the respective
210
+ third-party licensors. Your dealings or correspondence with third parties and
211
+ your use of or interaction with any Third Party Materials are solely between
212
+ you and the third party. Stability AI does not control or endorse, and makes
213
+ no representations or warranties regarding, any Third Party Materials, and
214
+ your access to and use of such Third Party Materials are at your own risk.
215
+
216
+
217
+ 9. TRADEMARKS
218
+
219
+ Licensee has not been granted any trademark license as part of this License
220
+ and may not use any name or mark associated with Stability AI without the
221
+ prior written permission of Stability AI, except to the extent necessary to
222
+ make the reference required by the “ATTRIBUTION” section of this Agreement.
223
+
224
+
225
+ 10. APPLICABLE LAW; DISPUTE RESOLUTION
226
+
227
+ This License will be governed and construed under the laws of the State of
228
+ California without regard to conflicts of law provisions. Any suit or
229
+ proceeding arising out of or relating to this License will be brought in the
230
+ federal or state courts, as applicable, in San Mateo County, California, and
231
+ each party irrevocably submits to the jurisdiction and venue of such courts.
232
+
233
+
234
+ 11. MISCELLANEOUS
235
+
236
+ If any provision or part of a provision of this License is unlawful, void or
237
+ unenforceable, that provision or part of the provision is deemed severed from
238
+ this License, and will not affect the validity and enforceability of any
239
+ remaining provisions. The failure of Stability AI to exercise or enforce any
240
+ right or provision of this License will not operate as a waiver of such right
241
+ or provision. This License does not confer any third-party beneficiary rights
242
+ upon any other person or entity. This License, together with the
243
+ Documentation, contains the entire understanding between you and Stability AI
244
+ regarding the subject matter of this License, and supersedes all other written
245
+ or oral agreements and understandings between you and Stability AI regarding
246
+ such subject matter. No change or addition to any provision of this License
247
+ will be binding unless it is in writing and signed by an authorized
248
+ representative of both you and Stability AI.
249
+
250
+ 12.ADDITIONAL TERMS FOR FFUSION.AI
251
+
252
+ In addition to the terms set forth above, the following terms apply specifically
253
+ to the FFusionXL-09-SDXL model developed by FFusion.AI, a division of Source
254
+ Code Bulgaria Ltd:
255
+
256
+ a. Any use of the FFusionXL-09-SDXL model must include proper attribution to
257
+ FFusion.AI and Source Code Bulgaria Ltd. in any publication or public work that
258
+ includes results achieved by or data generated by the model.
259
+
260
+ b. The FFusionXL-09-SDXL model is provided for non-commercial research purposes
261
+ only. Any commercial use requires a separate license agreement with Source Code
262
+ Bulgaria Ltd.
263
+
264
+ c. You may not reverse engineer, decompile, or disassemble the FFusionXL-09-SDXL
265
+ model.
266
+
267
+ d. You agree to indemnify and hold harmless Source Code Bulgaria Ltd. and its
268
+ affiliates from any claims, damages, liabilities, costs, losses, and expenses
269
+ (including reasonable attorney's fees) arising out of your use of the
270
+ FFusionXL-09-SDXL model.
271
+ extra_gated_heading: FFXL Researcher Preliminary Access License Agreement
272
+ extra_gated_description: FFXL-SDXL 0.9 RESEARCH LICENSE AGREEMENT
273
+ extra_gated_button_content: Submit application
274
+ extra_gated_fields:
275
+ "Organization or Personal Alias": text
276
+ "Nature of research(optional)": text
277
+ "Personal researcher link (Civitai, website, github, HF)": text
278
+ "Further Information (Feel free to provide additional details)": text
279
+ "I acknowledge the license agreement stated above and pledge to utilize the Software strictly for non-commercial research": checkbox
280
+
281
+ ---
282
+
283
+ # FFXL Model Card
284
+
285
+ ## Model
286
+
287
+
288
+ FFXL consists of a two-step pipeline for latent diffusion:
289
+ First, we use a base model to generate latents of the desired output size.
290
+ In the second step, we use a specialized high-resolution model and apply a technique called SDEdit (https://arxiv.org/abs/2108.01073, also known as "img2img")
291
+ to the latents generated in the first step, using the same prompt.
292
+
293
+ ### Model Description
294
+
295
+ - **Developed by:** FFusion AI
296
+ - **Model type:** Diffusion-based text-to-image generative model
297
+ - **License:** [FFXL Research License](https://huggingface.co/FFusion/FFusionXL-09-SDXL/blob/main/LICENSE.md)
298
+ - **Model Description:** This is a model 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)).
299
+ - **Resources for more information:** [FFXL paper on arXiv](https://arxiv.org/abs/2307.01952).
300
+
301
+ ### Model Sources
302
+
303
+ - **Repository:** soon
304
+ - **Demo [optional]:** soon
305
+
306
+ ### 🧨 Diffusers
307
+
308
+ Make sure to upgrade diffusers to >= 0.18.0:
309
+ ```
310
+ pip install diffusers --upgrade
311
+ ```
312
+
313
+ In addition make sure to install `transformers`, `safetensors`, `accelerate` as well as the invisible watermark:
314
+ ```
315
+ pip install invisible_watermark transformers accelerate safetensors
316
+ ```
317
+
318
+ You can use the model then as follows
319
+ ```py
320
+ from diffusers import DiffusionPipeline
321
+ import torch
322
+
323
+ pipe = DiffusionPipeline.from_pretrained("FFusion/FFusionXL-09-SDXL", torch_dtype=torch.float16, use_safetensors=True, variant="fp16")
324
+ pipe.to("cuda")
325
+
326
+ # if using torch < 2.0
327
+ # pipe.enable_xformers_memory_efficient_attention()
328
+
329
+ prompt = "An astronaut riding a green horse"
330
+
331
+ images = pipe(prompt=prompt).images[0]
332
+ ```
333
+
334
+ When using `torch >= 2.0`, you can improve the inference speed by 20-30% with torch.compile. Simple wrap the unet with torch compile before running the pipeline:
335
+ ```py
336
+ pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
337
+ ```
338
+
339
+ If you are limited by GPU VRAM, you can enable *cpu offloading* by calling `pipe.enable_model_cpu_offload`
340
+ instead of `.to("cuda")`:
341
+
342
+ ```diff
343
+ - pipe.to("cuda")
344
+ + pipe.enable_model_cpu_offload()
345
+ ```
346
+
347
+ ## Uses
348
+
349
+ ### Direct Use
350
+
351
+ The model is intended for research purposes only. Possible research areas and tasks include
352
+
353
+ - Generation of artworks and use in design and other artistic processes.
354
+ - Applications in educational or creative tools.
355
+ - Research on generative models.
356
+ - Safe deployment of models which have the potential to generate harmful content.
357
+ - Probing and understanding the limitations and biases of generative models.
358
+
359
+ Excluded uses are described below.
360
+
361
+ ### Out-of-Scope Use
362
+
363
+ The model was not trained to be factual or true representations of people or events, and therefore using the model to generate such content is out-of-scope for the abilities of this model.
364
+
365
+ ## Limitations and Bias
366
+
367
+ ### Limitations
368
+
369
+ - The model does not achieve perfect photorealism
370
+ - The model cannot render legible text
371
+ - The model struggles with more difficult tasks which involve compositionality, such as rendering an image corresponding to “A red cube on top of a blue sphere”
372
+ - Faces and people in general may not be generated properly.
373
+ - The autoencoding part of the model is lossy.
374
+
375
+ ### Bias
376
+ While the capabilities of image generation models are impressive, they can also reinforce or exacerbate social biases.
377
+
378
+ **Attribution:**
379
+
380
+ "SDXL 0.9 is licensed under the SDXL Research License, Copyright (c) Stability AI Ltd. All Rights Reserved."
381
+ [FFXL 0.9 Research License](https://huggingface.co/FFusion/FFusionXL-09-SDXL/blob/main/LICENSE.md)"
382
+ ## License
383
+
384
+ [SDXL 0.9 Research License](https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/blob/main/LICENSE.md)"
385
+
386
+
387
+
388
+
389
+ [![Email](https://img.shields.io/badge/Email-di%40ffusion.ai-blue?style=for-the-badge&logo=gmail)](mailto:[email protected])
390
+
391
+