Fluminato
Browse files- .fluminaignore +167 -0
- LICENSE +0 -81
- README.md +128 -15
- clone_weights.sh +1 -0
- data/README.md +0 -81
- data/ae.safetensors +0 -3
- data/model_index.json +0 -32
- data/scheduler/scheduler_config.json +0 -11
- data/text_encoder/config.json +0 -25
- data/text_encoder/model.safetensors +0 -3
- data/text_encoder_2/config.json +0 -32
- data/text_encoder_2/model-00001-of-00002.safetensors +0 -3
- data/text_encoder_2/model-00002-of-00002.safetensors +0 -3
- data/text_encoder_2/model.safetensors.index.json +0 -226
- data/tokenizer/merges.txt +0 -0
- data/tokenizer/special_tokens_map.json +0 -30
- data/tokenizer/tokenizer_config.json +0 -30
- data/tokenizer/vocab.json +0 -0
- data/tokenizer_2/special_tokens_map.json +0 -125
- data/tokenizer_2/spiece.model +0 -3
- data/tokenizer_2/tokenizer.json +0 -0
- data/tokenizer_2/tokenizer_config.json +0 -940
- data/transformer/config.json +0 -13
- data/transformer/diffusion_pytorch_model-00001-of-00003.safetensors +0 -3
- data/transformer/diffusion_pytorch_model-00002-of-00003.safetensors +0 -3
- data/transformer/diffusion_pytorch_model-00003-of-00003.safetensors +0 -3
- data/transformer/diffusion_pytorch_model.safetensors.index.json +0 -0
- data/vae/config.json +0 -37
- data/vae/diffusion_pytorch_model.safetensors +0 -3
- data/schnell_grid.jpeg → example.png +2 -2
- flumina.py +173 -52
- requirements.txt +1 -0
- output.png → t2i_output.png +2 -2
.fluminaignore
ADDED
@@ -0,0 +1,167 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.git/
|
2 |
+
.gitmodules
|
3 |
+
.gitattributes
|
4 |
+
data/.git/
|
5 |
+
|
6 |
+
# Byte-compiled / optimized / DLL files
|
7 |
+
__pycache__/
|
8 |
+
*.py[cod]
|
9 |
+
*$py.class
|
10 |
+
|
11 |
+
# C extensions
|
12 |
+
*.so
|
13 |
+
|
14 |
+
# Distribution / packaging
|
15 |
+
.Python
|
16 |
+
build/
|
17 |
+
develop-eggs/
|
18 |
+
dist/
|
19 |
+
downloads/
|
20 |
+
eggs/
|
21 |
+
.eggs/
|
22 |
+
lib/
|
23 |
+
lib64/
|
24 |
+
parts/
|
25 |
+
sdist/
|
26 |
+
var/
|
27 |
+
wheels/
|
28 |
+
share/python-wheels/
|
29 |
+
*.egg-info/
|
30 |
+
.installed.cfg
|
31 |
+
*.egg
|
32 |
+
MANIFEST
|
33 |
+
|
34 |
+
# PyInstaller
|
35 |
+
# Usually these files are written by a python script from a template
|
36 |
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
37 |
+
*.manifest
|
38 |
+
*.spec
|
39 |
+
|
40 |
+
# Installer logs
|
41 |
+
pip-log.txt
|
42 |
+
pip-delete-this-directory.txt
|
43 |
+
|
44 |
+
# Unit test / coverage reports
|
45 |
+
htmlcov/
|
46 |
+
.tox/
|
47 |
+
.nox/
|
48 |
+
.coverage
|
49 |
+
.coverage.*
|
50 |
+
.cache
|
51 |
+
nosetests.xml
|
52 |
+
coverage.xml
|
53 |
+
*.cover
|
54 |
+
*.py,cover
|
55 |
+
.hypothesis/
|
56 |
+
.pytest_cache/
|
57 |
+
cover/
|
58 |
+
|
59 |
+
# Translations
|
60 |
+
*.mo
|
61 |
+
*.pot
|
62 |
+
|
63 |
+
# Django stuff:
|
64 |
+
*.log
|
65 |
+
local_settings.py
|
66 |
+
db.sqlite3
|
67 |
+
db.sqlite3-journal
|
68 |
+
|
69 |
+
# Flask stuff:
|
70 |
+
instance/
|
71 |
+
.webassets-cache
|
72 |
+
|
73 |
+
# Scrapy stuff:
|
74 |
+
.scrapy
|
75 |
+
|
76 |
+
# Sphinx documentation
|
77 |
+
docs/_build/
|
78 |
+
|
79 |
+
# PyBuilder
|
80 |
+
.pybuilder/
|
81 |
+
target/
|
82 |
+
|
83 |
+
# Jupyter Notebook
|
84 |
+
.ipynb_checkpoints
|
85 |
+
|
86 |
+
# IPython
|
87 |
+
profile_default/
|
88 |
+
ipython_config.py
|
89 |
+
|
90 |
+
# pyenv
|
91 |
+
# For a library or package, you might want to ignore these files since the code is
|
92 |
+
# intended to run in multiple environments; otherwise, check them in:
|
93 |
+
# .python-version
|
94 |
+
|
95 |
+
# pipenv
|
96 |
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
97 |
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
98 |
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
99 |
+
# install all needed dependencies.
|
100 |
+
#Pipfile.lock
|
101 |
+
|
102 |
+
# poetry
|
103 |
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
104 |
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
105 |
+
# commonly ignored for libraries.
|
106 |
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
107 |
+
#poetry.lock
|
108 |
+
|
109 |
+
# pdm
|
110 |
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
111 |
+
#pdm.lock
|
112 |
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
113 |
+
# in version control.
|
114 |
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
115 |
+
.pdm.toml
|
116 |
+
.pdm-python
|
117 |
+
.pdm-build/
|
118 |
+
|
119 |
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
120 |
+
__pypackages__/
|
121 |
+
|
122 |
+
# Celery stuff
|
123 |
+
celerybeat-schedule
|
124 |
+
celerybeat.pid
|
125 |
+
|
126 |
+
# SageMath parsed files
|
127 |
+
*.sage.py
|
128 |
+
|
129 |
+
# Environments
|
130 |
+
.env
|
131 |
+
.venv
|
132 |
+
env/
|
133 |
+
venv/
|
134 |
+
ENV/
|
135 |
+
env.bak/
|
136 |
+
venv.bak/
|
137 |
+
|
138 |
+
# Spyder project settings
|
139 |
+
.spyderproject
|
140 |
+
.spyproject
|
141 |
+
|
142 |
+
# Rope project settings
|
143 |
+
.ropeproject
|
144 |
+
|
145 |
+
# mkdocs documentation
|
146 |
+
/site
|
147 |
+
|
148 |
+
# mypy
|
149 |
+
.mypy_cache/
|
150 |
+
.dmypy.json
|
151 |
+
dmypy.json
|
152 |
+
|
153 |
+
# Pyre type checker
|
154 |
+
.pyre/
|
155 |
+
|
156 |
+
# pytype static type analyzer
|
157 |
+
.pytype/
|
158 |
+
|
159 |
+
# Cython debug symbols
|
160 |
+
cython_debug/
|
161 |
+
|
162 |
+
# PyCharm
|
163 |
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
164 |
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
165 |
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
166 |
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
167 |
+
#.idea/
|
LICENSE
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
**FLUX.1 \[dev\] Non-Commercial License**
|
2 |
-
|
3 |
-
Black Forest Labs, Inc. (“**we**” or “**our**” or “**Company**”) is pleased to make available the weights, parameters and inference code for the FLUX.1 \[dev\] Model (as defined below) freely available for your non-commercial and non-production use as set forth in this FLUX.1 \[dev\] Non-Commercial License (“**License**”). The “**FLUX.1 \[dev\] Model**” means the FLUX.1 \[dev\] text-to-image AI model and its elements which includes algorithms, software, checkpoints, parameters, source code (inference code, evaluation code, and if applicable, fine-tuning code) and any other materials associated with the FLUX.1 \[dev\] AI model made available by Company under this License, including if any, the technical documentation, manuals and instructions for the use and operation thereof (collectively, “**FLUX.1 \[dev\] Model**”).
|
4 |
-
|
5 |
-
By downloading, accessing, use, Distributing (as defined below), or creating a Derivative (as defined below) of the FLUX.1 \[dev\] Model, you agree to the terms of this License. If you do not agree to this License, then you do not have any rights to access, use, Distribute or create a Derivative of the FLUX.1 \[dev\] Model and you must immediately cease using the FLUX.1 \[dev\] Model. 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 us 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 FLUX.1 \[dev\] Model on behalf of your employer or other entity.
|
6 |
-
|
7 |
-
1. **Definitions**. Capitalized terms used in this License but not defined herein have the following meanings:
|
8 |
-
|
9 |
-
1. “**Derivative**” means any (i) modified version of the FLUX.1 \[dev\] Model (including but not limited to any customized or fine-tuned version thereof), (ii) work based on the FLUX.1 \[dev\] Model, or (iii) any other derivative work thereof. For the avoidance of doubt, Outputs are not considered Derivatives under this License.
|
10 |
-
|
11 |
-
1. “**Distribution**” or “**Distribute**” or “**Distributing**” means providing or making available, by any means, a copy of the FLUX.1 \[dev\] Models and/or the Derivatives as the case may be.
|
12 |
-
|
13 |
-
1. “**Non-Commercial Purpose**” means any of the following uses, but only so far as you do not receive any direct or indirect payment arising from the use of the model or its output: (i) personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, or otherwise not directly or indirectly connected to any commercial activities, business operations, or employment responsibilities; (ii) use by commercial or for-profit entities for testing, evaluation, or non-commercial research and development in a non-production environment, (iii) use by any charitable organization for charitable purposes, or for testing or evaluation. For clarity, use for revenue-generating activity or direct interactions with or impacts on end users, or use to train, fine tune or distill other models for commercial use is not a Non-Commercial purpose.
|
14 |
-
|
15 |
-
1. “**Outputs**” means any content generated by the operation of the FLUX.1 \[dev\] Models or the Derivatives from a prompt (i.e., text instructions) provided by users. For the avoidance of doubt, Outputs do not include any components of a FLUX.1 \[dev\] Models, such as any fine-tuned versions of the FLUX.1 \[dev\] Models, the weights, or parameters.
|
16 |
-
|
17 |
-
1. “**you**” or “**your**” means the individual or entity entering into this License with Company.
|
18 |
-
|
19 |
-
1. **License Grant**.
|
20 |
-
|
21 |
-
1. License. Subject to your compliance with this License, Company grants you a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable, royalty free and limited license to access, use, create Derivatives of, and Distribute the FLUX.1 \[dev\] Models solely for your Non-Commercial Purposes. The foregoing license is personal to you, and you may not assign or sublicense this License or any other rights or obligations under this License without Company’s prior written consent; any such assignment or sublicense will be void and will automatically and immediately terminate this License. Any restrictions set forth herein in regarding the FLUX.1 \[dev\] Model also applies to any Derivative you create or that are created on your behalf.
|
22 |
-
|
23 |
-
1. Non-Commercial Use Only. You may only access, use, Distribute, or creative Derivatives of or the FLUX.1 \[dev\] Model or Derivatives for Non-Commercial Purposes. If You want to use a FLUX.1 \[dev\] Model a Derivative for any purpose that is not expressly authorized under this License, such as for a commercial activity, you must request a license from Company, which Company may grant to you in Company’s sole discretion and which additional use may be subject to a fee, royalty or other revenue share. Please contact Company at the following e-mail address if you want to discuss such a license: info@blackforestlabs.ai.
|
24 |
-
|
25 |
-
1. Reserved Rights. The grant of rights expressly set forth in this License are the complete grant of rights to you in the FLUX.1 \[dev\] Model, and no other licenses are granted, whether by waiver, estoppel, implication, equity or otherwise. Company and its licensors reserve all rights not expressly granted by this License.
|
26 |
-
|
27 |
-
1. Outputs. We claim no ownership rights in and to the Outputs. You are solely responsible for the Outputs you generate and their subsequent uses in accordance with this License. You may use Output for any purpose (including for commercial purposes), except as expressly prohibited herein. You may not use the Output to train, fine-tune or distill a model that is competitive with the FLUX.1 \[dev\] Model.
|
28 |
-
|
29 |
-
1. **Distribution**. Subject to this License, you may Distribute copies of the FLUX.1 \[dev\] Model and/or Derivatives made by you, under the following conditions:
|
30 |
-
|
31 |
-
1. you must make available a copy of this License to third-party recipients of the FLUX.1 \[dev\] Models and/or Derivatives you Distribute, and specify that any rights to use the FLUX.1 \[dev\] Models and/or Derivatives shall be directly granted by Company to said third-party recipients pursuant to this License;
|
32 |
-
|
33 |
-
1. you must make prominently display the following notice alongside the Distribution of the FLUX.1 \[dev\] Model or Derivative (such as via a “Notice” text file distributed as part of such FLUX.1 \[dev\] Model or Derivative) (the “**Attribution Notice**”):
|
34 |
-
|
35 |
-
“The FLUX.1 \[dev\] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 \[dev\] Non-Commercial License. Copyright Black Forest Labs. Inc.
|
36 |
-
|
37 |
-
IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.”
|
38 |
-
|
39 |
-
1. in the case of Distribution of Derivatives made by you, you must also include in the Attribution Notice a statement that you have modified the applicable FLUX.1 \[dev\] Model; and
|
40 |
-
|
41 |
-
1. in the case of Distribution of Derivatives made by you, any terms and conditions you impose on any third-party recipients relating to Derivatives made by or for you shall neither limit such third-party recipients’ use of the FLUX.1 \[dev\] Model or any Derivatives made by or for Company in accordance with this License nor conflict with any of its terms and conditions.
|
42 |
-
|
43 |
-
1. In the case of Distribution of Derivatives made by you, you must not misrepresent or imply, through any means, that the Derivatives made by or for you and/or any modified version of the FLUX.1 \[dev\] Model you Distribute under your name and responsibility is an official product of the Company or has been endorsed, approved or validated by the Company, unless you are authorized by Company to do so in writing.
|
44 |
-
|
45 |
-
1. **Restrictions**. You will not, and will not permit, assist or cause any third party to
|
46 |
-
|
47 |
-
1. use, modify, copy, reproduce, create Derivatives of, or Distribute the FLUX.1 \[dev\] Model (or any Derivative thereof, or any data produced by the FLUX.1 \[dev\] Model), in whole or in part, for (i) any commercial or production purposes, (ii) military purposes, (iii) purposes of surveillance, including any research or development relating to surveillance, (iv) biometric processing, (v) in any manner that infringes, misappropriates, or otherwise violates any third-party rights, or (vi) in any manner that violates any applicable law and violating any privacy or security laws, rules, regulations, directives, or governmental requirements (including the General Data Privacy Regulation (Regulation (EU) 2016/679), the California Consumer Privacy Act, and any and all laws governing the processing of biometric information), as well as all amendments and successor laws to any of the foregoing;
|
48 |
-
|
49 |
-
1. alter or remove copyright and other proprietary notices which appear on or in any portion of the FLUX.1 \[dev\] Model;
|
50 |
-
|
51 |
-
1. utilize any equipment, device, software, or other means to circumvent or remove any security or protection used by Company in connection with the FLUX.1 \[dev\] Model, or to circumvent or remove any usage restrictions, or to enable functionality disabled by FLUX.1 \[dev\] Model; or
|
52 |
-
|
53 |
-
1. offer or impose any terms on the FLUX.1 \[dev\] Model that alter, restrict, or are inconsistent with the terms of this License.
|
54 |
-
|
55 |
-
1. violate any applicable U.S. and non-U.S. export control and trade sanctions laws (“**Export Laws**”) in connection with your use or Distribution of any FLUX.1 \[dev\] Model;
|
56 |
-
|
57 |
-
1. directly or indirectly Distribute, export, or otherwise transfer FLUX.1 \[dev\] Model (a) to any individual, entity, or country prohibited by Export Laws; (b) to anyone on U.S. or non-U.S. government restricted parties lists; or (c) for any purpose prohibited by Export Laws, including nuclear, chemical or biological weapons, or missile technology applications; 3\) use or download FLUX.1 \[dev\] Model if you or they are (a) located in a comprehensively sanctioned jurisdiction, (b) currently listed on any U.S. or non-U.S. restricted parties list, or (c) for any purpose prohibited by Export Laws; and (4) will not disguise your location through IP proxying or other methods.
|
58 |
-
|
59 |
-
1. **DISCLAIMERS**. THE FLUX.1 \[dev\] MODEL IS PROVIDED “AS IS” AND “WITH ALL FAULTS” WITH NO WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. COMPANY EXPRESSLY DISCLAIMS ALL REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, WHETHER BY STATUTE, CUSTOM, USAGE OR OTHERWISE AS TO ANY MATTERS RELATED TO THE FLUX.1 \[dev\] MODEL, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, SATISFACTORY QUALITY, OR NON-INFRINGEMENT. COMPANY MAKES NO WARRANTIES OR REPRESENTATIONS THAT THE FLUX.1 \[dev\] MODEL WILL BE ERROR FREE OR FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR PRODUCE ANY PARTICULAR RESULTS.
|
60 |
-
|
61 |
-
1. **LIMITATION OF LIABILITY**. TO THE FULLEST EXTENT PERMITTED BY LAW, IN NO EVENT WILL COMPANY BE LIABLE TO YOU OR YOUR EMPLOYEES, AFFILIATES, USERS, OFFICERS OR DIRECTORS (A) UNDER ANY THEORY OF LIABILITY, WHETHER BASED IN CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, WARRANTY, OR OTHERWISE UNDER THIS LICENSE, OR (B) FOR ANY INDIRECT, CONSEQUENTIAL, EXEMPLARY, INCIDENTAL, PUNITIVE OR SPECIAL DAMAGES OR LOST PROFITS, EVEN IF COMPANY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE FLUX.1 \[dev\] MODEL, ITS CONSTITUENT COMPONENTS, AND ANY OUTPUT (COLLECTIVELY, “MODEL MATERIALS”) ARE NOT DESIGNED OR INTENDED FOR USE IN ANY APPLICATION OR SITUATION WHERE FAILURE OR FAULT OF THE MODEL MATERIALS COULD REASONABLY BE ANTICIPATED TO LEAD TO SERIOUS INJURY OF ANY PERSON, INCLUDING POTENTIAL DISCRIMINATION OR VIOLATION OF AN INDIVIDUAL’S PRIVACY RIGHTS, OR TO SEVERE PHYSICAL, PROPERTY, OR ENVIRONMENTAL DAMAGE (EACH, A “**HIGH-RISK USE**”). IF YOU ELECT TO USE ANY OF THE MODEL MATERIALS FOR A HIGH-RISK USE, YOU DO SO AT YOUR OWN RISK. YOU AGREE TO DESIGN AND IMPLEMENT APPROPRIATE DECISION-MAKING AND RISK-MITIGATION PROCEDURES AND POLICIES IN CONNECTION WITH A HIGH-RISK USE SUCH THAT EVEN IF THERE IS A FAILURE OR FAULT IN ANY OF THE MODEL MATERIALS, THE SAFETY OF PERSONS OR PROPERTY AFFECTED BY THE ACTIVITY STAYS AT A LEVEL THAT IS REASONABLE, APPROPRIATE, AND LAWFUL FOR THE FIELD OF THE HIGH-RISK USE.
|
62 |
-
|
63 |
-
1. **INDEMNIFICATION**
|
64 |
-
|
65 |
-
You will indemnify, defend and hold harmless Company and our subsidiaries and affiliates, and each of our respective shareholders, directors, officers, employees, agents, successors, and assigns (collectively, the “**Company Parties**”) from and against any losses, liabilities, damages, fines, penalties, and expenses (including reasonable attorneys’ fees) incurred by any Company Party in connection with any claim, demand, allegation, lawsuit, proceeding, or investigation (collectively, “**Claims**”) arising out of or related to (a) your access to or use of the FLUX.1 \[dev\] Model (as well as any Output, results or data generated from such access or use), including any High-Risk Use (defined below); (b) your violation of this License; or (c) your violation, misappropriation or infringement of any rights of another (including intellectual property or other proprietary rights and privacy rights). You will promptly notify the Company Parties of any such Claims, and cooperate with Company Parties in defending such Claims. You will also grant the Company Parties sole control of the defense or settlement, at Company’s sole option, of any Claims. This indemnity is in addition to, and not in lieu of, any other indemnities or remedies set forth in a written agreement between you and Company or the other Company Parties.
|
66 |
-
|
67 |
-
1. **Termination; Survival**.
|
68 |
-
|
69 |
-
1. This License will automatically terminate upon any breach by you of the terms of this License.
|
70 |
-
|
71 |
-
1. We may terminate this License, in whole or in part, at any time upon notice (including electronic) to you.
|
72 |
-
|
73 |
-
1. If You initiate any legal action or proceedings against Company or any other entity (including a cross-claim or counterclaim in a lawsuit), alleging that the FLUX.1 \[dev\] Model or any Derivative, or any part thereof, infringe upon intellectual property or other rights owned or licensable by you, then any licenses granted to you under this License will immediately terminate as of the date such legal action or claim is filed or initiated.
|
74 |
-
|
75 |
-
1. Upon termination of this License, you must cease all use, access or Distribution of the FLUX.1 \[dev\] Model and any Derivatives. The following sections survive termination of this License 2(c), 2(d), 4-11.
|
76 |
-
|
77 |
-
1. **Third Party Materials**. The FLUX.1 \[dev\] Model may contain third-party software or other components (including free and open source software) (all of the foregoing, “**Third Party Materials**”), which are subject to the license terms of the respective third-party licensors. Your dealings or correspondence with third parties and your use of or interaction with any Third Party Materials are solely between you and the third party. Company does not control or endorse, and makes no representations or warranties regarding, any Third Party Materials, and your access to and use of such Third Party Materials are at your own risk.
|
78 |
-
|
79 |
-
1. **Trademarks**. You have not been granted any trademark license as part of this License and may not use any name or mark associated with Company without the prior written permission of Company, except to the extent necessary to make the reference required in the Attribution Notice as specified above or as is reasonably necessary in describing the FLUX.1 \[dev\] Model and its creators.
|
80 |
-
|
81 |
-
1. **General**. This License will be governed and construed under the laws of the State of Delaware without regard to conflicts of law provisions. If any provision or part of a provision of this License is unlawful, void or unenforceable, that provision or part of the provision is deemed severed from this License, and will not affect the validity and enforceability of any remaining provisions. The failure of Company to exercise or enforce any right or provision of this License will not operate as a waiver of such right or provision. This License does not confer any third-party beneficiary rights upon any other person or entity. This License, together with the Documentation, contains the entire understanding between you and Company regarding the subject matter of this License, and supersedes all other written or oral agreements and understandings between you and Company regarding such subject matter. No change or addition to any provision of this License will be binding unless it is in writing and signed by an authorized representative of both you and Company.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
README.md
CHANGED
@@ -1,15 +1,128 @@
|
|
1 |
-
---
|
2 |
-
license:
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
---
|
4 |
+
|
5 |
+
# FLUX.1 [schnell] -- Flumina Server App
|
6 |
+
|
7 |
+
This repository contains an implementation of FLUX.1 [dev] inference on Fireworks AI's new Flumina Server App toolkit.
|
8 |
+
|
9 |
+
![Example output](example.png)
|
10 |
+
|
11 |
+
## Deploying FLUX.1 [dev] to Fireworks On-Demand
|
12 |
+
|
13 |
+
FLUX.1 [dev] (bfloat16) is available on Fireworks via [on-demand deployments](https://docs.fireworks.ai/guides/ondemand-deployments). It can be deployed in a few simple steps:
|
14 |
+
|
15 |
+
### Prerequisite: Clone the Weights into this Repository
|
16 |
+
|
17 |
+
1. Authenticate with HuggingFace with `huggingface-cli login`
|
18 |
+
2. Go to the model [repository](https://huggingface.co/black-forest-labs/FLUX.1-schnell) and accept the license agreement
|
19 |
+
3. From the root of this repository, clone the model into the `data/` folder by running `clone_weights.sh`
|
20 |
+
|
21 |
+
### Prerequisite: Install the Flumina CLI
|
22 |
+
|
23 |
+
The Flumina CLI is included with the [fireworks-ai](https://pypi.org/project/fireworks-ai/) Python package. It can be installed with pip like so:
|
24 |
+
```bash
|
25 |
+
pip install 'fireworks-ai[flumina]>=0.15.7'
|
26 |
+
```
|
27 |
+
|
28 |
+
Also get an API key from the [Fireworks site](https://fireworks.ai/account/api-keys) and set it in the Flumina CLI:
|
29 |
+
|
30 |
+
```bash
|
31 |
+
flumina set-api-key YOURAPIKEYHERE
|
32 |
+
```
|
33 |
+
|
34 |
+
### Creating an On-Demand Deployment
|
35 |
+
|
36 |
+
`flumina deploy` can be used to create an on-demand deployment. When invoked with a model name that exists already, it will create a new deployment in your account which has that model:
|
37 |
+
|
38 |
+
```bash
|
39 |
+
flumina deploy accounts/fireworks/models/flux-1-schnell
|
40 |
+
```
|
41 |
+
|
42 |
+
When successful, the CLI will print out example commands to call your new deployment, for example:
|
43 |
+
|
44 |
+
```bash
|
45 |
+
curl -X POST 'https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/flux-1-schnell/control_net?deployment=accounts/u-6jamesr6-63834f/deployments/bc45761f' \
|
46 |
+
-H 'Authorization: Bearer API_KEY' \
|
47 |
+
-F "prompt=<value>" \
|
48 |
+
-F "control_image=<value>" \
|
49 |
+
-F "control_mode=<value>" \
|
50 |
+
-F "aspect_ratio=16:9" \
|
51 |
+
-F "guidance_scale=3.5" \
|
52 |
+
-F "num_inference_steps=4" \
|
53 |
+
-F "seed=0" \
|
54 |
+
-F "controlnet_conditioning_scale=<value>"
|
55 |
+
|
56 |
+
curl -X POST 'https://api.fireworks.ai/inference/v1/workflows/accounts/fireworks/models/flux-1-schnell/text_to_image?deployment=accounts/u-6jamesr6-63834f/deployments/bc45761f' \
|
57 |
+
-H 'Authorization: Bearer API_KEY' \
|
58 |
+
-H "Content-Type: application/json" \
|
59 |
+
-d '{
|
60 |
+
"prompt": "<value>",
|
61 |
+
"aspect_ratio": "16:9",
|
62 |
+
"guidance_scale": 3.5,
|
63 |
+
"num_inference_steps": 4,
|
64 |
+
"seed": 0
|
65 |
+
}'
|
66 |
+
```
|
67 |
+
|
68 |
+
Your deployment can also be administered using the Flumina CLI. Useful commands include:
|
69 |
+
* `flumina list deployments` to show all of your deployments
|
70 |
+
* `flumina get deployment` to get details about a specific deployment
|
71 |
+
* `flumina delete deployment` to delete a deployment
|
72 |
+
|
73 |
+
## Add-ons
|
74 |
+
|
75 |
+
Add-ons are packages you can upload to Fireworks and load into your deployed model. This Flumina app implements two types of add-ons: "controlnet_union" and "lora".
|
76 |
+
|
77 |
+
### Deploying an existing add-on to your FLUX on-demand deployment
|
78 |
+
|
79 |
+
Existing addons can be deployed to Fireworks via the `flumina create deployed_addon` command. The command takes two arguments:
|
80 |
+
* The resource name of the addon to be deployed
|
81 |
+
* The resource name of the deployment on which to deploy the add-on
|
82 |
+
|
83 |
+
Both resource names can either be an ID (e.g. `my-addon` or `012345` for addons and deployments respectively) in which case it is assumed that the resource is in your Fireworks account or they can be fully-qualified names like `accounts/my-account/models/my-addon` or `accounts/my-account/deployments/my-deployment`.
|
84 |
+
|
85 |
+
For example:
|
86 |
+
|
87 |
+
```bash
|
88 |
+
flumina create deployed_addon accounts/fireworks/models/flux-1-dev-controlnet-union 0123456
|
89 |
+
```
|
90 |
+
|
91 |
+
This will deploy the `flux-1-dev-controlnet-union` add-on in the fireworks account to your deployment named `0123456`.
|
92 |
+
|
93 |
+
|
94 |
+
### Creating custom addons (ControlNet and LoRA adapters)
|
95 |
+
|
96 |
+
This model supports addons (specifically ControlNet Union and LoRA adapters) in the HuggingFace diffusers format. Here is an example of taking an existing LoRA addon from HuggingFace and deploying it to Fireworks:
|
97 |
+
|
98 |
+
```bash
|
99 |
+
git clone https://huggingface.co/brushpenbob/flux-midjourney-anime
|
100 |
+
cd flux-midjourney-anime
|
101 |
+
flumina init addon lora --allow-non-empty
|
102 |
+
flumina create model flux-1-dev-midjourney-anime --base-model accounts/fireworks/models/flux-1-dev
|
103 |
+
```
|
104 |
+
|
105 |
+
Then you can deploy it to your on-demand deployment like so:
|
106 |
+
|
107 |
+
```bash
|
108 |
+
flumina create deployed_addon flux-1-dev-midjourney-anime 0123456
|
109 |
+
```
|
110 |
+
|
111 |
+
## What is Flumina?
|
112 |
+
|
113 |
+
Flumina is Fireworks.ai’s new system for hosting Server Apps that allows users to deploy deep learning inference to production in minutes, not weeks.
|
114 |
+
|
115 |
+
## What does Flumina offer for FLUX models?
|
116 |
+
|
117 |
+
Flumina offers the following benefits:
|
118 |
+
|
119 |
+
* Clear, precise definition of the server-side workload by looking at the server app implementation (you are here)
|
120 |
+
* Extensibility interface, which allows for dynamic loading/dispatching of add-ons server-side. For FLUX:
|
121 |
+
* ControlNet (Union) adapters
|
122 |
+
* LoRA adapters
|
123 |
+
* Off-the-shelf support for standing up on-demand capacity for the Server App on Fireworks
|
124 |
+
* Further, customization of the logic of the deployment by modifying the Server App and deploying the modified version.
|
125 |
+
|
126 |
+
## Deploying Custom FLUX.1 [schnell] Apps to Fireworks On-demand
|
127 |
+
|
128 |
+
Flumina base app upload is coming soon!
|
clone_weights.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
git clone https://huggingface.co/black-forest-labs/FLUX.1-schnell data
|
data/README.md
DELETED
@@ -1,81 +0,0 @@
|
|
1 |
-
---
|
2 |
-
language:
|
3 |
-
- en
|
4 |
-
license: apache-2.0
|
5 |
-
tags:
|
6 |
-
- text-to-image
|
7 |
-
- image-generation
|
8 |
-
- flux
|
9 |
-
---
|
10 |
-
|
11 |
-
![FLUX.1 [schnell] Grid](./schnell_grid.jpeg)
|
12 |
-
|
13 |
-
`FLUX.1 [schnell]` is a 12 billion parameter rectified flow transformer capable of generating images from text descriptions.
|
14 |
-
For more information, please read our [blog post](https://blackforestlabs.ai/announcing-black-forest-labs/).
|
15 |
-
|
16 |
-
# Key Features
|
17 |
-
1. Cutting-edge output quality and competitive prompt following, matching the performance of closed source alternatives.
|
18 |
-
2. Trained using latent adversarial diffusion distillation, `FLUX.1 [schnell]` can generate high-quality images in only 1 to 4 steps.
|
19 |
-
3. Released under the `apache-2.0` licence, the model can be used for personal, scientific, and commercial purposes.
|
20 |
-
|
21 |
-
# Usage
|
22 |
-
We provide a reference implementation of `FLUX.1 [schnell]`, as well as sampling code, in a dedicated [github repository](https://github.com/black-forest-labs/flux).
|
23 |
-
Developers and creatives looking to build on top of `FLUX.1 [schnell]` are encouraged to use this as a starting point.
|
24 |
-
|
25 |
-
## API Endpoints
|
26 |
-
The FLUX.1 models are also available via API from the following sources
|
27 |
-
- [bfl.ml](https://docs.bfl.ml/) (currently `FLUX.1 [pro]`)
|
28 |
-
- [replicate.com](https://replicate.com/collections/flux)
|
29 |
-
- [fal.ai](https://fal.ai/models/fal-ai/flux/schnell)
|
30 |
-
- [mystic.ai](https://www.mystic.ai/black-forest-labs/flux1-schnell)
|
31 |
-
|
32 |
-
## ComfyUI
|
33 |
-
`FLUX.1 [schnell]` is also available in [Comfy UI](https://github.com/comfyanonymous/ComfyUI) for local inference with a node-based workflow.
|
34 |
-
|
35 |
-
## Diffusers
|
36 |
-
To use `FLUX.1 [schnell]` with the 🧨 diffusers python library, first install or upgrade diffusers
|
37 |
-
|
38 |
-
```shell
|
39 |
-
pip install -U diffusers
|
40 |
-
```
|
41 |
-
|
42 |
-
Then you can use `FluxPipeline` to run the model
|
43 |
-
|
44 |
-
```python
|
45 |
-
import torch
|
46 |
-
from diffusers import FluxPipeline
|
47 |
-
|
48 |
-
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=torch.bfloat16)
|
49 |
-
pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
|
50 |
-
|
51 |
-
prompt = "A cat holding a sign that says hello world"
|
52 |
-
image = pipe(
|
53 |
-
prompt,
|
54 |
-
guidance_scale=0.0,
|
55 |
-
num_inference_steps=4,
|
56 |
-
max_sequence_length=256,
|
57 |
-
generator=torch.Generator("cpu").manual_seed(0)
|
58 |
-
).images[0]
|
59 |
-
image.save("flux-schnell.png")
|
60 |
-
```
|
61 |
-
|
62 |
-
To learn more check out the [diffusers](https://huggingface.co/docs/diffusers/main/en/api/pipelines/flux) documentation
|
63 |
-
|
64 |
-
---
|
65 |
-
# Limitations
|
66 |
-
- This model is not intended or able to provide factual information.
|
67 |
-
- As a statistical model this checkpoint might amplify existing societal biases.
|
68 |
-
- The model may fail to generate output that matches the prompts.
|
69 |
-
- Prompt following is heavily influenced by the prompting-style.
|
70 |
-
|
71 |
-
# Out-of-Scope Use
|
72 |
-
The model and its derivatives may not be used
|
73 |
-
|
74 |
-
- In any way that violates any applicable national, federal, state, local or international law or regulation.
|
75 |
-
- For the purpose of exploiting, harming or attempting to exploit or harm minors in any way; including but not limited to the solicitation, creation, acquisition, or dissemination of child exploitative content.
|
76 |
-
- To generate or disseminate verifiably false information and/or content with the purpose of harming others.
|
77 |
-
- To generate or disseminate personal identifiable information that can be used to harm an individual.
|
78 |
-
- To harass, abuse, threaten, stalk, or bully individuals or groups of individuals.
|
79 |
-
- To create non-consensual nudity or illegal pornographic content.
|
80 |
-
- For fully automated decision making that adversely impacts an individual's legal rights or otherwise creates or modifies a binding, enforceable obligation.
|
81 |
-
- Generating or facilitating large-scale disinformation campaigns.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/ae.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38
|
3 |
-
size 335304388
|
|
|
|
|
|
|
|
data/model_index.json
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_class_name": "FluxPipeline",
|
3 |
-
"_diffusers_version": "0.30.0.dev0",
|
4 |
-
"scheduler": [
|
5 |
-
"diffusers",
|
6 |
-
"FlowMatchEulerDiscreteScheduler"
|
7 |
-
],
|
8 |
-
"text_encoder": [
|
9 |
-
"transformers",
|
10 |
-
"CLIPTextModel"
|
11 |
-
],
|
12 |
-
"text_encoder_2": [
|
13 |
-
"transformers",
|
14 |
-
"T5EncoderModel"
|
15 |
-
],
|
16 |
-
"tokenizer": [
|
17 |
-
"transformers",
|
18 |
-
"CLIPTokenizer"
|
19 |
-
],
|
20 |
-
"tokenizer_2": [
|
21 |
-
"transformers",
|
22 |
-
"T5TokenizerFast"
|
23 |
-
],
|
24 |
-
"transformer": [
|
25 |
-
"diffusers",
|
26 |
-
"FluxTransformer2DModel"
|
27 |
-
],
|
28 |
-
"vae": [
|
29 |
-
"diffusers",
|
30 |
-
"AutoencoderKL"
|
31 |
-
]
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/scheduler/scheduler_config.json
DELETED
@@ -1,11 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_class_name": "FlowMatchEulerDiscreteScheduler",
|
3 |
-
"_diffusers_version": "0.30.0.dev0",
|
4 |
-
"base_image_seq_len": 256,
|
5 |
-
"base_shift": 0.5,
|
6 |
-
"max_image_seq_len": 4096,
|
7 |
-
"max_shift": 1.15,
|
8 |
-
"num_train_timesteps": 1000,
|
9 |
-
"shift": 1.0,
|
10 |
-
"use_dynamic_shifting": false
|
11 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/text_encoder/config.json
DELETED
@@ -1,25 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_name_or_path": "openai/clip-vit-large-patch14",
|
3 |
-
"architectures": [
|
4 |
-
"CLIPTextModel"
|
5 |
-
],
|
6 |
-
"attention_dropout": 0.0,
|
7 |
-
"bos_token_id": 0,
|
8 |
-
"dropout": 0.0,
|
9 |
-
"eos_token_id": 2,
|
10 |
-
"hidden_act": "quick_gelu",
|
11 |
-
"hidden_size": 768,
|
12 |
-
"initializer_factor": 1.0,
|
13 |
-
"initializer_range": 0.02,
|
14 |
-
"intermediate_size": 3072,
|
15 |
-
"layer_norm_eps": 1e-05,
|
16 |
-
"max_position_embeddings": 77,
|
17 |
-
"model_type": "clip_text_model",
|
18 |
-
"num_attention_heads": 12,
|
19 |
-
"num_hidden_layers": 12,
|
20 |
-
"pad_token_id": 1,
|
21 |
-
"projection_dim": 768,
|
22 |
-
"torch_dtype": "bfloat16",
|
23 |
-
"transformers_version": "4.43.3",
|
24 |
-
"vocab_size": 49408
|
25 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/text_encoder/model.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:893d67a23f4693ed42cdab4cbad7fe3e727cf59609c40da28a46b5470f9ed082
|
3 |
-
size 246144352
|
|
|
|
|
|
|
|
data/text_encoder_2/config.json
DELETED
@@ -1,32 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_name_or_path": "google/t5-v1_1-xxl",
|
3 |
-
"architectures": [
|
4 |
-
"T5EncoderModel"
|
5 |
-
],
|
6 |
-
"classifier_dropout": 0.0,
|
7 |
-
"d_ff": 10240,
|
8 |
-
"d_kv": 64,
|
9 |
-
"d_model": 4096,
|
10 |
-
"decoder_start_token_id": 0,
|
11 |
-
"dense_act_fn": "gelu_new",
|
12 |
-
"dropout_rate": 0.1,
|
13 |
-
"eos_token_id": 1,
|
14 |
-
"feed_forward_proj": "gated-gelu",
|
15 |
-
"initializer_factor": 1.0,
|
16 |
-
"is_encoder_decoder": true,
|
17 |
-
"is_gated_act": true,
|
18 |
-
"layer_norm_epsilon": 1e-06,
|
19 |
-
"model_type": "t5",
|
20 |
-
"num_decoder_layers": 24,
|
21 |
-
"num_heads": 64,
|
22 |
-
"num_layers": 24,
|
23 |
-
"output_past": true,
|
24 |
-
"pad_token_id": 0,
|
25 |
-
"relative_attention_max_distance": 128,
|
26 |
-
"relative_attention_num_buckets": 32,
|
27 |
-
"tie_word_embeddings": false,
|
28 |
-
"torch_dtype": "bfloat16",
|
29 |
-
"transformers_version": "4.43.3",
|
30 |
-
"use_cache": true,
|
31 |
-
"vocab_size": 32128
|
32 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/text_encoder_2/model-00001-of-00002.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:ec87bffd1923e8b2774a6d240c922a41f6143081d52cf83b8fe39e9d838c893e
|
3 |
-
size 4994582224
|
|
|
|
|
|
|
|
data/text_encoder_2/model-00002-of-00002.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:a5640855b301fcdbceddfa90ae8066cd9414aff020552a201a255ecf2059da00
|
3 |
-
size 4530066360
|
|
|
|
|
|
|
|
data/text_encoder_2/model.safetensors.index.json
DELETED
@@ -1,226 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"metadata": {
|
3 |
-
"total_size": 9524621312
|
4 |
-
},
|
5 |
-
"weight_map": {
|
6 |
-
"encoder.block.0.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
7 |
-
"encoder.block.0.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
8 |
-
"encoder.block.0.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
9 |
-
"encoder.block.0.layer.0.SelfAttention.relative_attention_bias.weight": "model-00001-of-00002.safetensors",
|
10 |
-
"encoder.block.0.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
11 |
-
"encoder.block.0.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
12 |
-
"encoder.block.0.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
13 |
-
"encoder.block.0.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
14 |
-
"encoder.block.0.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
15 |
-
"encoder.block.0.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
16 |
-
"encoder.block.1.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
17 |
-
"encoder.block.1.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
18 |
-
"encoder.block.1.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
19 |
-
"encoder.block.1.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
20 |
-
"encoder.block.1.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
21 |
-
"encoder.block.1.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
22 |
-
"encoder.block.1.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
23 |
-
"encoder.block.1.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
24 |
-
"encoder.block.1.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
25 |
-
"encoder.block.10.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
26 |
-
"encoder.block.10.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
27 |
-
"encoder.block.10.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
28 |
-
"encoder.block.10.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
29 |
-
"encoder.block.10.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
30 |
-
"encoder.block.10.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
31 |
-
"encoder.block.10.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
32 |
-
"encoder.block.10.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
33 |
-
"encoder.block.10.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
34 |
-
"encoder.block.11.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
35 |
-
"encoder.block.11.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
36 |
-
"encoder.block.11.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
37 |
-
"encoder.block.11.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
38 |
-
"encoder.block.11.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
39 |
-
"encoder.block.11.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
40 |
-
"encoder.block.11.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
41 |
-
"encoder.block.11.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
42 |
-
"encoder.block.11.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
43 |
-
"encoder.block.12.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
44 |
-
"encoder.block.12.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
45 |
-
"encoder.block.12.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
46 |
-
"encoder.block.12.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
47 |
-
"encoder.block.12.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
48 |
-
"encoder.block.12.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
49 |
-
"encoder.block.12.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
50 |
-
"encoder.block.12.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
51 |
-
"encoder.block.12.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
52 |
-
"encoder.block.13.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
53 |
-
"encoder.block.13.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
54 |
-
"encoder.block.13.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
55 |
-
"encoder.block.13.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
56 |
-
"encoder.block.13.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
57 |
-
"encoder.block.13.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
58 |
-
"encoder.block.13.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
59 |
-
"encoder.block.13.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
60 |
-
"encoder.block.13.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
61 |
-
"encoder.block.14.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
62 |
-
"encoder.block.14.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
63 |
-
"encoder.block.14.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
64 |
-
"encoder.block.14.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
65 |
-
"encoder.block.14.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
66 |
-
"encoder.block.14.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
67 |
-
"encoder.block.14.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
68 |
-
"encoder.block.14.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
69 |
-
"encoder.block.14.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
70 |
-
"encoder.block.15.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
71 |
-
"encoder.block.15.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
72 |
-
"encoder.block.15.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
73 |
-
"encoder.block.15.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
74 |
-
"encoder.block.15.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
75 |
-
"encoder.block.15.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
76 |
-
"encoder.block.15.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
77 |
-
"encoder.block.15.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
78 |
-
"encoder.block.15.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
79 |
-
"encoder.block.16.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
80 |
-
"encoder.block.16.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
81 |
-
"encoder.block.16.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
82 |
-
"encoder.block.16.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
83 |
-
"encoder.block.16.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
84 |
-
"encoder.block.16.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
85 |
-
"encoder.block.16.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
86 |
-
"encoder.block.16.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
87 |
-
"encoder.block.16.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
88 |
-
"encoder.block.17.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
89 |
-
"encoder.block.17.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
90 |
-
"encoder.block.17.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
91 |
-
"encoder.block.17.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
92 |
-
"encoder.block.17.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
93 |
-
"encoder.block.17.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
94 |
-
"encoder.block.17.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
95 |
-
"encoder.block.17.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
96 |
-
"encoder.block.17.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
97 |
-
"encoder.block.18.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
98 |
-
"encoder.block.18.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
99 |
-
"encoder.block.18.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
100 |
-
"encoder.block.18.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
101 |
-
"encoder.block.18.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
102 |
-
"encoder.block.18.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
103 |
-
"encoder.block.18.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
104 |
-
"encoder.block.18.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
105 |
-
"encoder.block.18.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
106 |
-
"encoder.block.19.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
107 |
-
"encoder.block.19.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
108 |
-
"encoder.block.19.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
109 |
-
"encoder.block.19.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
110 |
-
"encoder.block.19.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
111 |
-
"encoder.block.19.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
112 |
-
"encoder.block.19.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
113 |
-
"encoder.block.19.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
114 |
-
"encoder.block.19.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
115 |
-
"encoder.block.2.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
116 |
-
"encoder.block.2.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
117 |
-
"encoder.block.2.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
118 |
-
"encoder.block.2.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
119 |
-
"encoder.block.2.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
120 |
-
"encoder.block.2.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
121 |
-
"encoder.block.2.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
122 |
-
"encoder.block.2.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
123 |
-
"encoder.block.2.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
124 |
-
"encoder.block.20.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
125 |
-
"encoder.block.20.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
126 |
-
"encoder.block.20.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
127 |
-
"encoder.block.20.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
128 |
-
"encoder.block.20.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
129 |
-
"encoder.block.20.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
130 |
-
"encoder.block.20.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
131 |
-
"encoder.block.20.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
132 |
-
"encoder.block.20.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
133 |
-
"encoder.block.21.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
134 |
-
"encoder.block.21.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
135 |
-
"encoder.block.21.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
136 |
-
"encoder.block.21.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
137 |
-
"encoder.block.21.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
138 |
-
"encoder.block.21.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
139 |
-
"encoder.block.21.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
140 |
-
"encoder.block.21.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
141 |
-
"encoder.block.21.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
142 |
-
"encoder.block.22.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
143 |
-
"encoder.block.22.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
144 |
-
"encoder.block.22.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
145 |
-
"encoder.block.22.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
146 |
-
"encoder.block.22.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
147 |
-
"encoder.block.22.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
148 |
-
"encoder.block.22.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
149 |
-
"encoder.block.22.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
150 |
-
"encoder.block.22.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
151 |
-
"encoder.block.23.layer.0.SelfAttention.k.weight": "model-00002-of-00002.safetensors",
|
152 |
-
"encoder.block.23.layer.0.SelfAttention.o.weight": "model-00002-of-00002.safetensors",
|
153 |
-
"encoder.block.23.layer.0.SelfAttention.q.weight": "model-00002-of-00002.safetensors",
|
154 |
-
"encoder.block.23.layer.0.SelfAttention.v.weight": "model-00002-of-00002.safetensors",
|
155 |
-
"encoder.block.23.layer.0.layer_norm.weight": "model-00002-of-00002.safetensors",
|
156 |
-
"encoder.block.23.layer.1.DenseReluDense.wi_0.weight": "model-00002-of-00002.safetensors",
|
157 |
-
"encoder.block.23.layer.1.DenseReluDense.wi_1.weight": "model-00002-of-00002.safetensors",
|
158 |
-
"encoder.block.23.layer.1.DenseReluDense.wo.weight": "model-00002-of-00002.safetensors",
|
159 |
-
"encoder.block.23.layer.1.layer_norm.weight": "model-00002-of-00002.safetensors",
|
160 |
-
"encoder.block.3.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
161 |
-
"encoder.block.3.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
162 |
-
"encoder.block.3.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
163 |
-
"encoder.block.3.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
164 |
-
"encoder.block.3.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
165 |
-
"encoder.block.3.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
166 |
-
"encoder.block.3.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
167 |
-
"encoder.block.3.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
168 |
-
"encoder.block.3.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
169 |
-
"encoder.block.4.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
170 |
-
"encoder.block.4.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
171 |
-
"encoder.block.4.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
172 |
-
"encoder.block.4.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
173 |
-
"encoder.block.4.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
174 |
-
"encoder.block.4.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
175 |
-
"encoder.block.4.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
176 |
-
"encoder.block.4.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
177 |
-
"encoder.block.4.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
178 |
-
"encoder.block.5.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
179 |
-
"encoder.block.5.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
180 |
-
"encoder.block.5.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
181 |
-
"encoder.block.5.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
182 |
-
"encoder.block.5.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
183 |
-
"encoder.block.5.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
184 |
-
"encoder.block.5.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
185 |
-
"encoder.block.5.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
186 |
-
"encoder.block.5.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
187 |
-
"encoder.block.6.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
188 |
-
"encoder.block.6.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
189 |
-
"encoder.block.6.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
190 |
-
"encoder.block.6.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
191 |
-
"encoder.block.6.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
192 |
-
"encoder.block.6.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
193 |
-
"encoder.block.6.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
194 |
-
"encoder.block.6.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
195 |
-
"encoder.block.6.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
196 |
-
"encoder.block.7.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
197 |
-
"encoder.block.7.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
198 |
-
"encoder.block.7.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
199 |
-
"encoder.block.7.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
200 |
-
"encoder.block.7.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
201 |
-
"encoder.block.7.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
202 |
-
"encoder.block.7.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
203 |
-
"encoder.block.7.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
204 |
-
"encoder.block.7.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
205 |
-
"encoder.block.8.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
206 |
-
"encoder.block.8.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
207 |
-
"encoder.block.8.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
208 |
-
"encoder.block.8.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
209 |
-
"encoder.block.8.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
210 |
-
"encoder.block.8.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
211 |
-
"encoder.block.8.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
212 |
-
"encoder.block.8.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
213 |
-
"encoder.block.8.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
214 |
-
"encoder.block.9.layer.0.SelfAttention.k.weight": "model-00001-of-00002.safetensors",
|
215 |
-
"encoder.block.9.layer.0.SelfAttention.o.weight": "model-00001-of-00002.safetensors",
|
216 |
-
"encoder.block.9.layer.0.SelfAttention.q.weight": "model-00001-of-00002.safetensors",
|
217 |
-
"encoder.block.9.layer.0.SelfAttention.v.weight": "model-00001-of-00002.safetensors",
|
218 |
-
"encoder.block.9.layer.0.layer_norm.weight": "model-00001-of-00002.safetensors",
|
219 |
-
"encoder.block.9.layer.1.DenseReluDense.wi_0.weight": "model-00001-of-00002.safetensors",
|
220 |
-
"encoder.block.9.layer.1.DenseReluDense.wi_1.weight": "model-00001-of-00002.safetensors",
|
221 |
-
"encoder.block.9.layer.1.DenseReluDense.wo.weight": "model-00001-of-00002.safetensors",
|
222 |
-
"encoder.block.9.layer.1.layer_norm.weight": "model-00001-of-00002.safetensors",
|
223 |
-
"encoder.final_layer_norm.weight": "model-00002-of-00002.safetensors",
|
224 |
-
"shared.weight": "model-00001-of-00002.safetensors"
|
225 |
-
}
|
226 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/tokenizer/merges.txt
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/tokenizer/special_tokens_map.json
DELETED
@@ -1,30 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/tokenizer/tokenizer_config.json
DELETED
@@ -1,30 +0,0 @@
|
|
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 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/tokenizer/vocab.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/tokenizer_2/special_tokens_map.json
DELETED
@@ -1,125 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"additional_special_tokens": [
|
3 |
-
"<extra_id_0>",
|
4 |
-
"<extra_id_1>",
|
5 |
-
"<extra_id_2>",
|
6 |
-
"<extra_id_3>",
|
7 |
-
"<extra_id_4>",
|
8 |
-
"<extra_id_5>",
|
9 |
-
"<extra_id_6>",
|
10 |
-
"<extra_id_7>",
|
11 |
-
"<extra_id_8>",
|
12 |
-
"<extra_id_9>",
|
13 |
-
"<extra_id_10>",
|
14 |
-
"<extra_id_11>",
|
15 |
-
"<extra_id_12>",
|
16 |
-
"<extra_id_13>",
|
17 |
-
"<extra_id_14>",
|
18 |
-
"<extra_id_15>",
|
19 |
-
"<extra_id_16>",
|
20 |
-
"<extra_id_17>",
|
21 |
-
"<extra_id_18>",
|
22 |
-
"<extra_id_19>",
|
23 |
-
"<extra_id_20>",
|
24 |
-
"<extra_id_21>",
|
25 |
-
"<extra_id_22>",
|
26 |
-
"<extra_id_23>",
|
27 |
-
"<extra_id_24>",
|
28 |
-
"<extra_id_25>",
|
29 |
-
"<extra_id_26>",
|
30 |
-
"<extra_id_27>",
|
31 |
-
"<extra_id_28>",
|
32 |
-
"<extra_id_29>",
|
33 |
-
"<extra_id_30>",
|
34 |
-
"<extra_id_31>",
|
35 |
-
"<extra_id_32>",
|
36 |
-
"<extra_id_33>",
|
37 |
-
"<extra_id_34>",
|
38 |
-
"<extra_id_35>",
|
39 |
-
"<extra_id_36>",
|
40 |
-
"<extra_id_37>",
|
41 |
-
"<extra_id_38>",
|
42 |
-
"<extra_id_39>",
|
43 |
-
"<extra_id_40>",
|
44 |
-
"<extra_id_41>",
|
45 |
-
"<extra_id_42>",
|
46 |
-
"<extra_id_43>",
|
47 |
-
"<extra_id_44>",
|
48 |
-
"<extra_id_45>",
|
49 |
-
"<extra_id_46>",
|
50 |
-
"<extra_id_47>",
|
51 |
-
"<extra_id_48>",
|
52 |
-
"<extra_id_49>",
|
53 |
-
"<extra_id_50>",
|
54 |
-
"<extra_id_51>",
|
55 |
-
"<extra_id_52>",
|
56 |
-
"<extra_id_53>",
|
57 |
-
"<extra_id_54>",
|
58 |
-
"<extra_id_55>",
|
59 |
-
"<extra_id_56>",
|
60 |
-
"<extra_id_57>",
|
61 |
-
"<extra_id_58>",
|
62 |
-
"<extra_id_59>",
|
63 |
-
"<extra_id_60>",
|
64 |
-
"<extra_id_61>",
|
65 |
-
"<extra_id_62>",
|
66 |
-
"<extra_id_63>",
|
67 |
-
"<extra_id_64>",
|
68 |
-
"<extra_id_65>",
|
69 |
-
"<extra_id_66>",
|
70 |
-
"<extra_id_67>",
|
71 |
-
"<extra_id_68>",
|
72 |
-
"<extra_id_69>",
|
73 |
-
"<extra_id_70>",
|
74 |
-
"<extra_id_71>",
|
75 |
-
"<extra_id_72>",
|
76 |
-
"<extra_id_73>",
|
77 |
-
"<extra_id_74>",
|
78 |
-
"<extra_id_75>",
|
79 |
-
"<extra_id_76>",
|
80 |
-
"<extra_id_77>",
|
81 |
-
"<extra_id_78>",
|
82 |
-
"<extra_id_79>",
|
83 |
-
"<extra_id_80>",
|
84 |
-
"<extra_id_81>",
|
85 |
-
"<extra_id_82>",
|
86 |
-
"<extra_id_83>",
|
87 |
-
"<extra_id_84>",
|
88 |
-
"<extra_id_85>",
|
89 |
-
"<extra_id_86>",
|
90 |
-
"<extra_id_87>",
|
91 |
-
"<extra_id_88>",
|
92 |
-
"<extra_id_89>",
|
93 |
-
"<extra_id_90>",
|
94 |
-
"<extra_id_91>",
|
95 |
-
"<extra_id_92>",
|
96 |
-
"<extra_id_93>",
|
97 |
-
"<extra_id_94>",
|
98 |
-
"<extra_id_95>",
|
99 |
-
"<extra_id_96>",
|
100 |
-
"<extra_id_97>",
|
101 |
-
"<extra_id_98>",
|
102 |
-
"<extra_id_99>"
|
103 |
-
],
|
104 |
-
"eos_token": {
|
105 |
-
"content": "</s>",
|
106 |
-
"lstrip": false,
|
107 |
-
"normalized": false,
|
108 |
-
"rstrip": false,
|
109 |
-
"single_word": false
|
110 |
-
},
|
111 |
-
"pad_token": {
|
112 |
-
"content": "<pad>",
|
113 |
-
"lstrip": false,
|
114 |
-
"normalized": false,
|
115 |
-
"rstrip": false,
|
116 |
-
"single_word": false
|
117 |
-
},
|
118 |
-
"unk_token": {
|
119 |
-
"content": "<unk>",
|
120 |
-
"lstrip": false,
|
121 |
-
"normalized": false,
|
122 |
-
"rstrip": false,
|
123 |
-
"single_word": false
|
124 |
-
}
|
125 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/tokenizer_2/spiece.model
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d60acb128cf7b7f2536e8f38a5b18a05535c9e14c7a355904270e15b0945ea86
|
3 |
-
size 791656
|
|
|
|
|
|
|
|
data/tokenizer_2/tokenizer.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/tokenizer_2/tokenizer_config.json
DELETED
@@ -1,940 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"add_prefix_space": true,
|
3 |
-
"added_tokens_decoder": {
|
4 |
-
"0": {
|
5 |
-
"content": "<pad>",
|
6 |
-
"lstrip": false,
|
7 |
-
"normalized": false,
|
8 |
-
"rstrip": false,
|
9 |
-
"single_word": false,
|
10 |
-
"special": true
|
11 |
-
},
|
12 |
-
"1": {
|
13 |
-
"content": "</s>",
|
14 |
-
"lstrip": false,
|
15 |
-
"normalized": false,
|
16 |
-
"rstrip": false,
|
17 |
-
"single_word": false,
|
18 |
-
"special": true
|
19 |
-
},
|
20 |
-
"2": {
|
21 |
-
"content": "<unk>",
|
22 |
-
"lstrip": false,
|
23 |
-
"normalized": false,
|
24 |
-
"rstrip": false,
|
25 |
-
"single_word": false,
|
26 |
-
"special": true
|
27 |
-
},
|
28 |
-
"32000": {
|
29 |
-
"content": "<extra_id_99>",
|
30 |
-
"lstrip": false,
|
31 |
-
"normalized": false,
|
32 |
-
"rstrip": false,
|
33 |
-
"single_word": false,
|
34 |
-
"special": true
|
35 |
-
},
|
36 |
-
"32001": {
|
37 |
-
"content": "<extra_id_98>",
|
38 |
-
"lstrip": false,
|
39 |
-
"normalized": false,
|
40 |
-
"rstrip": false,
|
41 |
-
"single_word": false,
|
42 |
-
"special": true
|
43 |
-
},
|
44 |
-
"32002": {
|
45 |
-
"content": "<extra_id_97>",
|
46 |
-
"lstrip": false,
|
47 |
-
"normalized": false,
|
48 |
-
"rstrip": false,
|
49 |
-
"single_word": false,
|
50 |
-
"special": true
|
51 |
-
},
|
52 |
-
"32003": {
|
53 |
-
"content": "<extra_id_96>",
|
54 |
-
"lstrip": false,
|
55 |
-
"normalized": false,
|
56 |
-
"rstrip": false,
|
57 |
-
"single_word": false,
|
58 |
-
"special": true
|
59 |
-
},
|
60 |
-
"32004": {
|
61 |
-
"content": "<extra_id_95>",
|
62 |
-
"lstrip": false,
|
63 |
-
"normalized": false,
|
64 |
-
"rstrip": false,
|
65 |
-
"single_word": false,
|
66 |
-
"special": true
|
67 |
-
},
|
68 |
-
"32005": {
|
69 |
-
"content": "<extra_id_94>",
|
70 |
-
"lstrip": false,
|
71 |
-
"normalized": false,
|
72 |
-
"rstrip": false,
|
73 |
-
"single_word": false,
|
74 |
-
"special": true
|
75 |
-
},
|
76 |
-
"32006": {
|
77 |
-
"content": "<extra_id_93>",
|
78 |
-
"lstrip": false,
|
79 |
-
"normalized": false,
|
80 |
-
"rstrip": false,
|
81 |
-
"single_word": false,
|
82 |
-
"special": true
|
83 |
-
},
|
84 |
-
"32007": {
|
85 |
-
"content": "<extra_id_92>",
|
86 |
-
"lstrip": false,
|
87 |
-
"normalized": false,
|
88 |
-
"rstrip": false,
|
89 |
-
"single_word": false,
|
90 |
-
"special": true
|
91 |
-
},
|
92 |
-
"32008": {
|
93 |
-
"content": "<extra_id_91>",
|
94 |
-
"lstrip": false,
|
95 |
-
"normalized": false,
|
96 |
-
"rstrip": false,
|
97 |
-
"single_word": false,
|
98 |
-
"special": true
|
99 |
-
},
|
100 |
-
"32009": {
|
101 |
-
"content": "<extra_id_90>",
|
102 |
-
"lstrip": false,
|
103 |
-
"normalized": false,
|
104 |
-
"rstrip": false,
|
105 |
-
"single_word": false,
|
106 |
-
"special": true
|
107 |
-
},
|
108 |
-
"32010": {
|
109 |
-
"content": "<extra_id_89>",
|
110 |
-
"lstrip": false,
|
111 |
-
"normalized": false,
|
112 |
-
"rstrip": false,
|
113 |
-
"single_word": false,
|
114 |
-
"special": true
|
115 |
-
},
|
116 |
-
"32011": {
|
117 |
-
"content": "<extra_id_88>",
|
118 |
-
"lstrip": false,
|
119 |
-
"normalized": false,
|
120 |
-
"rstrip": false,
|
121 |
-
"single_word": false,
|
122 |
-
"special": true
|
123 |
-
},
|
124 |
-
"32012": {
|
125 |
-
"content": "<extra_id_87>",
|
126 |
-
"lstrip": false,
|
127 |
-
"normalized": false,
|
128 |
-
"rstrip": false,
|
129 |
-
"single_word": false,
|
130 |
-
"special": true
|
131 |
-
},
|
132 |
-
"32013": {
|
133 |
-
"content": "<extra_id_86>",
|
134 |
-
"lstrip": false,
|
135 |
-
"normalized": false,
|
136 |
-
"rstrip": false,
|
137 |
-
"single_word": false,
|
138 |
-
"special": true
|
139 |
-
},
|
140 |
-
"32014": {
|
141 |
-
"content": "<extra_id_85>",
|
142 |
-
"lstrip": false,
|
143 |
-
"normalized": false,
|
144 |
-
"rstrip": false,
|
145 |
-
"single_word": false,
|
146 |
-
"special": true
|
147 |
-
},
|
148 |
-
"32015": {
|
149 |
-
"content": "<extra_id_84>",
|
150 |
-
"lstrip": false,
|
151 |
-
"normalized": false,
|
152 |
-
"rstrip": false,
|
153 |
-
"single_word": false,
|
154 |
-
"special": true
|
155 |
-
},
|
156 |
-
"32016": {
|
157 |
-
"content": "<extra_id_83>",
|
158 |
-
"lstrip": false,
|
159 |
-
"normalized": false,
|
160 |
-
"rstrip": false,
|
161 |
-
"single_word": false,
|
162 |
-
"special": true
|
163 |
-
},
|
164 |
-
"32017": {
|
165 |
-
"content": "<extra_id_82>",
|
166 |
-
"lstrip": false,
|
167 |
-
"normalized": false,
|
168 |
-
"rstrip": false,
|
169 |
-
"single_word": false,
|
170 |
-
"special": true
|
171 |
-
},
|
172 |
-
"32018": {
|
173 |
-
"content": "<extra_id_81>",
|
174 |
-
"lstrip": false,
|
175 |
-
"normalized": false,
|
176 |
-
"rstrip": false,
|
177 |
-
"single_word": false,
|
178 |
-
"special": true
|
179 |
-
},
|
180 |
-
"32019": {
|
181 |
-
"content": "<extra_id_80>",
|
182 |
-
"lstrip": false,
|
183 |
-
"normalized": false,
|
184 |
-
"rstrip": false,
|
185 |
-
"single_word": false,
|
186 |
-
"special": true
|
187 |
-
},
|
188 |
-
"32020": {
|
189 |
-
"content": "<extra_id_79>",
|
190 |
-
"lstrip": false,
|
191 |
-
"normalized": false,
|
192 |
-
"rstrip": false,
|
193 |
-
"single_word": false,
|
194 |
-
"special": true
|
195 |
-
},
|
196 |
-
"32021": {
|
197 |
-
"content": "<extra_id_78>",
|
198 |
-
"lstrip": false,
|
199 |
-
"normalized": false,
|
200 |
-
"rstrip": false,
|
201 |
-
"single_word": false,
|
202 |
-
"special": true
|
203 |
-
},
|
204 |
-
"32022": {
|
205 |
-
"content": "<extra_id_77>",
|
206 |
-
"lstrip": false,
|
207 |
-
"normalized": false,
|
208 |
-
"rstrip": false,
|
209 |
-
"single_word": false,
|
210 |
-
"special": true
|
211 |
-
},
|
212 |
-
"32023": {
|
213 |
-
"content": "<extra_id_76>",
|
214 |
-
"lstrip": false,
|
215 |
-
"normalized": false,
|
216 |
-
"rstrip": false,
|
217 |
-
"single_word": false,
|
218 |
-
"special": true
|
219 |
-
},
|
220 |
-
"32024": {
|
221 |
-
"content": "<extra_id_75>",
|
222 |
-
"lstrip": false,
|
223 |
-
"normalized": false,
|
224 |
-
"rstrip": false,
|
225 |
-
"single_word": false,
|
226 |
-
"special": true
|
227 |
-
},
|
228 |
-
"32025": {
|
229 |
-
"content": "<extra_id_74>",
|
230 |
-
"lstrip": false,
|
231 |
-
"normalized": false,
|
232 |
-
"rstrip": false,
|
233 |
-
"single_word": false,
|
234 |
-
"special": true
|
235 |
-
},
|
236 |
-
"32026": {
|
237 |
-
"content": "<extra_id_73>",
|
238 |
-
"lstrip": false,
|
239 |
-
"normalized": false,
|
240 |
-
"rstrip": false,
|
241 |
-
"single_word": false,
|
242 |
-
"special": true
|
243 |
-
},
|
244 |
-
"32027": {
|
245 |
-
"content": "<extra_id_72>",
|
246 |
-
"lstrip": false,
|
247 |
-
"normalized": false,
|
248 |
-
"rstrip": false,
|
249 |
-
"single_word": false,
|
250 |
-
"special": true
|
251 |
-
},
|
252 |
-
"32028": {
|
253 |
-
"content": "<extra_id_71>",
|
254 |
-
"lstrip": false,
|
255 |
-
"normalized": false,
|
256 |
-
"rstrip": false,
|
257 |
-
"single_word": false,
|
258 |
-
"special": true
|
259 |
-
},
|
260 |
-
"32029": {
|
261 |
-
"content": "<extra_id_70>",
|
262 |
-
"lstrip": false,
|
263 |
-
"normalized": false,
|
264 |
-
"rstrip": false,
|
265 |
-
"single_word": false,
|
266 |
-
"special": true
|
267 |
-
},
|
268 |
-
"32030": {
|
269 |
-
"content": "<extra_id_69>",
|
270 |
-
"lstrip": false,
|
271 |
-
"normalized": false,
|
272 |
-
"rstrip": false,
|
273 |
-
"single_word": false,
|
274 |
-
"special": true
|
275 |
-
},
|
276 |
-
"32031": {
|
277 |
-
"content": "<extra_id_68>",
|
278 |
-
"lstrip": false,
|
279 |
-
"normalized": false,
|
280 |
-
"rstrip": false,
|
281 |
-
"single_word": false,
|
282 |
-
"special": true
|
283 |
-
},
|
284 |
-
"32032": {
|
285 |
-
"content": "<extra_id_67>",
|
286 |
-
"lstrip": false,
|
287 |
-
"normalized": false,
|
288 |
-
"rstrip": false,
|
289 |
-
"single_word": false,
|
290 |
-
"special": true
|
291 |
-
},
|
292 |
-
"32033": {
|
293 |
-
"content": "<extra_id_66>",
|
294 |
-
"lstrip": false,
|
295 |
-
"normalized": false,
|
296 |
-
"rstrip": false,
|
297 |
-
"single_word": false,
|
298 |
-
"special": true
|
299 |
-
},
|
300 |
-
"32034": {
|
301 |
-
"content": "<extra_id_65>",
|
302 |
-
"lstrip": false,
|
303 |
-
"normalized": false,
|
304 |
-
"rstrip": false,
|
305 |
-
"single_word": false,
|
306 |
-
"special": true
|
307 |
-
},
|
308 |
-
"32035": {
|
309 |
-
"content": "<extra_id_64>",
|
310 |
-
"lstrip": false,
|
311 |
-
"normalized": false,
|
312 |
-
"rstrip": false,
|
313 |
-
"single_word": false,
|
314 |
-
"special": true
|
315 |
-
},
|
316 |
-
"32036": {
|
317 |
-
"content": "<extra_id_63>",
|
318 |
-
"lstrip": false,
|
319 |
-
"normalized": false,
|
320 |
-
"rstrip": false,
|
321 |
-
"single_word": false,
|
322 |
-
"special": true
|
323 |
-
},
|
324 |
-
"32037": {
|
325 |
-
"content": "<extra_id_62>",
|
326 |
-
"lstrip": false,
|
327 |
-
"normalized": false,
|
328 |
-
"rstrip": false,
|
329 |
-
"single_word": false,
|
330 |
-
"special": true
|
331 |
-
},
|
332 |
-
"32038": {
|
333 |
-
"content": "<extra_id_61>",
|
334 |
-
"lstrip": false,
|
335 |
-
"normalized": false,
|
336 |
-
"rstrip": false,
|
337 |
-
"single_word": false,
|
338 |
-
"special": true
|
339 |
-
},
|
340 |
-
"32039": {
|
341 |
-
"content": "<extra_id_60>",
|
342 |
-
"lstrip": false,
|
343 |
-
"normalized": false,
|
344 |
-
"rstrip": false,
|
345 |
-
"single_word": false,
|
346 |
-
"special": true
|
347 |
-
},
|
348 |
-
"32040": {
|
349 |
-
"content": "<extra_id_59>",
|
350 |
-
"lstrip": false,
|
351 |
-
"normalized": false,
|
352 |
-
"rstrip": false,
|
353 |
-
"single_word": false,
|
354 |
-
"special": true
|
355 |
-
},
|
356 |
-
"32041": {
|
357 |
-
"content": "<extra_id_58>",
|
358 |
-
"lstrip": false,
|
359 |
-
"normalized": false,
|
360 |
-
"rstrip": false,
|
361 |
-
"single_word": false,
|
362 |
-
"special": true
|
363 |
-
},
|
364 |
-
"32042": {
|
365 |
-
"content": "<extra_id_57>",
|
366 |
-
"lstrip": false,
|
367 |
-
"normalized": false,
|
368 |
-
"rstrip": false,
|
369 |
-
"single_word": false,
|
370 |
-
"special": true
|
371 |
-
},
|
372 |
-
"32043": {
|
373 |
-
"content": "<extra_id_56>",
|
374 |
-
"lstrip": false,
|
375 |
-
"normalized": false,
|
376 |
-
"rstrip": false,
|
377 |
-
"single_word": false,
|
378 |
-
"special": true
|
379 |
-
},
|
380 |
-
"32044": {
|
381 |
-
"content": "<extra_id_55>",
|
382 |
-
"lstrip": false,
|
383 |
-
"normalized": false,
|
384 |
-
"rstrip": false,
|
385 |
-
"single_word": false,
|
386 |
-
"special": true
|
387 |
-
},
|
388 |
-
"32045": {
|
389 |
-
"content": "<extra_id_54>",
|
390 |
-
"lstrip": false,
|
391 |
-
"normalized": false,
|
392 |
-
"rstrip": false,
|
393 |
-
"single_word": false,
|
394 |
-
"special": true
|
395 |
-
},
|
396 |
-
"32046": {
|
397 |
-
"content": "<extra_id_53>",
|
398 |
-
"lstrip": false,
|
399 |
-
"normalized": false,
|
400 |
-
"rstrip": false,
|
401 |
-
"single_word": false,
|
402 |
-
"special": true
|
403 |
-
},
|
404 |
-
"32047": {
|
405 |
-
"content": "<extra_id_52>",
|
406 |
-
"lstrip": false,
|
407 |
-
"normalized": false,
|
408 |
-
"rstrip": false,
|
409 |
-
"single_word": false,
|
410 |
-
"special": true
|
411 |
-
},
|
412 |
-
"32048": {
|
413 |
-
"content": "<extra_id_51>",
|
414 |
-
"lstrip": false,
|
415 |
-
"normalized": false,
|
416 |
-
"rstrip": false,
|
417 |
-
"single_word": false,
|
418 |
-
"special": true
|
419 |
-
},
|
420 |
-
"32049": {
|
421 |
-
"content": "<extra_id_50>",
|
422 |
-
"lstrip": false,
|
423 |
-
"normalized": false,
|
424 |
-
"rstrip": false,
|
425 |
-
"single_word": false,
|
426 |
-
"special": true
|
427 |
-
},
|
428 |
-
"32050": {
|
429 |
-
"content": "<extra_id_49>",
|
430 |
-
"lstrip": false,
|
431 |
-
"normalized": false,
|
432 |
-
"rstrip": false,
|
433 |
-
"single_word": false,
|
434 |
-
"special": true
|
435 |
-
},
|
436 |
-
"32051": {
|
437 |
-
"content": "<extra_id_48>",
|
438 |
-
"lstrip": false,
|
439 |
-
"normalized": false,
|
440 |
-
"rstrip": false,
|
441 |
-
"single_word": false,
|
442 |
-
"special": true
|
443 |
-
},
|
444 |
-
"32052": {
|
445 |
-
"content": "<extra_id_47>",
|
446 |
-
"lstrip": false,
|
447 |
-
"normalized": false,
|
448 |
-
"rstrip": false,
|
449 |
-
"single_word": false,
|
450 |
-
"special": true
|
451 |
-
},
|
452 |
-
"32053": {
|
453 |
-
"content": "<extra_id_46>",
|
454 |
-
"lstrip": false,
|
455 |
-
"normalized": false,
|
456 |
-
"rstrip": false,
|
457 |
-
"single_word": false,
|
458 |
-
"special": true
|
459 |
-
},
|
460 |
-
"32054": {
|
461 |
-
"content": "<extra_id_45>",
|
462 |
-
"lstrip": false,
|
463 |
-
"normalized": false,
|
464 |
-
"rstrip": false,
|
465 |
-
"single_word": false,
|
466 |
-
"special": true
|
467 |
-
},
|
468 |
-
"32055": {
|
469 |
-
"content": "<extra_id_44>",
|
470 |
-
"lstrip": false,
|
471 |
-
"normalized": false,
|
472 |
-
"rstrip": false,
|
473 |
-
"single_word": false,
|
474 |
-
"special": true
|
475 |
-
},
|
476 |
-
"32056": {
|
477 |
-
"content": "<extra_id_43>",
|
478 |
-
"lstrip": false,
|
479 |
-
"normalized": false,
|
480 |
-
"rstrip": false,
|
481 |
-
"single_word": false,
|
482 |
-
"special": true
|
483 |
-
},
|
484 |
-
"32057": {
|
485 |
-
"content": "<extra_id_42>",
|
486 |
-
"lstrip": false,
|
487 |
-
"normalized": false,
|
488 |
-
"rstrip": false,
|
489 |
-
"single_word": false,
|
490 |
-
"special": true
|
491 |
-
},
|
492 |
-
"32058": {
|
493 |
-
"content": "<extra_id_41>",
|
494 |
-
"lstrip": false,
|
495 |
-
"normalized": false,
|
496 |
-
"rstrip": false,
|
497 |
-
"single_word": false,
|
498 |
-
"special": true
|
499 |
-
},
|
500 |
-
"32059": {
|
501 |
-
"content": "<extra_id_40>",
|
502 |
-
"lstrip": false,
|
503 |
-
"normalized": false,
|
504 |
-
"rstrip": false,
|
505 |
-
"single_word": false,
|
506 |
-
"special": true
|
507 |
-
},
|
508 |
-
"32060": {
|
509 |
-
"content": "<extra_id_39>",
|
510 |
-
"lstrip": false,
|
511 |
-
"normalized": false,
|
512 |
-
"rstrip": false,
|
513 |
-
"single_word": false,
|
514 |
-
"special": true
|
515 |
-
},
|
516 |
-
"32061": {
|
517 |
-
"content": "<extra_id_38>",
|
518 |
-
"lstrip": false,
|
519 |
-
"normalized": false,
|
520 |
-
"rstrip": false,
|
521 |
-
"single_word": false,
|
522 |
-
"special": true
|
523 |
-
},
|
524 |
-
"32062": {
|
525 |
-
"content": "<extra_id_37>",
|
526 |
-
"lstrip": false,
|
527 |
-
"normalized": false,
|
528 |
-
"rstrip": false,
|
529 |
-
"single_word": false,
|
530 |
-
"special": true
|
531 |
-
},
|
532 |
-
"32063": {
|
533 |
-
"content": "<extra_id_36>",
|
534 |
-
"lstrip": false,
|
535 |
-
"normalized": false,
|
536 |
-
"rstrip": false,
|
537 |
-
"single_word": false,
|
538 |
-
"special": true
|
539 |
-
},
|
540 |
-
"32064": {
|
541 |
-
"content": "<extra_id_35>",
|
542 |
-
"lstrip": false,
|
543 |
-
"normalized": false,
|
544 |
-
"rstrip": false,
|
545 |
-
"single_word": false,
|
546 |
-
"special": true
|
547 |
-
},
|
548 |
-
"32065": {
|
549 |
-
"content": "<extra_id_34>",
|
550 |
-
"lstrip": false,
|
551 |
-
"normalized": false,
|
552 |
-
"rstrip": false,
|
553 |
-
"single_word": false,
|
554 |
-
"special": true
|
555 |
-
},
|
556 |
-
"32066": {
|
557 |
-
"content": "<extra_id_33>",
|
558 |
-
"lstrip": false,
|
559 |
-
"normalized": false,
|
560 |
-
"rstrip": false,
|
561 |
-
"single_word": false,
|
562 |
-
"special": true
|
563 |
-
},
|
564 |
-
"32067": {
|
565 |
-
"content": "<extra_id_32>",
|
566 |
-
"lstrip": false,
|
567 |
-
"normalized": false,
|
568 |
-
"rstrip": false,
|
569 |
-
"single_word": false,
|
570 |
-
"special": true
|
571 |
-
},
|
572 |
-
"32068": {
|
573 |
-
"content": "<extra_id_31>",
|
574 |
-
"lstrip": false,
|
575 |
-
"normalized": false,
|
576 |
-
"rstrip": false,
|
577 |
-
"single_word": false,
|
578 |
-
"special": true
|
579 |
-
},
|
580 |
-
"32069": {
|
581 |
-
"content": "<extra_id_30>",
|
582 |
-
"lstrip": false,
|
583 |
-
"normalized": false,
|
584 |
-
"rstrip": false,
|
585 |
-
"single_word": false,
|
586 |
-
"special": true
|
587 |
-
},
|
588 |
-
"32070": {
|
589 |
-
"content": "<extra_id_29>",
|
590 |
-
"lstrip": false,
|
591 |
-
"normalized": false,
|
592 |
-
"rstrip": false,
|
593 |
-
"single_word": false,
|
594 |
-
"special": true
|
595 |
-
},
|
596 |
-
"32071": {
|
597 |
-
"content": "<extra_id_28>",
|
598 |
-
"lstrip": false,
|
599 |
-
"normalized": false,
|
600 |
-
"rstrip": false,
|
601 |
-
"single_word": false,
|
602 |
-
"special": true
|
603 |
-
},
|
604 |
-
"32072": {
|
605 |
-
"content": "<extra_id_27>",
|
606 |
-
"lstrip": false,
|
607 |
-
"normalized": false,
|
608 |
-
"rstrip": false,
|
609 |
-
"single_word": false,
|
610 |
-
"special": true
|
611 |
-
},
|
612 |
-
"32073": {
|
613 |
-
"content": "<extra_id_26>",
|
614 |
-
"lstrip": false,
|
615 |
-
"normalized": false,
|
616 |
-
"rstrip": false,
|
617 |
-
"single_word": false,
|
618 |
-
"special": true
|
619 |
-
},
|
620 |
-
"32074": {
|
621 |
-
"content": "<extra_id_25>",
|
622 |
-
"lstrip": false,
|
623 |
-
"normalized": false,
|
624 |
-
"rstrip": false,
|
625 |
-
"single_word": false,
|
626 |
-
"special": true
|
627 |
-
},
|
628 |
-
"32075": {
|
629 |
-
"content": "<extra_id_24>",
|
630 |
-
"lstrip": false,
|
631 |
-
"normalized": false,
|
632 |
-
"rstrip": false,
|
633 |
-
"single_word": false,
|
634 |
-
"special": true
|
635 |
-
},
|
636 |
-
"32076": {
|
637 |
-
"content": "<extra_id_23>",
|
638 |
-
"lstrip": false,
|
639 |
-
"normalized": false,
|
640 |
-
"rstrip": false,
|
641 |
-
"single_word": false,
|
642 |
-
"special": true
|
643 |
-
},
|
644 |
-
"32077": {
|
645 |
-
"content": "<extra_id_22>",
|
646 |
-
"lstrip": false,
|
647 |
-
"normalized": false,
|
648 |
-
"rstrip": false,
|
649 |
-
"single_word": false,
|
650 |
-
"special": true
|
651 |
-
},
|
652 |
-
"32078": {
|
653 |
-
"content": "<extra_id_21>",
|
654 |
-
"lstrip": false,
|
655 |
-
"normalized": false,
|
656 |
-
"rstrip": false,
|
657 |
-
"single_word": false,
|
658 |
-
"special": true
|
659 |
-
},
|
660 |
-
"32079": {
|
661 |
-
"content": "<extra_id_20>",
|
662 |
-
"lstrip": false,
|
663 |
-
"normalized": false,
|
664 |
-
"rstrip": false,
|
665 |
-
"single_word": false,
|
666 |
-
"special": true
|
667 |
-
},
|
668 |
-
"32080": {
|
669 |
-
"content": "<extra_id_19>",
|
670 |
-
"lstrip": false,
|
671 |
-
"normalized": false,
|
672 |
-
"rstrip": false,
|
673 |
-
"single_word": false,
|
674 |
-
"special": true
|
675 |
-
},
|
676 |
-
"32081": {
|
677 |
-
"content": "<extra_id_18>",
|
678 |
-
"lstrip": false,
|
679 |
-
"normalized": false,
|
680 |
-
"rstrip": false,
|
681 |
-
"single_word": false,
|
682 |
-
"special": true
|
683 |
-
},
|
684 |
-
"32082": {
|
685 |
-
"content": "<extra_id_17>",
|
686 |
-
"lstrip": false,
|
687 |
-
"normalized": false,
|
688 |
-
"rstrip": false,
|
689 |
-
"single_word": false,
|
690 |
-
"special": true
|
691 |
-
},
|
692 |
-
"32083": {
|
693 |
-
"content": "<extra_id_16>",
|
694 |
-
"lstrip": false,
|
695 |
-
"normalized": false,
|
696 |
-
"rstrip": false,
|
697 |
-
"single_word": false,
|
698 |
-
"special": true
|
699 |
-
},
|
700 |
-
"32084": {
|
701 |
-
"content": "<extra_id_15>",
|
702 |
-
"lstrip": false,
|
703 |
-
"normalized": false,
|
704 |
-
"rstrip": false,
|
705 |
-
"single_word": false,
|
706 |
-
"special": true
|
707 |
-
},
|
708 |
-
"32085": {
|
709 |
-
"content": "<extra_id_14>",
|
710 |
-
"lstrip": false,
|
711 |
-
"normalized": false,
|
712 |
-
"rstrip": false,
|
713 |
-
"single_word": false,
|
714 |
-
"special": true
|
715 |
-
},
|
716 |
-
"32086": {
|
717 |
-
"content": "<extra_id_13>",
|
718 |
-
"lstrip": false,
|
719 |
-
"normalized": false,
|
720 |
-
"rstrip": false,
|
721 |
-
"single_word": false,
|
722 |
-
"special": true
|
723 |
-
},
|
724 |
-
"32087": {
|
725 |
-
"content": "<extra_id_12>",
|
726 |
-
"lstrip": false,
|
727 |
-
"normalized": false,
|
728 |
-
"rstrip": false,
|
729 |
-
"single_word": false,
|
730 |
-
"special": true
|
731 |
-
},
|
732 |
-
"32088": {
|
733 |
-
"content": "<extra_id_11>",
|
734 |
-
"lstrip": false,
|
735 |
-
"normalized": false,
|
736 |
-
"rstrip": false,
|
737 |
-
"single_word": false,
|
738 |
-
"special": true
|
739 |
-
},
|
740 |
-
"32089": {
|
741 |
-
"content": "<extra_id_10>",
|
742 |
-
"lstrip": false,
|
743 |
-
"normalized": false,
|
744 |
-
"rstrip": false,
|
745 |
-
"single_word": false,
|
746 |
-
"special": true
|
747 |
-
},
|
748 |
-
"32090": {
|
749 |
-
"content": "<extra_id_9>",
|
750 |
-
"lstrip": false,
|
751 |
-
"normalized": false,
|
752 |
-
"rstrip": false,
|
753 |
-
"single_word": false,
|
754 |
-
"special": true
|
755 |
-
},
|
756 |
-
"32091": {
|
757 |
-
"content": "<extra_id_8>",
|
758 |
-
"lstrip": false,
|
759 |
-
"normalized": false,
|
760 |
-
"rstrip": false,
|
761 |
-
"single_word": false,
|
762 |
-
"special": true
|
763 |
-
},
|
764 |
-
"32092": {
|
765 |
-
"content": "<extra_id_7>",
|
766 |
-
"lstrip": false,
|
767 |
-
"normalized": false,
|
768 |
-
"rstrip": false,
|
769 |
-
"single_word": false,
|
770 |
-
"special": true
|
771 |
-
},
|
772 |
-
"32093": {
|
773 |
-
"content": "<extra_id_6>",
|
774 |
-
"lstrip": false,
|
775 |
-
"normalized": false,
|
776 |
-
"rstrip": false,
|
777 |
-
"single_word": false,
|
778 |
-
"special": true
|
779 |
-
},
|
780 |
-
"32094": {
|
781 |
-
"content": "<extra_id_5>",
|
782 |
-
"lstrip": false,
|
783 |
-
"normalized": false,
|
784 |
-
"rstrip": false,
|
785 |
-
"single_word": false,
|
786 |
-
"special": true
|
787 |
-
},
|
788 |
-
"32095": {
|
789 |
-
"content": "<extra_id_4>",
|
790 |
-
"lstrip": false,
|
791 |
-
"normalized": false,
|
792 |
-
"rstrip": false,
|
793 |
-
"single_word": false,
|
794 |
-
"special": true
|
795 |
-
},
|
796 |
-
"32096": {
|
797 |
-
"content": "<extra_id_3>",
|
798 |
-
"lstrip": false,
|
799 |
-
"normalized": false,
|
800 |
-
"rstrip": false,
|
801 |
-
"single_word": false,
|
802 |
-
"special": true
|
803 |
-
},
|
804 |
-
"32097": {
|
805 |
-
"content": "<extra_id_2>",
|
806 |
-
"lstrip": false,
|
807 |
-
"normalized": false,
|
808 |
-
"rstrip": false,
|
809 |
-
"single_word": false,
|
810 |
-
"special": true
|
811 |
-
},
|
812 |
-
"32098": {
|
813 |
-
"content": "<extra_id_1>",
|
814 |
-
"lstrip": false,
|
815 |
-
"normalized": false,
|
816 |
-
"rstrip": false,
|
817 |
-
"single_word": false,
|
818 |
-
"special": true
|
819 |
-
},
|
820 |
-
"32099": {
|
821 |
-
"content": "<extra_id_0>",
|
822 |
-
"lstrip": false,
|
823 |
-
"normalized": false,
|
824 |
-
"rstrip": false,
|
825 |
-
"single_word": false,
|
826 |
-
"special": true
|
827 |
-
}
|
828 |
-
},
|
829 |
-
"additional_special_tokens": [
|
830 |
-
"<extra_id_0>",
|
831 |
-
"<extra_id_1>",
|
832 |
-
"<extra_id_2>",
|
833 |
-
"<extra_id_3>",
|
834 |
-
"<extra_id_4>",
|
835 |
-
"<extra_id_5>",
|
836 |
-
"<extra_id_6>",
|
837 |
-
"<extra_id_7>",
|
838 |
-
"<extra_id_8>",
|
839 |
-
"<extra_id_9>",
|
840 |
-
"<extra_id_10>",
|
841 |
-
"<extra_id_11>",
|
842 |
-
"<extra_id_12>",
|
843 |
-
"<extra_id_13>",
|
844 |
-
"<extra_id_14>",
|
845 |
-
"<extra_id_15>",
|
846 |
-
"<extra_id_16>",
|
847 |
-
"<extra_id_17>",
|
848 |
-
"<extra_id_18>",
|
849 |
-
"<extra_id_19>",
|
850 |
-
"<extra_id_20>",
|
851 |
-
"<extra_id_21>",
|
852 |
-
"<extra_id_22>",
|
853 |
-
"<extra_id_23>",
|
854 |
-
"<extra_id_24>",
|
855 |
-
"<extra_id_25>",
|
856 |
-
"<extra_id_26>",
|
857 |
-
"<extra_id_27>",
|
858 |
-
"<extra_id_28>",
|
859 |
-
"<extra_id_29>",
|
860 |
-
"<extra_id_30>",
|
861 |
-
"<extra_id_31>",
|
862 |
-
"<extra_id_32>",
|
863 |
-
"<extra_id_33>",
|
864 |
-
"<extra_id_34>",
|
865 |
-
"<extra_id_35>",
|
866 |
-
"<extra_id_36>",
|
867 |
-
"<extra_id_37>",
|
868 |
-
"<extra_id_38>",
|
869 |
-
"<extra_id_39>",
|
870 |
-
"<extra_id_40>",
|
871 |
-
"<extra_id_41>",
|
872 |
-
"<extra_id_42>",
|
873 |
-
"<extra_id_43>",
|
874 |
-
"<extra_id_44>",
|
875 |
-
"<extra_id_45>",
|
876 |
-
"<extra_id_46>",
|
877 |
-
"<extra_id_47>",
|
878 |
-
"<extra_id_48>",
|
879 |
-
"<extra_id_49>",
|
880 |
-
"<extra_id_50>",
|
881 |
-
"<extra_id_51>",
|
882 |
-
"<extra_id_52>",
|
883 |
-
"<extra_id_53>",
|
884 |
-
"<extra_id_54>",
|
885 |
-
"<extra_id_55>",
|
886 |
-
"<extra_id_56>",
|
887 |
-
"<extra_id_57>",
|
888 |
-
"<extra_id_58>",
|
889 |
-
"<extra_id_59>",
|
890 |
-
"<extra_id_60>",
|
891 |
-
"<extra_id_61>",
|
892 |
-
"<extra_id_62>",
|
893 |
-
"<extra_id_63>",
|
894 |
-
"<extra_id_64>",
|
895 |
-
"<extra_id_65>",
|
896 |
-
"<extra_id_66>",
|
897 |
-
"<extra_id_67>",
|
898 |
-
"<extra_id_68>",
|
899 |
-
"<extra_id_69>",
|
900 |
-
"<extra_id_70>",
|
901 |
-
"<extra_id_71>",
|
902 |
-
"<extra_id_72>",
|
903 |
-
"<extra_id_73>",
|
904 |
-
"<extra_id_74>",
|
905 |
-
"<extra_id_75>",
|
906 |
-
"<extra_id_76>",
|
907 |
-
"<extra_id_77>",
|
908 |
-
"<extra_id_78>",
|
909 |
-
"<extra_id_79>",
|
910 |
-
"<extra_id_80>",
|
911 |
-
"<extra_id_81>",
|
912 |
-
"<extra_id_82>",
|
913 |
-
"<extra_id_83>",
|
914 |
-
"<extra_id_84>",
|
915 |
-
"<extra_id_85>",
|
916 |
-
"<extra_id_86>",
|
917 |
-
"<extra_id_87>",
|
918 |
-
"<extra_id_88>",
|
919 |
-
"<extra_id_89>",
|
920 |
-
"<extra_id_90>",
|
921 |
-
"<extra_id_91>",
|
922 |
-
"<extra_id_92>",
|
923 |
-
"<extra_id_93>",
|
924 |
-
"<extra_id_94>",
|
925 |
-
"<extra_id_95>",
|
926 |
-
"<extra_id_96>",
|
927 |
-
"<extra_id_97>",
|
928 |
-
"<extra_id_98>",
|
929 |
-
"<extra_id_99>"
|
930 |
-
],
|
931 |
-
"clean_up_tokenization_spaces": true,
|
932 |
-
"eos_token": "</s>",
|
933 |
-
"extra_ids": 100,
|
934 |
-
"legacy": true,
|
935 |
-
"model_max_length": 512,
|
936 |
-
"pad_token": "<pad>",
|
937 |
-
"sp_model_kwargs": {},
|
938 |
-
"tokenizer_class": "T5Tokenizer",
|
939 |
-
"unk_token": "<unk>"
|
940 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/transformer/config.json
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_class_name": "FluxTransformer2DModel",
|
3 |
-
"_diffusers_version": "0.30.0.dev0",
|
4 |
-
"attention_head_dim": 128,
|
5 |
-
"guidance_embeds": false,
|
6 |
-
"in_channels": 64,
|
7 |
-
"joint_attention_dim": 4096,
|
8 |
-
"num_attention_heads": 24,
|
9 |
-
"num_layers": 19,
|
10 |
-
"num_single_layers": 38,
|
11 |
-
"patch_size": 1,
|
12 |
-
"pooled_projection_dim": 768
|
13 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/transformer/diffusion_pytorch_model-00001-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:9b633dbe87316385c5b1c262bd4b5a01e3d955170661d63dcec8a01e89c0d820
|
3 |
-
size 9962580296
|
|
|
|
|
|
|
|
data/transformer/diffusion_pytorch_model-00002-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:58b4434078f0c2567ddc54e3b5cbf39626ab55fbd9d5c22956e183668f535dec
|
3 |
-
size 9949328904
|
|
|
|
|
|
|
|
data/transformer/diffusion_pytorch_model-00003-of-00003.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e2cbc25471ed5186e69a9b51098300cb2f612556453e38a372c851a220ed238d
|
3 |
-
size 3870584832
|
|
|
|
|
|
|
|
data/transformer/diffusion_pytorch_model.safetensors.index.json
DELETED
The diff for this file is too large to render.
See raw diff
|
|
data/vae/config.json
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"_class_name": "AutoencoderKL",
|
3 |
-
"_diffusers_version": "0.30.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": 16,
|
20 |
-
"latents_mean": null,
|
21 |
-
"latents_std": null,
|
22 |
-
"layers_per_block": 2,
|
23 |
-
"mid_block_add_attention": true,
|
24 |
-
"norm_num_groups": 32,
|
25 |
-
"out_channels": 3,
|
26 |
-
"sample_size": 1024,
|
27 |
-
"scaling_factor": 0.3611,
|
28 |
-
"shift_factor": 0.1159,
|
29 |
-
"up_block_types": [
|
30 |
-
"UpDecoderBlock2D",
|
31 |
-
"UpDecoderBlock2D",
|
32 |
-
"UpDecoderBlock2D",
|
33 |
-
"UpDecoderBlock2D"
|
34 |
-
],
|
35 |
-
"use_post_quant_conv": false,
|
36 |
-
"use_quant_conv": false
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/vae/diffusion_pytorch_model.safetensors
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:f5b59a26851551b67ae1fe58d32e76486e1e812def4696a4bea97f16604d40a3
|
3 |
-
size 167666902
|
|
|
|
|
|
|
|
data/schnell_grid.jpeg → example.png
RENAMED
File without changes
|
flumina.py
CHANGED
@@ -4,30 +4,130 @@ from fireworks.flumina import FluminaModule, main as flumina_main
|
|
4 |
from fireworks.flumina.route import post
|
5 |
import pydantic
|
6 |
from pydantic import BaseModel
|
7 |
-
from fastapi import File, Form, UploadFile, HTTPException
|
8 |
-
from fastapi.responses import Response
|
|
|
9 |
import os
|
|
|
10 |
import PIL.Image as Image
|
11 |
-
from
|
12 |
-
from typing import Dict, List, Optional, Set
|
13 |
|
14 |
from diffusers import FluxPipeline, FluxControlNetPipeline, FluxControlNetModel
|
15 |
from diffusers.models import FluxMultiControlNetModel
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
# Define your request and response schemata here
|
18 |
-
class
|
19 |
prompt: str
|
20 |
-
|
21 |
-
width: int = 1360
|
22 |
guidance_scale: float = 3.5
|
23 |
-
num_inference_steps: int =
|
24 |
seed: int = 0
|
25 |
|
26 |
-
# ControlNet Params
|
27 |
-
# control_image: Optional[Image.Image]
|
28 |
-
control_mode: Optional[str]
|
29 |
-
controlnet_conditioning_scale: Optional[float] = 1.0
|
30 |
-
|
31 |
|
32 |
class Error(BaseModel):
|
33 |
object: str = "error"
|
@@ -39,6 +139,13 @@ class ErrorResponse(BaseModel):
|
|
39 |
error: Error = pydantic.Field(default_factory=Error)
|
40 |
|
41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
class FluminaModule(FluminaModule):
|
43 |
def __init__(self):
|
44 |
super().__init__()
|
@@ -69,52 +176,55 @@ class FluminaModule(FluminaModule):
|
|
69 |
media_type="application/json",
|
70 |
)
|
71 |
|
72 |
-
def _image_response(self, img: Image.Image):
|
73 |
-
|
74 |
-
img.save(bio, format="png")
|
75 |
-
bio.seek(0)
|
76 |
if self._test_return_sync_response:
|
77 |
-
return
|
78 |
else:
|
79 |
-
|
80 |
-
|
81 |
|
82 |
@post('/text_to_image')
|
83 |
async def text_to_image(
|
84 |
self,
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
seed: int = Form(0),
|
91 |
-
):
|
92 |
img = self.hf_model(
|
93 |
-
prompt=prompt,
|
94 |
height=height,
|
95 |
width=width,
|
96 |
-
guidance_scale=guidance_scale,
|
97 |
-
num_inference_steps=num_inference_steps,
|
98 |
-
generator=torch.Generator('cuda').manual_seed(seed),
|
99 |
)
|
100 |
assert len(img.images) == 1, len(img.images)
|
101 |
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
@post('/control_net')
|
105 |
async def control_net(
|
106 |
self,
|
107 |
prompt: str = Form(...),
|
108 |
-
control_image: UploadFile =
|
109 |
control_mode: int = Form(...),
|
110 |
-
|
111 |
-
width: int = Form(1360),
|
112 |
guidance_scale: float = Form(3.5),
|
113 |
-
num_inference_steps: int = Form(
|
114 |
seed: int = Form(0),
|
115 |
# ControlNet Parameters
|
116 |
-
controlnet_conditioning_scale: Optional[float] = Form(1.0)
|
|
|
117 |
):
|
|
|
118 |
if self.active_cnet_union is None:
|
119 |
return self._error_response(400, f"Must call `/control_net` endpoint with a ControlNet model specified in the URI")
|
120 |
|
@@ -128,6 +238,7 @@ class FluminaModule(FluminaModule):
|
|
128 |
except Exception as e:
|
129 |
return self._error_response(400, f"Invalid image format: {e}")
|
130 |
|
|
|
131 |
img = self.cnet_union_pipes[self.active_cnet_union](
|
132 |
prompt=prompt,
|
133 |
control_image=[pil_image],
|
@@ -141,7 +252,13 @@ class FluminaModule(FluminaModule):
|
|
141 |
)
|
142 |
assert len(img.images) == 1, len(img.images)
|
143 |
|
144 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
145 |
|
146 |
|
147 |
@property
|
@@ -235,12 +352,14 @@ if __name__ == "__main__":
|
|
235 |
|
236 |
# Test text-to-image
|
237 |
t2i_out = asyncio.run(f.text_to_image(
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
|
|
244 |
))
|
245 |
assert isinstance(t2i_out, bytes), t2i_out
|
246 |
with open('output.png', 'wb') as out_file:
|
@@ -280,12 +399,12 @@ if __name__ == "__main__":
|
|
280 |
prompt="Cyberpunk future fox nighttime purple and green",
|
281 |
control_image=FakeFile('output.png'),
|
282 |
control_mode=0, # canny
|
283 |
-
|
284 |
-
width=1360,
|
285 |
guidance_scale=3.5,
|
286 |
num_inference_steps=4,
|
287 |
seed=0,
|
288 |
controlnet_conditioning_scale=1.0,
|
|
|
289 |
))
|
290 |
assert isinstance(cn_out, bytes), cn_out
|
291 |
f.deactivate_addon(addon_acct_id, addon_model_id)
|
@@ -303,12 +422,14 @@ if __name__ == "__main__":
|
|
303 |
f.activate_addon(addon_acct_id, addon_model_id)
|
304 |
|
305 |
lora_out = asyncio.run(f.text_to_image(
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
|
|
|
|
312 |
))
|
313 |
assert isinstance(lora_out, bytes), lora_out
|
314 |
|
|
|
4 |
from fireworks.flumina.route import post
|
5 |
import pydantic
|
6 |
from pydantic import BaseModel
|
7 |
+
from fastapi import File, Form, Header, UploadFile, HTTPException
|
8 |
+
from fastapi.responses import Response
|
9 |
+
import math
|
10 |
import os
|
11 |
+
import re
|
12 |
import PIL.Image as Image
|
13 |
+
from typing import Dict, Optional, Set, Tuple
|
|
|
14 |
|
15 |
from diffusers import FluxPipeline, FluxControlNetPipeline, FluxControlNetModel
|
16 |
from diffusers.models import FluxMultiControlNetModel
|
17 |
|
18 |
+
|
19 |
+
# Util
|
20 |
+
def _aspect_ratio_to_width_height(aspect_ratio: str) -> Tuple[int, int]:
|
21 |
+
"""
|
22 |
+
Convert specified aspect ratio to a height/width pair.
|
23 |
+
"""
|
24 |
+
if ":" not in aspect_ratio:
|
25 |
+
raise ValueError(
|
26 |
+
f"Invalid aspect ratio: {aspect_ratio}. Aspect ratio must be in w:h format, e.g. 16:9"
|
27 |
+
)
|
28 |
+
|
29 |
+
w, h = aspect_ratio.split(":")
|
30 |
+
try:
|
31 |
+
w, h = int(w), int(h)
|
32 |
+
except ValueError:
|
33 |
+
raise ValueError(
|
34 |
+
f"Invalid aspect ratio: {aspect_ratio}. Aspect ratio must be in w:h format, e.g. 16:9"
|
35 |
+
)
|
36 |
+
|
37 |
+
valid_aspect_ratios = [
|
38 |
+
(1, 1),
|
39 |
+
(21, 9),
|
40 |
+
(16, 9),
|
41 |
+
(3, 2),
|
42 |
+
(5, 4),
|
43 |
+
(4, 5),
|
44 |
+
(2, 3),
|
45 |
+
(9, 16),
|
46 |
+
(9, 21),
|
47 |
+
]
|
48 |
+
if (w, h) not in valid_aspect_ratios:
|
49 |
+
raise ValueError(
|
50 |
+
f"Invalid aspect ratio: {aspect_ratio}. Aspect ratio must be one of {valid_aspect_ratios}"
|
51 |
+
)
|
52 |
+
|
53 |
+
# We consider megapixel not 10^6 pixels but 2^20 (1024x1024) pixels
|
54 |
+
TARGET_SIZE_MP = 1
|
55 |
+
target_size = TARGET_SIZE_MP * 2**20
|
56 |
+
|
57 |
+
width = math.sqrt(target_size / (w * h)) * w
|
58 |
+
height = math.sqrt(target_size / (w * h)) * h
|
59 |
+
|
60 |
+
PAD_MULTIPLE = 64
|
61 |
+
|
62 |
+
if PAD_MULTIPLE:
|
63 |
+
width = width // PAD_MULTIPLE * PAD_MULTIPLE
|
64 |
+
height = height // PAD_MULTIPLE * PAD_MULTIPLE
|
65 |
+
|
66 |
+
return int(width), int(height)
|
67 |
+
|
68 |
+
|
69 |
+
def encode_image(
|
70 |
+
image: Image.Image, mime_type: str, jpeg_quality: int = 95
|
71 |
+
) -> bytes:
|
72 |
+
buffered = io.BytesIO()
|
73 |
+
if mime_type == "image/jpeg":
|
74 |
+
if jpeg_quality < 0 or jpeg_quality > 100:
|
75 |
+
raise ValueError(
|
76 |
+
f"jpeg_quality must be between 0 and 100, not {jpeg_quality}"
|
77 |
+
)
|
78 |
+
image.save(buffered, format="JPEG", quality=jpeg_quality)
|
79 |
+
elif mime_type == "image/png":
|
80 |
+
image.save(buffered, format="PNG")
|
81 |
+
else:
|
82 |
+
raise ValueError(f"invalid mime_type {mime_type}")
|
83 |
+
return buffered.getvalue()
|
84 |
+
|
85 |
+
|
86 |
+
def parse_accept_header(accept: str) -> str:
|
87 |
+
# Split the string into the comma-separated components
|
88 |
+
parts = accept.split(",")
|
89 |
+
weighted_types = []
|
90 |
+
|
91 |
+
for part in parts:
|
92 |
+
# Use a regular expression to extract the media type and the optional q-factor
|
93 |
+
match = re.match(
|
94 |
+
r"(?P<media_type>[^;]+)(;q=(?P<q_factor>\d+(\.\d+)?))?", part.strip()
|
95 |
+
)
|
96 |
+
if match:
|
97 |
+
media_type = match.group("media_type").strip()
|
98 |
+
q_factor = (
|
99 |
+
float(match.group("q_factor")) if match.group("q_factor") else 1.0
|
100 |
+
)
|
101 |
+
weighted_types.append((media_type, q_factor))
|
102 |
+
else:
|
103 |
+
raise ValueError(f"Malformed Accept header value: {part.strip()}")
|
104 |
+
|
105 |
+
# Sort the media types by q-factor, descending
|
106 |
+
sorted_types = sorted(weighted_types, key=lambda x: x[1], reverse=True)
|
107 |
+
|
108 |
+
# Define a list of supported MIME types
|
109 |
+
supported_types = ["image/jpeg", "image/png"]
|
110 |
+
|
111 |
+
for media_type, _ in sorted_types:
|
112 |
+
if media_type in supported_types:
|
113 |
+
return media_type
|
114 |
+
elif media_type == "*/*":
|
115 |
+
return supported_types[0] # Default to the first supported type
|
116 |
+
elif media_type == "image/*":
|
117 |
+
# If "image/*" is specified, return the first matching supported image type
|
118 |
+
return supported_types[0]
|
119 |
+
|
120 |
+
raise ValueError(f"Accept header did not include any supported MIME types: {supported_types}")
|
121 |
+
|
122 |
+
|
123 |
# Define your request and response schemata here
|
124 |
+
class Text2ImageRequest(BaseModel):
|
125 |
prompt: str
|
126 |
+
aspect_ratio: str = "16:9"
|
|
|
127 |
guidance_scale: float = 3.5
|
128 |
+
num_inference_steps: int = 4
|
129 |
seed: int = 0
|
130 |
|
|
|
|
|
|
|
|
|
|
|
131 |
|
132 |
class Error(BaseModel):
|
133 |
object: str = "error"
|
|
|
139 |
error: Error = pydantic.Field(default_factory=Error)
|
140 |
|
141 |
|
142 |
+
class BillingInfo(BaseModel):
|
143 |
+
steps: int
|
144 |
+
height: int
|
145 |
+
width: int
|
146 |
+
is_control_net: bool
|
147 |
+
|
148 |
+
|
149 |
class FluminaModule(FluminaModule):
|
150 |
def __init__(self):
|
151 |
super().__init__()
|
|
|
176 |
media_type="application/json",
|
177 |
)
|
178 |
|
179 |
+
def _image_response(self, img: Image.Image, mime_type: str, billing_info: BillingInfo):
|
180 |
+
image_bytes = encode_image(img, mime_type)
|
|
|
|
|
181 |
if self._test_return_sync_response:
|
182 |
+
return image_bytes
|
183 |
else:
|
184 |
+
headers = {'Fireworks-Billing-Properties': billing_info.json()}
|
185 |
+
return Response(image_bytes, status_code=200, media_type=mime_type, headers=headers)
|
186 |
|
187 |
@post('/text_to_image')
|
188 |
async def text_to_image(
|
189 |
self,
|
190 |
+
body: Text2ImageRequest,
|
191 |
+
accept: str = Header("image/jpeg"),
|
192 |
+
):
|
193 |
+
mime_type = parse_accept_header(accept)
|
194 |
+
width, height = _aspect_ratio_to_width_height(body.aspect_ratio)
|
|
|
|
|
195 |
img = self.hf_model(
|
196 |
+
prompt=body.prompt,
|
197 |
height=height,
|
198 |
width=width,
|
199 |
+
guidance_scale=body.guidance_scale,
|
200 |
+
num_inference_steps=body.num_inference_steps,
|
201 |
+
generator=torch.Generator('cuda').manual_seed(body.seed),
|
202 |
)
|
203 |
assert len(img.images) == 1, len(img.images)
|
204 |
|
205 |
+
billing_info = BillingInfo(
|
206 |
+
steps=body.num_inference_steps,
|
207 |
+
height=height,
|
208 |
+
width=width,
|
209 |
+
is_control_net=False,
|
210 |
+
)
|
211 |
+
return self._image_response(img.images[0], mime_type, billing_info)
|
212 |
|
213 |
@post('/control_net')
|
214 |
async def control_net(
|
215 |
self,
|
216 |
prompt: str = Form(...),
|
217 |
+
control_image: UploadFile = File(...),
|
218 |
control_mode: int = Form(...),
|
219 |
+
aspect_ratio: str = Form("16:9"),
|
|
|
220 |
guidance_scale: float = Form(3.5),
|
221 |
+
num_inference_steps: int = Form(4),
|
222 |
seed: int = Form(0),
|
223 |
# ControlNet Parameters
|
224 |
+
controlnet_conditioning_scale: Optional[float] = Form(1.0),
|
225 |
+
accept: str = Header("image/jpeg"),
|
226 |
):
|
227 |
+
mime_type = parse_accept_header(accept)
|
228 |
if self.active_cnet_union is None:
|
229 |
return self._error_response(400, f"Must call `/control_net` endpoint with a ControlNet model specified in the URI")
|
230 |
|
|
|
238 |
except Exception as e:
|
239 |
return self._error_response(400, f"Invalid image format: {e}")
|
240 |
|
241 |
+
width, height = _aspect_ratio_to_width_height(aspect_ratio)
|
242 |
img = self.cnet_union_pipes[self.active_cnet_union](
|
243 |
prompt=prompt,
|
244 |
control_image=[pil_image],
|
|
|
252 |
)
|
253 |
assert len(img.images) == 1, len(img.images)
|
254 |
|
255 |
+
billing_info = BillingInfo(
|
256 |
+
steps=num_inference_steps,
|
257 |
+
height=height,
|
258 |
+
width=width,
|
259 |
+
is_control_net=True,
|
260 |
+
)
|
261 |
+
return self._image_response(img.images[0], mime_type, billing_info)
|
262 |
|
263 |
|
264 |
@property
|
|
|
352 |
|
353 |
# Test text-to-image
|
354 |
t2i_out = asyncio.run(f.text_to_image(
|
355 |
+
Text2ImageRequest(
|
356 |
+
prompt="A quick brown fox",
|
357 |
+
aspect_ratio="16:9",
|
358 |
+
guidance_scale=3.5,
|
359 |
+
num_inference_steps=4,
|
360 |
+
seed=0,
|
361 |
+
),
|
362 |
+
accept="*/*",
|
363 |
))
|
364 |
assert isinstance(t2i_out, bytes), t2i_out
|
365 |
with open('output.png', 'wb') as out_file:
|
|
|
399 |
prompt="Cyberpunk future fox nighttime purple and green",
|
400 |
control_image=FakeFile('output.png'),
|
401 |
control_mode=0, # canny
|
402 |
+
aspect_ratio="16:9",
|
|
|
403 |
guidance_scale=3.5,
|
404 |
num_inference_steps=4,
|
405 |
seed=0,
|
406 |
controlnet_conditioning_scale=1.0,
|
407 |
+
accept="image/png",
|
408 |
))
|
409 |
assert isinstance(cn_out, bytes), cn_out
|
410 |
f.deactivate_addon(addon_acct_id, addon_model_id)
|
|
|
422 |
f.activate_addon(addon_acct_id, addon_model_id)
|
423 |
|
424 |
lora_out = asyncio.run(f.text_to_image(
|
425 |
+
Text2ImageRequest(
|
426 |
+
prompt="A quick brown fox",
|
427 |
+
aspect_ratio="16:9",
|
428 |
+
guidance_scale=3.5,
|
429 |
+
num_inference_steps=4,
|
430 |
+
seed=0,
|
431 |
+
),
|
432 |
+
accept="image/jpeg;image/png",
|
433 |
))
|
434 |
assert isinstance(lora_out, bytes), lora_out
|
435 |
|
requirements.txt
CHANGED
@@ -2,5 +2,6 @@ git+https://github.com/huggingface/diffusers.git@c4a8979
|
|
2 |
numpy<2
|
3 |
tokenizers<0.19
|
4 |
transformers>=4
|
|
|
5 |
flash-attn==2.6.3
|
6 |
fsspec>=2023.1.0
|
|
|
2 |
numpy<2
|
3 |
tokenizers<0.19
|
4 |
transformers>=4
|
5 |
+
peft
|
6 |
flash-attn==2.6.3
|
7 |
fsspec>=2023.1.0
|
output.png → t2i_output.png
RENAMED
File without changes
|