Upload 17 files
Browse files- LICENSE +152 -0
- LICENSE_INHERIT +42 -0
- README.md +275 -0
- feature_extractor/preprocessor_config.json +44 -0
- image_encoder/config.json +23 -0
- image_encoder/model.safetensors +3 -0
- model_index.json +30 -0
- prior/config.json +64 -0
- prior/diffusion_pytorch_model.safetensors +3 -0
- scheduler/scheduler_config.json +6 -0
- text_encoder/config.json +25 -0
- text_encoder/model.safetensors +3 -0
- tokenizer/merges.txt +0 -0
- tokenizer/special_tokens_map.json +30 -0
- tokenizer/tokenizer.json +0 -0
- tokenizer/tokenizer_config.json +30 -0
- tokenizer/vocab.json +0 -0
LICENSE
ADDED
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Fair AI Public License 1.0-SD
|
2 |
+
|
3 |
+
Published by the [Freedom of Development Project](https://freedevproject.org).
|
4 |
+
|
5 |
+
*This "SD variant" license contains a [Prohibited Uses](#prohibited-uses)
|
6 |
+
section designed to be compatible with Stable Diffusion's license. Because of
|
7 |
+
that section, this is not a free software license. Unless you are releasing a
|
8 |
+
derivative of a Stable Diffusion model, it is not recommended that you use this
|
9 |
+
license.*
|
10 |
+
|
11 |
+
*This license comes with special requirements if you intend to allow users
|
12 |
+
to access this software over a network. See [Notices](#notices) for more
|
13 |
+
information.*
|
14 |
+
|
15 |
+
## Purpose
|
16 |
+
This license gives everyone as much permission to work with this software as
|
17 |
+
possible, while protecting contributors from liability, protecting the
|
18 |
+
freedom of end users, and reducing harm.
|
19 |
+
|
20 |
+
## Definitions
|
21 |
+
In this license, "model" refers to machine learning model weights, biases,
|
22 |
+
parameters, optimizer states, and any byproducts of a training or pretraining
|
23 |
+
process, whether in the form of checkpoints or any other form.
|
24 |
+
|
25 |
+
The term "derived model" refers to any model based on this model.
|
26 |
+
|
27 |
+
The term "software" also refers to any model along with documentation or
|
28 |
+
other resources provided with the software.
|
29 |
+
|
30 |
+
The term "source code" refers to the preferred form of making modifications
|
31 |
+
to software. It also includes any models, if applicable, but it does not
|
32 |
+
include any datasets used to train a model.
|
33 |
+
|
34 |
+
To "modify" also means to perform any training on a model or to combine a
|
35 |
+
model with another model.
|
36 |
+
|
37 |
+
## Acceptance
|
38 |
+
In order to receive this license, you must agree to its rules. The rules of
|
39 |
+
this license are both obligations under that agreement and conditions to your
|
40 |
+
license. You must not do anything with this software that triggers a rule that
|
41 |
+
you cannot or will not follow. If you do not agree, then you cannot use this
|
42 |
+
software in any way.
|
43 |
+
|
44 |
+
## Copyright
|
45 |
+
Each contributor licenses you to do everything with this software that would
|
46 |
+
otherwise infringe that contributor's copyright in it.
|
47 |
+
|
48 |
+
## Freedom
|
49 |
+
Neither this software nor any work that is combined with this software will be
|
50 |
+
considered a technological protection measure under the WIPO Copyright Treaty
|
51 |
+
or any similar law. Reverse engineering of this software and of any work that
|
52 |
+
is combined with this software is always allowed.
|
53 |
+
|
54 |
+
## Notices
|
55 |
+
You must ensure that everyone who gets a copy of any part of this software from
|
56 |
+
you, with or without changes, also gets the text of this license along with
|
57 |
+
the corresponding source code.
|
58 |
+
|
59 |
+
If you modify this software and allow users to interact with it through a
|
60 |
+
computer network, you must ensure they have a reasonable way to receive the
|
61 |
+
corresponding source code from you, whether that is via a download link or a
|
62 |
+
prominent written offer. As a special case, if you are only allowing users to
|
63 |
+
interact with a derived model, then you may choose to provide a download link
|
64 |
+
or written offer only for the derived model.
|
65 |
+
|
66 |
+
This software, all source code, and all modifications must be provided under
|
67 |
+
this license or another license that allows everything this license allows.
|
68 |
+
Note that this does not give you permission to change the license for this
|
69 |
+
software.
|
70 |
+
|
71 |
+
## Excuse
|
72 |
+
If anyone notifies you in writing that you have not complied with
|
73 |
+
[Notices](#notices), you can keep your license by taking all practical steps
|
74 |
+
to comply within 30 days after the notice. If you do not do so, your license
|
75 |
+
ends immediately.
|
76 |
+
|
77 |
+
## Output
|
78 |
+
The output of this software is not covered by this license, and no contributor
|
79 |
+
claims any rights to it.
|
80 |
+
|
81 |
+
## Patent
|
82 |
+
Each contributor licenses you to do everything with this software that would
|
83 |
+
otherwise infringe any patent claims they can license or become able to license.
|
84 |
+
|
85 |
+
## Reliability
|
86 |
+
No contributor can revoke this license.
|
87 |
+
|
88 |
+
## Alternatives
|
89 |
+
You can also use any non-model parts of this software under the terms of the
|
90 |
+
GNU AGPL 3.0, or any later version of that license. If you do,
|
91 |
+
[No Harm](#no-harm) and [No Liability](#no-liability) still apply.
|
92 |
+
|
93 |
+
## Revisions
|
94 |
+
The Freedom of Development Project may publish revised or new versions of the
|
95 |
+
Fair AI Public License. Those new versions will be similar in spirit to this
|
96 |
+
license.
|
97 |
+
|
98 |
+
Unless a contributor specifies otherwise, you have the option of following the
|
99 |
+
terms of any later version of this license. Your choice to follow a later
|
100 |
+
version of the license will not impose additional obligations on any
|
101 |
+
contributor. Even if you do choose to follow a later version, the restrictions
|
102 |
+
of [Prohibited Uses](#prohibited-uses) will still apply.
|
103 |
+
|
104 |
+
## Survival
|
105 |
+
The provisions of [No Harm](#no-harm) and [No Liability](#no-liability) survive
|
106 |
+
the end of your license.
|
107 |
+
|
108 |
+
## No Harm
|
109 |
+
You agree that no contributor's conduct in the creation of this software has
|
110 |
+
caused you any harm. As far as the law allows, you give up your right to pursue
|
111 |
+
any kind of legal claim against any contributor for actions related the
|
112 |
+
creation of this software, even if those actions broke a previous agreement.
|
113 |
+
|
114 |
+
Additionally, you agree not to use this model for harmful purposes, as listed
|
115 |
+
in [Prohibited Uses](#prohibited-uses). These restrictions do not apply to
|
116 |
+
non-model parts of this software.
|
117 |
+
|
118 |
+
## No Liability
|
119 |
+
***As far as the law allows, this software comes as is, without any warranty or
|
120 |
+
condition, and no contributor will be liable to anyone for any damages related
|
121 |
+
to this software or this license, under any kind of legal claim.***
|
122 |
+
|
123 |
+
## Prohibited Uses
|
124 |
+
You may not use this model or any derived model for the following:
|
125 |
+
|
126 |
+
- In any way that violates any applicable national, federal, state, local or
|
127 |
+
international law or regulation;
|
128 |
+
- For the purpose of exploiting, harming or attempting to exploit or harm
|
129 |
+
minors in any way;
|
130 |
+
- To generate or disseminate verifiably false information and/or content with
|
131 |
+
the purpose of harming others;
|
132 |
+
- To generate or disseminate personal identifiable information that can be used
|
133 |
+
to harm an individual;
|
134 |
+
- To defame, disparage or otherwise harass others;
|
135 |
+
- For fully automated decision making that adversely impacts an individual’s
|
136 |
+
legal rights or otherwise creates or modifies a binding, enforceable obligation;
|
137 |
+
- For any use intended to or which has the effect of discriminating against or
|
138 |
+
harming individuals or groups based on online or offline social behavior or
|
139 |
+
known or predicted personal or personality characteristics;
|
140 |
+
- To exploit any of the vulnerabilities of a specific group of persons based on
|
141 |
+
their age, social, physical or mental characteristics, in order to materially
|
142 |
+
distort the behavior of a person pertaining to that group in a manner that
|
143 |
+
causes or is likely to cause that person or another person physical or
|
144 |
+
psychological harm;
|
145 |
+
- For any use intended to or which has the effect of discriminating against
|
146 |
+
individuals or groups based on legally protected characteristics or categories;
|
147 |
+
- To provide medical advice and medical results interpretation;
|
148 |
+
- To generate or disseminate information for the purpose to be used for
|
149 |
+
administration of justice, law enforcement, immigration or asylum processes,
|
150 |
+
such as predicting an individual will commit fraud/crime commitment (e.g. by
|
151 |
+
text profiling, drawing causal relationships between assertions made in
|
152 |
+
documents, indiscriminate and arbitrarily-targeted use).
|
LICENSE_INHERIT
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
STABILITY AI NON-COMMERCIAL RESEARCH COMMUNITY LICENSE AGREEMENT
|
2 |
+
Dated: November 28, 2023
|
3 |
+
|
4 |
+
By using or distributing any portion or element of the Models, Software, Software Products or Derivative Works, you agree to be bound by this Agreement.
|
5 |
+
|
6 |
+
"Agreement" means this Stable Non-Commercial Research Community License Agreement.
|
7 |
+
|
8 |
+
“AUP” means the Stability AI Acceptable Use Policy available at https://stability.ai/use-policy, as may be updated from time to time.
|
9 |
+
|
10 |
+
"Derivative Work(s)” means (a) any derivative work of the Software Products as recognized by U.S. copyright laws and (b) any modifications to a Model, and any other model created which is based on or derived from the Model or the Model’s output. For clarity, Derivative Works do not include the output of any Model.
|
11 |
+
|
12 |
+
“Documentation” means any specifications, manuals, documentation, and other written information provided by Stability AI related to the Software.
|
13 |
+
|
14 |
+
"Licensee" or "you" means you, or your employer or any other person or entity (if you are entering into this Agreement on such person or entity's behalf), of the age required under applicable laws, rules or regulations to provide legal consent and that has legal authority to bind your employer or such other person or entity if you are entering in this Agreement on their behalf.
|
15 |
+
|
16 |
+
“Model(s)" means, collectively, Stability AI’s proprietary models and algorithms, including machine-learning models, trained model weights and other elements of the foregoing, made available under this Agreement.
|
17 |
+
|
18 |
+
“Non-Commercial Uses” means exercising any of the rights granted herein for the purpose of research or non-commercial purposes. Non-Commercial Uses does not include any production use of the Software Products or any Derivative Works.
|
19 |
+
|
20 |
+
"Stability AI" or "we" means Stability AI Ltd. and its affiliates.
|
21 |
+
|
22 |
+
|
23 |
+
"Software" means Stability AI’s proprietary software made available under this Agreement.
|
24 |
+
|
25 |
+
“Software Products” means the Models, Software and Documentation, individually or in any combination.
|
26 |
+
|
27 |
+
|
28 |
+
|
29 |
+
1. License Rights and Redistribution.
|
30 |
+
a. Subject to your compliance with this Agreement, the AUP (which is hereby incorporated herein by reference), and the Documentation, Stability AI grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty free and limited license under Stability AI’s intellectual property or other rights owned or controlled by Stability AI embodied in the Software Products to use, reproduce, distribute, and create Derivative Works of, the Software Products, in each case for Non-Commercial Uses only.
|
31 |
+
b. You may not use the Software Products or Derivative Works to enable third parties to use the Software Products or Derivative Works as part of your hosted service or via your APIs, whether you are adding substantial additional functionality thereto or not. Merely distributing the Software Products or Derivative Works for download online without offering any related service (ex. by distributing the Models on HuggingFace) is not a violation of this subsection. If you wish to use the Software Products or any Derivative Works for commercial or production use or you wish to make the Software Products or any Derivative Works available to third parties via your hosted service or your APIs, contact Stability AI at https://stability.ai/contact.
|
32 |
+
c. If you distribute or make the Software Products, or any Derivative Works thereof, available to a third party, the Software Products, Derivative Works, or any portion thereof, respectively, will remain subject to this Agreement and you must (i) provide a copy of this Agreement to such third party, and (ii) retain the following attribution notice within a "Notice" text file distributed as a part of such copies: "This Stability AI Model is licensed under the Stability AI Non-Commercial Research Community License, Copyright (c) Stability AI Ltd. All Rights Reserved.” If you create a Derivative Work of a Software Product, you may add your own attribution notices to the Notice file included with the Software Product, provided that you clearly indicate which attributions apply to the Software Product and you must state in the NOTICE file that you changed the Software Product and how it was modified.
|
33 |
+
2. Disclaimer of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE SOFTWARE PRODUCTS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING OR REDISTRIBUTING THE SOFTWARE PRODUCTS, DERIVATIVE WORKS OR ANY OUTPUT OR RESULTS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE SOFTWARE PRODUCTS, DERIVATIVE WORKS AND ANY OUTPUT AND RESULTS.
|
34 |
+
3. Limitation of Liability. IN NO EVENT WILL STABILITY AI OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF STABILITY AI OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
|
35 |
+
4. Intellectual Property.
|
36 |
+
a. No trademark licenses are granted under this Agreement, and in connection with the Software Products or Derivative Works, neither Stability AI nor Licensee may use any name or mark owned by or associated with the other or any of its affiliates, except as required for reasonable and customary use in describing and redistributing the Software Products or Derivative Works.
|
37 |
+
b. Subject to Stability AI’s ownership of the Software Products and Derivative Works made by or for Stability AI, with respect to any Derivative Works that are made by you, as between you and Stability AI, you are and will be the owner of such Derivative Works
|
38 |
+
c. If you institute litigation or other proceedings against Stability AI (including a cross-claim or counterclaim in a lawsuit) alleging that the Software Products, Derivative Works or associated outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by you, then any licenses granted to you under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Stability AI from and against any claim by any third party arising out of or related to your use or distribution of the Software Products or Derivative Works in violation of this Agreement.
|
39 |
+
5. Term and Termination. The term of this Agreement will commence upon your acceptance of this Agreement or access to the Software Products and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Stability AI may terminate this Agreement if you are in breach of any term or condition of this Agreement. Upon termination of this Agreement, you shall delete and cease use of any Software Products or Derivative Works. Sections 2-4 shall survive the termination of this Agreement.
|
40 |
+
|
41 |
+
6. Governing Law. This Agreement will be governed by and construed in accordance with the laws of the United States and the State of California without regard to choice of law
|
42 |
+
principles.
|
README.md
ADDED
@@ -0,0 +1,275 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
pipeline_tag: text-to-image
|
3 |
+
license: other
|
4 |
+
license_name: faipl-1.0-sd
|
5 |
+
license_link: LICENSE
|
6 |
+
decoder:
|
7 |
+
- Disty0/sotediffusion-wuerstchen3-decoder
|
8 |
+
---
|
9 |
+
|
10 |
+
|
11 |
+
# SoteDiffusion Wuerstchen3
|
12 |
+
|
13 |
+
Anime finetune of Würstchen V3.
|
14 |
+
Still in active training.
|
15 |
+
No commercial use.
|
16 |
+
|
17 |
+
# Release Notes
|
18 |
+
|
19 |
+
- This release is sponsored by Fal.AI
|
20 |
+
- Trained on 6M images for 3 epochs using 8x A100 GPUs.
|
21 |
+
|
22 |
+
<style>
|
23 |
+
.image {
|
24 |
+
float: left;
|
25 |
+
margin-left: 10px;
|
26 |
+
}
|
27 |
+
</style>
|
28 |
+
|
29 |
+
<table>
|
30 |
+
<img class="image" src="placeholder">
|
31 |
+
<img class="image" src="placeholder">
|
32 |
+
</table>
|
33 |
+
|
34 |
+
# API Usage
|
35 |
+
|
36 |
+
This model can be used via API with Fal.AI
|
37 |
+
For more details: https://fal.ai/models/fal-ai/stable-cascade/sote-diffusion
|
38 |
+
|
39 |
+
# UI Guide
|
40 |
+
|
41 |
+
## SD.Next
|
42 |
+
URL: https://github.com/vladmandic/automatic/
|
43 |
+
|
44 |
+
Go to Models -> Huggingface and type `Disty0/sotediffusion-wuerstchen3-decoder` into the model name and press download.
|
45 |
+
Load `Disty0/sotediffusion-wuerstchen3-decoder` after the download process is complete.
|
46 |
+
|
47 |
+
Prompt:
|
48 |
+
```
|
49 |
+
newest, extremely aesthetic, best quality,
|
50 |
+
```
|
51 |
+
|
52 |
+
Negative Prompt:
|
53 |
+
```
|
54 |
+
very displeasing, worst quality, monochrome, realistic, oldest, loli,
|
55 |
+
```
|
56 |
+
|
57 |
+
Parameters:
|
58 |
+
Sampler: Default
|
59 |
+
|
60 |
+
Steps: 30 or 40
|
61 |
+
Refiner Steps: 10
|
62 |
+
|
63 |
+
CFG: 7
|
64 |
+
Secondary CFG: 2 or 1
|
65 |
+
|
66 |
+
Resolution: 1024x1536, 2048x1152
|
67 |
+
Anything works as long as it's a multiply of 128.
|
68 |
+
|
69 |
+
|
70 |
+
## ComfyUI
|
71 |
+
|
72 |
+
Please refer to CivitAI: https://civitai.com/models/353284
|
73 |
+
|
74 |
+
|
75 |
+
# Code Example
|
76 |
+
|
77 |
+
```shell
|
78 |
+
pip install diffusers
|
79 |
+
```
|
80 |
+
|
81 |
+
```python
|
82 |
+
import torch
|
83 |
+
from diffusers import StableCascadeCombinedPipeline
|
84 |
+
|
85 |
+
device = "cuda"
|
86 |
+
dtype = torch.bfloat16 # or torch.float16
|
87 |
+
model = "Disty0/sotediffusion-wuerstchen3-decoder"
|
88 |
+
|
89 |
+
pipe = StableCascadeCombinedPipeline.from_pretrained(model, torch_dtype=dtype)
|
90 |
+
|
91 |
+
# send everything to the gpu:
|
92 |
+
pipe = pipe.to(device, dtype=dtype)
|
93 |
+
pipe.prior_pipe = pipe.prior_pipe.to(device, dtype=dtype)
|
94 |
+
|
95 |
+
# or enable model offload to save vram:
|
96 |
+
# pipe.enable_model_cpu_offload()
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
prompt = "newest, extremely aesthetic, best quality, 1girl, solo, cat ears, pink hair, orange eyes, long hair, bare shoulders, looking at viewer, smile, indoors, casual, living room, playing guitar,"
|
101 |
+
negative_prompt = "very displeasing, worst quality, monochrome, realistic, oldest, loli,"
|
102 |
+
output = pipe(
|
103 |
+
width=1024,
|
104 |
+
height=1536,
|
105 |
+
prompt=prompt,
|
106 |
+
negative_prompt=negative_prompt,
|
107 |
+
decoder_guidance_scale=2.0,
|
108 |
+
prior_guidance_scale=8.0,
|
109 |
+
prior_num_inference_steps=40,
|
110 |
+
output_type="pil",
|
111 |
+
num_inference_steps=10
|
112 |
+
).images[0]
|
113 |
+
|
114 |
+
## do something with the output image
|
115 |
+
```
|
116 |
+
|
117 |
+
## Training:
|
118 |
+
**Software used**: Kohya SD-Scripts with Stable Cascade branch.
|
119 |
+
https://github.com/kohya-ss/sd-scripts/tree/stable-cascade
|
120 |
+
|
121 |
+
**Base model**: Disty0/sote-diffusion-cascade-alpha3
|
122 |
+
|
123 |
+
**GPU used for captioning**: 8x Nvidia A100 80GB
|
124 |
+
**GPU Hours**: 220
|
125 |
+
|
126 |
+
### Base
|
127 |
+
| parameter | value |
|
128 |
+
|---|---|
|
129 |
+
| **amp** | bf16 |
|
130 |
+
| **weights** | fp32 |
|
131 |
+
| **save weights** | fp16 |
|
132 |
+
| **resolution** | 1024x1024 |
|
133 |
+
| **effective batch size** | 128 |
|
134 |
+
| **unet learning rate** | 1e-5 |
|
135 |
+
| **te learning rate** | 4e-6 |
|
136 |
+
| **optimizer** | Adafactor |
|
137 |
+
| **images** | 6M |
|
138 |
+
| **epochs** | 3 |
|
139 |
+
|
140 |
+
### Final
|
141 |
+
|
142 |
+
| parameter | value |
|
143 |
+
|---|---|
|
144 |
+
| **amp** | bf16 |
|
145 |
+
| **weights** | fp32 |
|
146 |
+
| **save weights** | fp16 |
|
147 |
+
| **resolution** | 1024x1024 |
|
148 |
+
| **effective batch size** | 128 |
|
149 |
+
| **unet learning rate** | 4e-6 |
|
150 |
+
| **te learning rate** | none |
|
151 |
+
| **optimizer** | Adafactor |
|
152 |
+
| **images** | 120K |
|
153 |
+
| **epochs** | 16 |
|
154 |
+
|
155 |
+
## Dataset:
|
156 |
+
|
157 |
+
**GPU used for captioning**: 1x Intel ARC A770 16GB
|
158 |
+
**GPU Hours**: 350
|
159 |
+
|
160 |
+
**Model used for captioning**: SmilingWolf/wd-swinv2-tagger-v3
|
161 |
+
**Command:**
|
162 |
+
```
|
163 |
+
python /mnt/DataSSD/AI/Apps/kohya_ss/sd-scripts/finetune/tag_images_by_wd14_tagger.py --model_dir "/mnt/DataSSD/AI/models/wd14_tagger_model" --repo_id "SmilingWolf/wd-swinv2-tagger-v3" --recursive --remove_underscore --use_rating_tags --character_tags_first --character_tag_expand --append_tags --onnx --caption_separator ", " --general_threshold 0.35 --character_threshold 0.50 --batch_size 4 --caption_extension ".txt" ./
|
164 |
+
```
|
165 |
+
|
166 |
+
|
167 |
+
| dataset name | total images |
|
168 |
+
|---|---|
|
169 |
+
| **newest** | 1.848.331 |
|
170 |
+
| **recent** | 1.380.630 |
|
171 |
+
| **mid** | 993.227 |
|
172 |
+
| **early** | 566.152 |
|
173 |
+
| **oldest** | 160.397 |
|
174 |
+
| **pixiv** | 343.614 |
|
175 |
+
| **visual novel cg** | 231.358 |
|
176 |
+
| **anime wallpaper** | 104.790 |
|
177 |
+
| **Total** | 5.628.499 |
|
178 |
+
|
179 |
+
Around 120K very high quality images got intentionally duplicated 5 times.
|
180 |
+
|
181 |
+
**Note**:
|
182 |
+
- Smallest size is 1280x600 | 768.000 pixels
|
183 |
+
- Deduped based on image similarity using czkawka-cli
|
184 |
+
|
185 |
+
|
186 |
+
## Tags:
|
187 |
+
|
188 |
+
Model is trained with random tag order but this is the order in the dataset if you are interested:
|
189 |
+
```
|
190 |
+
aesthetic tags, quality tags, date tags, custom tags, rating tags, character, series, rest of the tags
|
191 |
+
```
|
192 |
+
|
193 |
+
### Date:
|
194 |
+
|
195 |
+
| tag | date |
|
196 |
+
|---|---|
|
197 |
+
| **newest** | 2022 to 2024 |
|
198 |
+
| **recent** | 2019 to 2021 |
|
199 |
+
| **mid** | 2015 to 2018 |
|
200 |
+
| **early** | 2011 to 2014 |
|
201 |
+
| **oldest** | 2005 to 2010 |
|
202 |
+
|
203 |
+
### Aesthetic Tags:
|
204 |
+
**Model used**: shadowlilac/aesthetic-shadow-v2
|
205 |
+
|
206 |
+
| score greater than | tag | count |
|
207 |
+
|---|---|---|
|
208 |
+
| **0.90** | extremely aesthetic | 125.451 |
|
209 |
+
| **0.80** | very aesthetic | 887.382 |
|
210 |
+
| **0.70** | aesthetic | 1.049.857 |
|
211 |
+
| **0.50** | slightly aesthetic | 1.643.091 |
|
212 |
+
| **0.40** | not displeasing | 569.543 |
|
213 |
+
| **0.30** | not aesthetic | 445.188 |
|
214 |
+
| **0.20** | slightly displeasing | 341.424 |
|
215 |
+
| **0.10** | displeasing | 237.660 |
|
216 |
+
| **rest of them** | very displeasing | 328.712 |
|
217 |
+
|
218 |
+
### Quality Tags:
|
219 |
+
**Model used**: https://huggingface.co/hakurei/waifu-diffusion-v1-4/blob/main/models/aes-B32-v0.pth
|
220 |
+
|
221 |
+
| score greater than | tag | count |
|
222 |
+
|---|---|---|
|
223 |
+
| **0.980** | best quality | 1.270.447 |
|
224 |
+
| **0.900** | high quality | 498.244 |
|
225 |
+
| **0.750** | great quality | 351.006 |
|
226 |
+
| **0.500** | medium quality | 366.448 |
|
227 |
+
| **0.250** | normal quality | 368.380 |
|
228 |
+
| **0.125** | bad quality | 279.050 |
|
229 |
+
| **0.025** | low quality | 538.958 |
|
230 |
+
| **rest of them** | worst quality | 1.955.966 |
|
231 |
+
|
232 |
+
## Rating Tags
|
233 |
+
|
234 |
+
| tag | count |
|
235 |
+
|---|---|
|
236 |
+
| **general** | 1.416.451 |
|
237 |
+
| **sensitive** | 3.447.664 |
|
238 |
+
| **nsfw** | 427.459 |
|
239 |
+
| **explicit nsfw** | 336.925 |
|
240 |
+
|
241 |
+
## Custom Tags:
|
242 |
+
|
243 |
+
| dataset name | custom tag |
|
244 |
+
|---|---|
|
245 |
+
| **image boards** | date, |
|
246 |
+
| **characters** | character, series
|
247 |
+
| **pixiv** | art by Display_Name, |
|
248 |
+
| **visual novel cg** | Full_VN_Name (short_3_letter_name), visual novel cg, |
|
249 |
+
| **anime wallpaper** | date, anime wallpaper, |
|
250 |
+
|
251 |
+
|
252 |
+
## Limitations and Bias
|
253 |
+
|
254 |
+
### Bias
|
255 |
+
|
256 |
+
- This model is intended for anime illustrations.
|
257 |
+
Realistic capabilites are not tested at all.
|
258 |
+
|
259 |
+
### Limitations
|
260 |
+
|
261 |
+
- Can fall back to realistic.
|
262 |
+
Add "realistic" tag to the negatives when this happens.
|
263 |
+
- Far shot eyes and hands can be bad.
|
264 |
+
|
265 |
+
|
266 |
+
## License
|
267 |
+
|
268 |
+
SoteDiffusion models falls under [Fair AI Public License 1.0-SD](https://freedevproject.org/faipl-1.0-sd/) license, which is compatible with Stable Diffusion models’ license. Key points:
|
269 |
+
|
270 |
+
1. **Modification Sharing:** If you modify SoteDiffusion models, you must share both your changes and the original license.
|
271 |
+
2. **Source Code Accessibility:** If your modified version is network-accessible, provide a way (like a download link) for others to get the source code. This applies to derived models too.
|
272 |
+
3. **Distribution Terms:** Any distribution must be under this license or another with similar rules.
|
273 |
+
4. **Compliance:** Non-compliance must be fixed within 30 days to avoid license termination, emphasizing transparency and adherence to open-source values.
|
274 |
+
|
275 |
+
**Notes**: Anything not covered by Fair AI license is inherited from Stability AI Non-Commercial license which is named as LICENSE_INHERIT.
|
feature_extractor/preprocessor_config.json
ADDED
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_valid_processor_keys": [
|
3 |
+
"images",
|
4 |
+
"do_resize",
|
5 |
+
"size",
|
6 |
+
"resample",
|
7 |
+
"do_center_crop",
|
8 |
+
"crop_size",
|
9 |
+
"do_rescale",
|
10 |
+
"rescale_factor",
|
11 |
+
"do_normalize",
|
12 |
+
"image_mean",
|
13 |
+
"image_std",
|
14 |
+
"do_convert_rgb",
|
15 |
+
"return_tensors",
|
16 |
+
"data_format",
|
17 |
+
"input_data_format"
|
18 |
+
],
|
19 |
+
"crop_size": {
|
20 |
+
"height": 224,
|
21 |
+
"width": 224
|
22 |
+
},
|
23 |
+
"do_center_crop": true,
|
24 |
+
"do_convert_rgb": true,
|
25 |
+
"do_normalize": true,
|
26 |
+
"do_rescale": true,
|
27 |
+
"do_resize": true,
|
28 |
+
"image_mean": [
|
29 |
+
0.48145466,
|
30 |
+
0.4578275,
|
31 |
+
0.40821073
|
32 |
+
],
|
33 |
+
"image_processor_type": "CLIPImageProcessor",
|
34 |
+
"image_std": [
|
35 |
+
0.26862954,
|
36 |
+
0.26130258,
|
37 |
+
0.27577711
|
38 |
+
],
|
39 |
+
"resample": 3,
|
40 |
+
"rescale_factor": 0.00392156862745098,
|
41 |
+
"size": {
|
42 |
+
"shortest_edge": 224
|
43 |
+
}
|
44 |
+
}
|
image_encoder/config.json
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/home/disty/.cache/huggingface/hub/models--stabilityai--stable-cascade-prior/snapshots/7ca32c21c3b4d4e35bbb94fcfedfb4fa2259bd91/image_encoder",
|
3 |
+
"architectures": [
|
4 |
+
"CLIPVisionModelWithProjection"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"dropout": 0.0,
|
8 |
+
"hidden_act": "quick_gelu",
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"image_size": 224,
|
11 |
+
"initializer_factor": 1.0,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 4096,
|
14 |
+
"layer_norm_eps": 1e-05,
|
15 |
+
"model_type": "clip_vision_model",
|
16 |
+
"num_attention_heads": 16,
|
17 |
+
"num_channels": 3,
|
18 |
+
"num_hidden_layers": 24,
|
19 |
+
"patch_size": 14,
|
20 |
+
"projection_dim": 768,
|
21 |
+
"torch_dtype": "float16",
|
22 |
+
"transformers_version": "4.41.1"
|
23 |
+
}
|
image_encoder/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0dd0c1777bb75e2e9b7aa29b799b3ee8ebaaaa731e2c471a9ec589f12542cce7
|
3 |
+
size 607980096
|
model_index.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "StableCascadePriorPipeline",
|
3 |
+
"_diffusers_version": "0.28.2",
|
4 |
+
"_name_or_path": "stabilityai/stable-cascade-prior",
|
5 |
+
"feature_extractor": [
|
6 |
+
"transformers",
|
7 |
+
"CLIPImageProcessor"
|
8 |
+
],
|
9 |
+
"image_encoder": [
|
10 |
+
"transformers",
|
11 |
+
"CLIPVisionModelWithProjection"
|
12 |
+
],
|
13 |
+
"prior": [
|
14 |
+
"diffusers",
|
15 |
+
"StableCascadeUNet"
|
16 |
+
],
|
17 |
+
"resolution_multiple": 42.67,
|
18 |
+
"scheduler": [
|
19 |
+
"diffusers",
|
20 |
+
"DDPMWuerstchenScheduler"
|
21 |
+
],
|
22 |
+
"text_encoder": [
|
23 |
+
"transformers",
|
24 |
+
"CLIPTextModelWithProjection"
|
25 |
+
],
|
26 |
+
"tokenizer": [
|
27 |
+
"transformers",
|
28 |
+
"CLIPTokenizerFast"
|
29 |
+
]
|
30 |
+
}
|
prior/config.json
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "StableCascadeUNet",
|
3 |
+
"_diffusers_version": "0.28.2",
|
4 |
+
"block_out_channels": [
|
5 |
+
2048,
|
6 |
+
2048
|
7 |
+
],
|
8 |
+
"block_types_per_layer": [
|
9 |
+
[
|
10 |
+
"SDCascadeResBlock",
|
11 |
+
"SDCascadeTimestepBlock",
|
12 |
+
"SDCascadeAttnBlock"
|
13 |
+
],
|
14 |
+
[
|
15 |
+
"SDCascadeResBlock",
|
16 |
+
"SDCascadeTimestepBlock",
|
17 |
+
"SDCascadeAttnBlock"
|
18 |
+
]
|
19 |
+
],
|
20 |
+
"clip_image_in_channels": 768,
|
21 |
+
"clip_seq": 4,
|
22 |
+
"clip_text_in_channels": 1280,
|
23 |
+
"clip_text_pooled_in_channels": 1280,
|
24 |
+
"conditioning_dim": 2048,
|
25 |
+
"down_blocks_repeat_mappers": [
|
26 |
+
1,
|
27 |
+
1
|
28 |
+
],
|
29 |
+
"down_num_layers_per_block": [
|
30 |
+
8,
|
31 |
+
24
|
32 |
+
],
|
33 |
+
"dropout": [
|
34 |
+
0.1,
|
35 |
+
0.1
|
36 |
+
],
|
37 |
+
"effnet_in_channels": null,
|
38 |
+
"in_channels": 16,
|
39 |
+
"kernel_size": 3,
|
40 |
+
"num_attention_heads": [
|
41 |
+
32,
|
42 |
+
32
|
43 |
+
],
|
44 |
+
"out_channels": 16,
|
45 |
+
"patch_size": 1,
|
46 |
+
"pixel_mapper_in_channels": null,
|
47 |
+
"self_attn": true,
|
48 |
+
"switch_level": [
|
49 |
+
false
|
50 |
+
],
|
51 |
+
"timestep_conditioning_type": [
|
52 |
+
"sca",
|
53 |
+
"crp"
|
54 |
+
],
|
55 |
+
"timestep_ratio_embedding_dim": 64,
|
56 |
+
"up_blocks_repeat_mappers": [
|
57 |
+
1,
|
58 |
+
1
|
59 |
+
],
|
60 |
+
"up_num_layers_per_block": [
|
61 |
+
24,
|
62 |
+
8
|
63 |
+
]
|
64 |
+
}
|
prior/diffusion_pytorch_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a91b794e1a1751344ceb87e6667c141a2c0c8ea7746cf4af2c70a409ec9bb22a
|
3 |
+
size 7178376264
|
scheduler/scheduler_config.json
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_class_name": "DDPMWuerstchenScheduler",
|
3 |
+
"_diffusers_version": "0.28.2",
|
4 |
+
"s": 0.008,
|
5 |
+
"scaler": 1.0
|
6 |
+
}
|
text_encoder/config.json
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "Disty0/sotediffusion-wuerstchen3_text_encoder",
|
3 |
+
"architectures": [
|
4 |
+
"CLIPTextModelWithProjection"
|
5 |
+
],
|
6 |
+
"attention_dropout": 0.0,
|
7 |
+
"bos_token_id": 49406,
|
8 |
+
"dropout": 0.0,
|
9 |
+
"eos_token_id": 49407,
|
10 |
+
"hidden_act": "gelu",
|
11 |
+
"hidden_size": 1280,
|
12 |
+
"initializer_factor": 1.0,
|
13 |
+
"initializer_range": 0.02,
|
14 |
+
"intermediate_size": 5120,
|
15 |
+
"layer_norm_eps": 1e-05,
|
16 |
+
"max_position_embeddings": 77,
|
17 |
+
"model_type": "clip_text_model",
|
18 |
+
"num_attention_heads": 20,
|
19 |
+
"num_hidden_layers": 32,
|
20 |
+
"pad_token_id": 1,
|
21 |
+
"projection_dim": 1280,
|
22 |
+
"torch_dtype": "float16",
|
23 |
+
"transformers_version": "4.41.1",
|
24 |
+
"vocab_size": 49408
|
25 |
+
}
|
text_encoder/model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:aa33331a5693926ac7e3f55b0aa55220aa61cc8c8e75147694165987db824593
|
3 |
+
size 1389382176
|
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,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "<|endoftext|>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<|endoftext|>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
tokenizer/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer/tokenizer_config.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_prefix_space": false,
|
3 |
+
"added_tokens_decoder": {
|
4 |
+
"49406": {
|
5 |
+
"content": "<|startoftext|>",
|
6 |
+
"lstrip": false,
|
7 |
+
"normalized": true,
|
8 |
+
"rstrip": false,
|
9 |
+
"single_word": false,
|
10 |
+
"special": true
|
11 |
+
},
|
12 |
+
"49407": {
|
13 |
+
"content": "<|endoftext|>",
|
14 |
+
"lstrip": false,
|
15 |
+
"normalized": false,
|
16 |
+
"rstrip": false,
|
17 |
+
"single_word": false,
|
18 |
+
"special": true
|
19 |
+
}
|
20 |
+
},
|
21 |
+
"bos_token": "<|startoftext|>",
|
22 |
+
"clean_up_tokenization_spaces": true,
|
23 |
+
"do_lower_case": true,
|
24 |
+
"eos_token": "<|endoftext|>",
|
25 |
+
"errors": "replace",
|
26 |
+
"model_max_length": 77,
|
27 |
+
"pad_token": "<|endoftext|>",
|
28 |
+
"tokenizer_class": "CLIPTokenizer",
|
29 |
+
"unk_token": "<|endoftext|>"
|
30 |
+
}
|
tokenizer/vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|