Text-to-Image
core-ml
sd-turbo
image-to-image
ios
lichtbizinc commited on
Commit
845e2ad
·
verified ·
1 Parent(s): e5c65fc

Upload sd-turbo-coreml (CommuniDev LLC)

Browse files
LICENSE-creativeml-openrail-m.txt ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2022 Robin Rombach and Patrick Esser and contributors
2
+
3
+ CreativeML Open RAIL-M
4
+ dated August 22, 2022
5
+
6
+ Section I: PREAMBLE
7
+
8
+ Multimodal generative models are being widely adopted and used, and have the potential to transform the way artists, among other individuals, conceive and benefit from AI or ML technologies as a tool for content creation.
9
+
10
+ Notwithstanding the current and potential benefits that these artifacts can bring to society at large, there are also concerns about potential misuses of them, either due to their technical limitations or ethical considerations.
11
+
12
+ In short, this license strives for both the open and responsible downstream use of the accompanying model. When it comes to the open character, we took inspiration from open source permissive licenses regarding the grant of IP rights. Referring to the downstream responsible use, we added use-based restrictions not permitting the use of the Model in very specific scenarios, in order for the licensor to be able to enforce the license in case potential misuses of the Model may occur. At the same time, we strive to promote open and responsible research on generative models for art and content generation.
13
+
14
+ Even though downstream derivative versions of the model could be released under different licensing terms, the latter will always have to include - at minimum - the same use-based restrictions as the ones in the original license (this license). We believe in the intersection between open and responsible AI development; thus, this License aims to strike a balance between both in order to enable responsible open-science in the field of AI.
15
+
16
+ This License governs the use of the model (and its derivatives) and is informed by the model card associated with the model.
17
+
18
+ NOW THEREFORE, You and Licensor agree as follows:
19
+
20
+ 1. Definitions
21
+
22
+ - "License" means the terms and conditions for use, reproduction, and Distribution as defined in this document.
23
+ - "Data" means a collection of information and/or content extracted from the dataset used with the Model, including to train, pretrain, or otherwise evaluate the Model. The Data is not licensed under this License.
24
+ - "Output" means the results of operating a Model as embodied in informational content resulting therefrom.
25
+ - "Model" means any accompanying machine-learning based assemblies (including checkpoints), consisting of learnt weights, parameters (including optimizer states), corresponding to the model architecture as embodied in the Complementary Material, that have been trained or tuned, in whole or in part on the Data, using the Complementary Material.
26
+ - "Derivatives of the Model" means all modifications to the Model, works based on the Model, or any other model which is created or initialized by transfer of patterns of the weights, parameters, activations or output of the Model, to the other model, in order to cause the other model to perform similarly to the Model, including - but not limited to - distillation methods entailing the use of intermediate data representations or methods based on the generation of synthetic data by the Model for training the other model.
27
+ - "Complementary Material" means the accompanying source code and scripts used to define, run, load, benchmark or evaluate the Model, and used to prepare data for training or evaluation, if any. This includes any accompanying documentation, tutorials, examples, etc, if any.
28
+ - "Distribution" means any transmission, reproduction, publication or other sharing of the Model or Derivatives of the Model to a third party, including providing the Model as a hosted service made available by electronic or other remote means - e.g. API-based or web access.
29
+ - "Licensor" means the copyright owner or entity authorized by the copyright owner that is granting the License, including the persons or entities that may have rights in the Model and/or distributing the Model.
30
+ - "You" (or "Your") means an individual or Legal Entity exercising permissions granted by this License and/or making use of the Model for whichever purpose and in any field of use, including usage of the Model in an end-use application - e.g. chatbot, translator, image generator.
31
+ - "Third Parties" means individuals or legal entities that are not under common control with Licensor or You.
32
+ - "Contribution" means any work of authorship, including the original version of the Model and any modifications or additions to that Model or Derivatives of the Model thereof, that is intentionally submitted to Licensor for inclusion in the Model by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Model, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
33
+ - "Contributor" means Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Model.
34
+
35
+ Section II: INTELLECTUAL PROPERTY RIGHTS
36
+
37
+ Both copyright and patent grants apply to the Model, Derivatives of the Model and Complementary Material. The Model and Derivatives of the Model are subject to additional terms as described in Section III.
38
+
39
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare, publicly display, publicly perform, sublicense, and distribute the Complementary Material, the Model, and Derivatives of the Model.
40
+ 3. Grant of Patent License. Subject to the terms and conditions of this License and where and as applicable, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this paragraph) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Model and the Complementary Material, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Model to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Model and/or Complementary Material or a Contribution incorporated within the Model and/or Complementary Material constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for the Model and/or Work shall terminate as of the date such litigation is asserted or filed.
41
+
42
+ Section III: CONDITIONS OF USAGE, DISTRIBUTION AND REDISTRIBUTION
43
+
44
+ 4. Distribution and Redistribution. You may host for Third Party remote access purposes (e.g. software-as-a-service), reproduce and distribute copies of the Model or Derivatives of the Model thereof in any medium, with or without modifications, provided that You meet the following conditions:
45
+ Use-based restrictions as referenced in paragraph 5 MUST be included as an enforceable provision by You in any type of legal agreement (e.g. a license) governing the use and/or distribution of the Model or Derivatives of the Model, and You shall give notice to subsequent users You Distribute to, that the Model or Derivatives of the Model are subject to paragraph 5. This provision does not apply to the use of Complementary Material.
46
+ You must give any Third Party recipients of the Model or Derivatives of the Model a copy of this License;
47
+ You must cause any modified files to carry prominent notices stating that You changed the files;
48
+ You must retain all copyright, patent, trademark, and attribution notices excluding those notices that do not pertain to any part of the Model, Derivatives of the Model.
49
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions - respecting paragraph 4.a. - for use, reproduction, or Distribution of Your modifications, or for any such Derivatives of the Model as a whole, provided Your use, reproduction, and Distribution of the Model otherwise complies with the conditions stated in this License.
50
+ 5. Use-based restrictions. The restrictions set forth in Attachment A are considered Use-based restrictions. Therefore You cannot use the Model and the Derivatives of the Model for the specified restricted uses. You may use the Model subject to this License, including only for lawful purposes and in accordance with the License. Use may include creating any content with, finetuning, updating, running, training, evaluating and/or reparametrizing the Model. You shall require all of Your users who use the Model or a Derivative of the Model to comply with the terms of this paragraph (paragraph 5).
51
+ 6. The Output You Generate. Except as set forth herein, Licensor claims no rights in the Output You generate using the Model. You are accountable for the Output you generate and its subsequent uses. No use of the output can contravene any provision as stated in the License.
52
+
53
+ Section IV: OTHER PROVISIONS
54
+
55
+ 7. Updates and Runtime Restrictions. To the maximum extent permitted by law, Licensor reserves the right to restrict (remotely or otherwise) usage of the Model in violation of this License, update the Model through electronic means, or modify the Output of the Model based on updates. You shall undertake reasonable efforts to use the latest version of the Model.
56
+ 8. Trademarks and related. Nothing in this License permits You to make use of Licensors’ trademarks, trade names, logos or to otherwise suggest endorsement or misrepresent the relationship between the parties; and any rights not expressly granted herein are reserved by the Licensors.
57
+ 9. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Model and the Complementary Material (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Model, Derivatives of the Model, and the Complementary Material and assume any risks associated with Your exercise of permissions under this License.
58
+ 10. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Model and the Complementary Material (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
59
+ 11. Accepting Warranty or Additional Liability. While redistributing the Model, Derivatives of the Model and the Complementary Material thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
60
+ 12. If any provision of this License is held to be invalid, illegal or unenforceable, the remaining provisions shall be unaffected thereby and remain valid as if such provision had not been set forth herein.
61
+
62
+ END OF TERMS AND CONDITIONS
63
+
64
+
65
+
66
+
67
+ Attachment A
68
+
69
+ Use Restrictions
70
+
71
+ You agree not to use the Model or Derivatives of the Model:
72
+ - In any way that violates any applicable national, federal, state, local or international law or regulation;
73
+ - For the purpose of exploiting, harming or attempting to exploit or harm minors in any way;
74
+ - To generate or disseminate verifiably false information and/or content with the purpose of harming others;
75
+ - To generate or disseminate personal identifiable information that can be used to harm an individual;
76
+ - To defame, disparage or otherwise harass others;
77
+ - For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation;
78
+ - For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics;
79
+ - To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm;
80
+ - For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories;
81
+ - To provide medical advice and medical results interpretation;
82
+ - To generate or disseminate information for the purpose to be used for administration of justice, law enforcement, immigration or asylum processes, such as predicting an individual will commit fraud/crime commitment (e.g. by text profiling, drawing causal relationships between assertions made in documents, indiscriminate and arbitrarily-targeted use).
LICENSE-stability-ai-community.md ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ STABILITY AI COMMUNITY LICENSE AGREEMENT
2
+
3
+ Last Updated: July 5, 2024
4
+
5
+ 1. INTRODUCTION
6
+
7
+ This Agreement applies to any individual person or entity (“You”, “Your” or “Licensee”) that uses or distributes any portion or element of the Stability AI Materials or Derivative Works thereof for any Research & Non-Commercial or Commercial purpose. Capitalized terms not otherwise defined herein are defined in Section V below.
8
+
9
+ This Agreement is intended to allow research, non-commercial, and limited commercial uses of the Models free of charge. In order to ensure that certain limited commercial uses of the Models continue to be allowed, this Agreement preserves free access to the Models for people or organizations generating annual revenue of less than US $1,000,000 (or local currency equivalent).
10
+
11
+ By clicking “I Accept” or by using or distributing or using any portion or element of the Stability Materials or Derivative Works, You agree that You have read, understood and are bound by the terms of this Agreement. If You are acting on behalf of a company, organization or other entity, then “You” includes you and that entity, and You agree that You: (i) are an authorized representative of such entity with the authority to bind such entity to this Agreement, and (ii) You agree to the terms of this Agreement on that entity’s behalf.
12
+
13
+ 2. RESEARCH & NON-COMMERCIAL USE LICENSE
14
+
15
+ Subject to the terms of this Agreement, Stability AI grants You a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable and royalty-free limited license under Stability AI’s intellectual property or other rights owned by Stability AI embodied in the Stability AI Materials to use, reproduce, distribute, and create Derivative Works of, and make modifications to, the Stability AI Materials for any Research or Non-Commercial Purpose. “Research Purpose” means academic or scientific advancement, and in each case, is not primarily intended for commercial advantage or monetary compensation to You or others. “Non-Commercial Purpose” means any purpose other than a Research Purpose that is not primarily intended for commercial advantage or monetary compensation to You or others, such as personal use (i.e., hobbyist) or evaluation and testing.
16
+
17
+ 3. COMMERCIAL USE LICENSE
18
+
19
+ Subject to the terms of this Agreement (including the remainder of this Section III), Stability AI grants You a non-exclusive, worldwide, non-transferable, non-sublicensable, revocable and royalty-free limited license under Stability AI’s intellectual property or other rights owned by Stability AI embodied in the Stability AI Materials to use, reproduce, distribute, and create Derivative Works of, and make modifications to, the Stability AI Materials for any Commercial Purpose. “Commercial Purpose” means any purpose other than a Research Purpose or Non-Commercial Purpose that is primarily intended for commercial advantage or monetary compensation to You or others, including but not limited to, (i) creating, modifying, or distributing Your product or service, including via a hosted service or application programming interface, and (ii) for Your business’s or organization’s internal operations.
20
+ If You are using or distributing the Stability AI Materials for a Commercial Purpose, You must register with Stability AI at (https://stability.ai/community-license). If at any time You or Your Affiliate(s), either individually or in aggregate, generate more than USD $1,000,000 in annual revenue (or the equivalent thereof in Your local currency), regardless of whether that revenue is generated directly or indirectly from the Stability AI Materials or Derivative Works, any licenses granted to You under this Agreement shall terminate as of such date. You must request a license from Stability AI at (https://stability.ai/enterprise) , which Stability AI may grant to You in its sole discretion. If you receive Stability AI Materials, or any Derivative Works thereof, from a Licensee as part of an integrated end user product, then Section III of this Agreement will not apply to you.
21
+
22
+ 4. GENERAL TERMS
23
+
24
+ Your Research, Non-Commercial, and Commercial License(s) under this Agreement are subject to the following terms.
25
+ a. Distribution & Attribution. If You distribute or make available the Stability AI Materials or a Derivative Work to a third party, or a product or service that uses any portion of them, You shall: (i) provide a copy of this Agreement to that third party, (ii) retain the following attribution notice within a "Notice" text file distributed as a part of such copies: "This Stability AI Model is licensed under the Stability AI Community License, Copyright © Stability AI Ltd. All Rights Reserved”, and (iii) prominently display “Powered by Stability AI” on a related website, user interface, blogpost, about page, or product documentation. If You create a Derivative Work, You may add your own attribution notice(s) to the “Notice” text file included with that Derivative Work, provided that You clearly indicate which attributions apply to the Stability AI Materials and state in the “Notice” text file that You changed the Stability AI Materials and how it was modified.
26
+ b. Use Restrictions. Your use of the Stability AI Materials and Derivative Works, including any output or results of the Stability AI Materials or Derivative Works, must comply with applicable laws and regulations (including Trade Control Laws and equivalent regulations) and adhere to the Documentation and Stability AI’s AUP, which is hereby incorporated by reference. Furthermore, You will not use the Stability AI Materials or Derivative Works, or any output or results of the Stability AI Materials or Derivative Works, to create or improve any foundational generative AI model (excluding the Models or Derivative Works).
27
+ c. Intellectual Property.
28
+ (i) Trademark License. No trademark licenses are granted under this Agreement, and in connection with the Stability AI Materials or Derivative Works, You may not use any name or mark owned by or associated with Stability AI or any of its Affiliates, except as required under Section IV(a) herein.
29
+ (ii) Ownership of Derivative Works. As between You and Stability AI, You are the owner of Derivative Works You create, subject to Stability AI’s ownership of the Stability AI Materials and any Derivative Works made by or for Stability AI.
30
+ (iii) Ownership of Outputs. As between You and Stability AI, You own any outputs generated from the Models or Derivative Works to the extent permitted by applicable law.
31
+ (iv) Disputes. If You or Your Affiliate(s) institute litigation or other proceedings against Stability AI (including a cross-claim or counterclaim in a lawsuit) alleging that the Stability AI Materials, Derivative Works or associated outputs or results, or any portion of any of the foregoing, constitutes infringement of intellectual property or other rights owned or licensable by You, then any licenses granted to You under this Agreement shall terminate as of the date such litigation or claim is filed or instituted. You will indemnify and hold harmless Stability AI from and against any claim by any third party arising out of or related to Your use or distribution of the Stability AI Materials or Derivative Works in violation of this Agreement.
32
+ (v) Feedback. From time to time, You may provide Stability AI with verbal and/or written suggestions, comments or other feedback related to Stability AI’s existing or prospective technology, products or services (collectively, “Feedback”). You are not obligated to provide Stability AI with Feedback, but to the extent that You do, You hereby grant Stability AI a perpetual, irrevocable, royalty-free, fully-paid, sub-licensable, transferable, non-exclusive, worldwide right and license to exploit the Feedback in any manner without restriction. Your Feedback is provided “AS IS” and You make no warranties whatsoever about any Feedback.
33
+ d. Disclaimer Of Warranty. UNLESS REQUIRED BY APPLICABLE LAW, THE STABILITY AI MATERIALS AND ANY OUTPUT AND RESULTS THEREFROM ARE PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OR LAWFULNESS OF USING OR REDISTRIBUTING THE STABILITY AI MATERIALS, DERIVATIVE WORKS OR ANY OUTPUT OR RESULTS AND ASSUME ANY RISKS ASSOCIATED WITH YOUR USE OF THE STABILITY AI MATERIALS, DERIVATIVE WORKS AND ANY OUTPUT AND RESULTS.
34
+ e. Limitation Of Liability. IN NO EVENT WILL STABILITY AI OR ITS AFFILIATES BE LIABLE UNDER ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, TORT, NEGLIGENCE, PRODUCTS LIABILITY, OR OTHERWISE, ARISING OUT OF THIS AGREEMENT, FOR ANY LOST PROFITS OR ANY DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL, EXEMPLARY OR PUNITIVE DAMAGES, EVEN IF STABILITY AI OR ITS AFFILIATES HAVE BEEN ADVISED OF THE POSSIBILITY OF ANY OF THE FOREGOING.
35
+ f. Term And Termination. The term of this Agreement will commence upon Your acceptance of this Agreement or access to the Stability AI Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. Stability AI may terminate this Agreement if You are in breach of any term or condition of this Agreement. Upon termination of this Agreement, You shall delete and cease use of any Stability AI Materials or Derivative Works. Section IV(d), (e), and (g) shall survive the termination of this Agreement.
36
+ g. Governing Law. This Agreement will be governed by and constructed in accordance with the laws of the United States and the State of California without regard to choice of law principles, and the UN Convention on Contracts for International Sale of Goods does not apply to this Agreement.
37
+
38
+ 5. DEFINITIONS
39
+
40
+ “Affiliate(s)” means any entity that directly or indirectly controls, is controlled by, or is under common control with the subject entity; for purposes of this definition, “control” means direct or indirect ownership or control of more than 50% of the voting interests of the subject entity.
41
+
42
+ "Agreement" means this Stability AI Community License Agreement.
43
+
44
+ “AUP” means the Stability AI Acceptable Use Policy available at (https://stability.ai/use-policy), as may be updated from time to time.
45
+
46
+ "Derivative Work(s)” means (a) any derivative work of the Stability AI Materials as recognized by U.S. copyright laws and (b) any modifications to a Model, and any other model created which is based on or derived from the Model or the Model’s output, including “fine tune” and “low-rank adaptation” models derived from a Model or a Model’s output, but do not include the output of any Model.
47
+
48
+ “Documentation” means any specifications, manuals, documentation, and other written information provided by Stability AI related to the Software or Models.
49
+
50
+ “Model(s)" means, collectively, Stability AI’s proprietary models and algorithms, including machine-learning models, trained model weights and other elements of the foregoing listed on Stability’s Core Models Webpage available at (https://stability.ai/core-models), as may be updated from time to time.
51
+
52
+ "Stability AI" or "we" means Stability AI Ltd. and its Affiliates.
53
+
54
+ "Software" means Stability AI’s proprietary software made available under this Agreement now or in the future.
55
+
56
+ “Stability AI Materials” means, collectively, Stability’s proprietary Models, Software and Documentation (and any portion or combination thereof) made available under this Agreement.
57
+
58
+ “Trade Control Laws” means any applicable U.S. and non-U.S. export control and trade sanctions laws and regulations.
LICENSE.md ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Licences
2
+
3
+ This repository is a Core ML conversion of [stabilityai/sd-turbo](https://huggingface.co/stabilityai/sd-turbo)
4
+ made by CommuniDev LLC (format conversion and 6-bit palettization only; no retraining), plus an unmodified
5
+ safety checker. See `NOTICE` for exactly what was changed.
6
+
7
+ 1. **Stability AI Community License** — covers `TextEncoder`, `Unet` and `VAEDecoder` (the SD-Turbo model).
8
+ Full text, word for word: [`LICENSE-stability-ai-community.md`](LICENSE-stability-ai-community.md).
9
+ Use must follow Stability AI's Acceptable Use Policy: https://stability.ai/use-policy.
10
+ Commercial use requires registering with Stability AI (https://stability.ai/community-license) and is
11
+ free only below USD 1,000,000 annual revenue.
12
+ 2. **CreativeML Open RAIL-M** — covers `SafetyChecker` (CompVis, via Apple's Core ML conversion).
13
+ Full text, including the use-based restrictions in Attachment A:
14
+ [`LICENSE-creativeml-openrail-m.txt`](LICENSE-creativeml-openrail-m.txt).
NOTICE ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ This Stability AI Model is licensed under the Stability AI Community License, Copyright © Stability AI Ltd. All Rights Reserved
2
+
3
+ Powered by Stability AI.
4
+
5
+ Attributions that apply to the Stability AI Materials: the notice above applies to TextEncoder.mlmodelc,
6
+ Unet.mlmodelc and VAEDecoder.mlmodelc, which are derived from stabilityai/sd-turbo (revision b261bac6).
7
+
8
+ Changes made by CommuniDev LLC (2026-10-10): the Stability AI Materials were converted from their fp16
9
+ safetensors to Core ML with Apple's ml-stable-diffusion converter (torch2coreml, commit 5a170d2),
10
+ attention SPLIT_EINSUM_V2, 512 x 512; the UNet and text encoder weights were palettized to 6 bits with
11
+ k-means (the text encoder's 77 x 77 attention-mask constant left uncompressed); the VAE decoder is fp16;
12
+ everything was compiled to .mlmodelc. No retraining or fine-tuning. The VAE encoder is not included.
13
+
14
+ Other files, not Stability AI Materials:
15
+ - SafetyChecker.mlmodelc: CompVis stable-diffusion-safety-checker, in Apple's Core ML conversion from
16
+ apple/coreml-stable-diffusion-v1-5-palettized, unmodified; CreativeML Open RAIL-M (LICENSE-creativeml-openrail-m.txt).
17
+ - vocab.json, merges.txt: the CLIP BPE tokenizer files from the same Apple conversions, unmodified.
README.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: other
3
+ license_name: stability-ai-community
4
+ license_link: https://huggingface.co/CommuniDev/sd-turbo-coreml/blob/main/LICENSE-stability-ai-community.md
5
+ base_model: stabilityai/sd-turbo
6
+ pipeline_tag: text-to-image
7
+ tags:
8
+ - core-ml
9
+ - sd-turbo
10
+ - text-to-image
11
+ - ios
12
+ ---
13
+
14
+ # SD-Turbo — Core ML (6-bit, for iPhone)
15
+
16
+ **Powered by Stability AI.** This is a **converted copy** of [stabilityai/sd-turbo](https://huggingface.co/stabilityai/sd-turbo),
17
+ created by **Stability AI**: a fast, distilled version of Stable Diffusion 2.1 that makes a 512 × 512 picture
18
+ in 1–4 steps.
19
+
20
+ CommuniDev LLC did **not** train or fine-tune this model. We only changed its file format so it can run on
21
+ an iPhone. It is published so that our iOS app [CommuniDream](https://communidev.com) can download it on
22
+ first use and turn dream journal entries into pictures, entirely on the device.
23
+
24
+ ## What we changed
25
+
26
+ Converted with Apple's [ml-stable-diffusion](https://github.com/apple/ml-stable-diffusion) converter
27
+ (`torch2coreml`, commit `5a170d2`) from the fp16 safetensors at sd-turbo revision `b261bac6`. No retraining.
28
+
29
+ - Core ML, attention `SPLIT_EINSUM_V2` (Neural Engine layout), 512 × 512 images.
30
+ - UNet and text encoder: **6-bit palettized** weights (k-means). The text encoder's 77 × 77 causal
31
+ attention mask holds `-inf` and is left uncompressed.
32
+ - VAE decoder: fp16. The VAE encoder is not included (text-to-image only).
33
+ - Safety checker: the CompVis Stable Diffusion safety checker in Apple's Core ML conversion, unmodified.
34
+
35
+ Modified files: `TextEncoder.mlmodelc`, `Unet.mlmodelc` and `VAEDecoder.mlmodelc` are converted, modified
36
+ forms of the original checkpoint. Details are in `NOTICE`.
37
+
38
+ ## Files
39
+
40
+ | Path | Size |
41
+ |---|---|
42
+ | `compiled/Unet.mlmodelc` | 623 MB |
43
+ | `compiled/TextEncoder.mlmodelc` | 304 MB |
44
+ | `compiled/VAEDecoder.mlmodelc` | 95 MB |
45
+ | `compiled/SafetyChecker.mlmodelc` | 580 MB |
46
+ | `compiled/vocab.json`, `compiled/merges.txt` | 1.3 MB |
47
+
48
+ `SHA256SUMS` lists a SHA-256 hash for every file. Check it with `shasum -a 256 -c SHA256SUMS`.
49
+
50
+ ## How it is used
51
+
52
+ With Apple's Swift `StableDiffusionPipeline`: DPM-Solver++ (linspace spacing, which starts at t = 999),
53
+ 2–4 steps, guidance 1.0–2.0, seed-reproducible. At guidance 1.0 the negative prompt has no effect.
54
+ **The safety checker must stay on** (`disableSafety: false`); CommuniDream refuses to run without it.
55
+
56
+ ## Limitations
57
+
58
+ - 512 × 512 only (the shape is fixed at conversion).
59
+ - Distilled for speed: less detail than Stable Diffusion 2.1 at 20+ steps, and weaker style control.
60
+ - It can produce wrong, biased or disturbing pictures, and text in pictures is unreliable.
61
+ - The safety checker can miss unsafe pictures and can block harmless ones.
62
+
63
+ ## Licence
64
+
65
+ `TextEncoder`, `Unet` and `VAEDecoder` are under the **Stability AI Community License**
66
+ (`LICENSE-stability-ai-community.md`, word for word): use must follow Stability AI's
67
+ [Acceptable Use Policy](https://stability.ai/use-policy), and commercial use requires registration with
68
+ Stability AI. `SafetyChecker` is under **CreativeML Open RAIL-M** (`LICENSE-creativeml-openrail-m.txt`).
69
+ See `LICENSE.md` and `NOTICE`.
70
+
71
+ ## Citation
72
+
73
+ ```
74
+ @article{sauer2023adversarial,
75
+ title = {Adversarial Diffusion Distillation},
76
+ author = {Sauer, Axel and Lorenz, Dominik and Blattmann, Andreas and Rombach, Robin},
77
+ journal = {arXiv preprint arXiv:2311.17042},
78
+ year = {2023}
79
+ }
80
+ ```
SHA256SUMS ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 0f3f2a730836f1e59d54b67d4f045c09f6e4e880c111597dbdf2be7abeba44d0 compiled/SafetyChecker.mlmodelc/analytics/coremldata.bin
2
+ 21c895c2c1e79925d578d8ad7f6880e41b56f4e96a976e481b1be8416f6512a1 compiled/SafetyChecker.mlmodelc/coremldata.bin
3
+ b3dad9796b9dd5005d2a6f1ede466ba39c19cb1e24e98ee1dd64f46c91092447 compiled/SafetyChecker.mlmodelc/metadata.json
4
+ 00ab5a27b71516b7bc91357efd939abd5956d6394aa758162f27685ddc341557 compiled/SafetyChecker.mlmodelc/model.mil
5
+ ffdfb1a4774feb816dd2ccc3e304d109013bc9591e188dcab840789583fdc1b4 compiled/SafetyChecker.mlmodelc/weights/weight.bin
6
+ f80ff38ca1a65a416537606256daa5e58c84772054db1eece1797c79063dfe1a compiled/TextEncoder.mlmodelc/analytics/coremldata.bin
7
+ be0f756b915b8e5925201d914102b7e5fb8112f13b11b84f60db771c6bd40b5a compiled/TextEncoder.mlmodelc/coremldata.bin
8
+ a79623612c3c35c97a87321b7446a57059e3979f890bc856b88efa5562b25e35 compiled/TextEncoder.mlmodelc/metadata.json
9
+ cbcf3abb456c1292d94d444d919bdc224e9c081e9cba377dc0625bf3b7064470 compiled/TextEncoder.mlmodelc/model.mil
10
+ eab2e14a7fb4f95fea7b47d4701fd726afa2f8b11d74a348a8e288351c471995 compiled/TextEncoder.mlmodelc/weights/weight.bin
11
+ a71822aba17d514719155151a9f4d7fa0f6028b0d3778da2bae65c59b81a4bff compiled/Unet.mlmodelc/analytics/coremldata.bin
12
+ 71c48d44b87f90c76b9aa5304f0ae419e1af609a290bb6181eb62e1fef78994a compiled/Unet.mlmodelc/coremldata.bin
13
+ 2c0a8e75ce263506db29e3fd4ccdb72bff7cbe23aff68ef483050407f07fbaae compiled/Unet.mlmodelc/metadata.json
14
+ 42538f01894444d90ff0b3ade411a4283a658808ae44b9853efc99d04170209d compiled/Unet.mlmodelc/model.mil
15
+ 772346dccc7a0ab4a998a652419fe3677b98f8649e0682b4450dea5131e9d2c3 compiled/Unet.mlmodelc/weights/weight.bin
16
+ ec4f6b87000f1f19c1237776aa4111d6c7e40832db3eee89eb2fa98fb3f686b5 compiled/VAEDecoder.mlmodelc/analytics/coremldata.bin
17
+ 9e06cafb99206c52d8c3c90e9dd8e7fc45bce5ee100428b339629ae79751e2be compiled/VAEDecoder.mlmodelc/coremldata.bin
18
+ 6b63ca07bbbe2cc8c3533d6a07ba1bdf4b5d350111a435e88856f0d1759a72bf compiled/VAEDecoder.mlmodelc/metadata.json
19
+ e0447f4f41d531f94ce20e81d204f0aace02a79aad8d4c0fb3b982a0822e00a6 compiled/VAEDecoder.mlmodelc/model.mil
20
+ 7cc4b185bde09496bc25e236de3a0da8d78ef83fc8a7e8fbe4435f3027413c6f compiled/VAEDecoder.mlmodelc/weights/weight.bin
21
+ f526393189112391ce6f9795d4695f704121ce452c3aad1f5335cc41337eba85 compiled/merges.txt
22
+ 5047b556ce86ccaf6aa22b3ffccfc52d391ea4accdab9c2f2407da5b742d4363 compiled/vocab.json
compiled/SafetyChecker.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0f3f2a730836f1e59d54b67d4f045c09f6e4e880c111597dbdf2be7abeba44d0
3
+ size 243
compiled/SafetyChecker.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:21c895c2c1e79925d578d8ad7f6880e41b56f4e96a976e481b1be8416f6512a1
3
+ size 1486
compiled/SafetyChecker.mlmodelc/metadata.json ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 512 × 512 × 3)",
11
+ "shortDescription" : "Identical to the input `images`. If safety checker detected any sensitive content, the corresponding image is replaced with a blank image (zeros)",
12
+ "shape" : "[1, 512, 512, 3]",
13
+ "name" : "filtered_images",
14
+ "type" : "MultiArray"
15
+ },
16
+ {
17
+ "hasShapeFlexibility" : "0",
18
+ "isOptional" : "0",
19
+ "dataType" : "Float32",
20
+ "formattedType" : "MultiArray (Float32 1 × 1 × 1 × 1)",
21
+ "shortDescription" : "Indicates whether the safety checker model found any sensitive content in the given image",
22
+ "shape" : "[1, 1, 1, 1]",
23
+ "name" : "has_nsfw_concepts",
24
+ "type" : "MultiArray"
25
+ },
26
+ {
27
+ "hasShapeFlexibility" : "0",
28
+ "isOptional" : "0",
29
+ "dataType" : "Float32",
30
+ "formattedType" : "MultiArray (Float32 1 × 17)",
31
+ "shortDescription" : "Concept scores are the scores before thresholding at zero yields the `has_nsfw_concepts` output. These scores can be used to tune the `adjustment` input",
32
+ "shape" : "[1, 17]",
33
+ "name" : "concept_scores",
34
+ "type" : "MultiArray"
35
+ }
36
+ ],
37
+ "version" : "timbrooks\/instruct-pix2pix",
38
+ "modelParameters" : [
39
+
40
+ ],
41
+ "author" : "Please refer to the Model Card available at huggingface.co\/timbrooks\/instruct-pix2pix",
42
+ "specificationVersion" : 7,
43
+ "storagePrecision" : "Float16",
44
+ "license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
45
+ "mlProgramOperationTypeHistogram" : {
46
+ "Transpose" : 97,
47
+ "Ios16.scatterNd" : 1,
48
+ "Ios16.softmax" : 24,
49
+ "Ios16.linear" : 147,
50
+ "Ios16.add" : 51,
51
+ "Concat" : 2,
52
+ "Ios16.realDiv" : 1,
53
+ "Ios16.sigmoid" : 24,
54
+ "Tile" : 4,
55
+ "Ios16.reduceSum" : 2,
56
+ "Ios16.greater" : 4,
57
+ "Shape" : 1,
58
+ "ExpandDims" : 4,
59
+ "Ios16.cast" : 7,
60
+ "Ios16.conv" : 1,
61
+ "Ios16.matmul" : 48,
62
+ "Ios16.reshape" : 97,
63
+ "Ios16.layerNorm" : 50,
64
+ "SliceByIndex" : 2,
65
+ "Ios16.maximum" : 1,
66
+ "Ios16.mul" : 73,
67
+ "NonZero" : 1,
68
+ "Ios16.reduceL2Norm" : 1
69
+ },
70
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
71
+ "stateSchema" : [
72
+
73
+ ],
74
+ "isUpdatable" : "0",
75
+ "availability" : {
76
+ "macOS" : "13.0",
77
+ "tvOS" : "16.0",
78
+ "visionOS" : "1.0",
79
+ "watchOS" : "9.0",
80
+ "iOS" : "16.0",
81
+ "macCatalyst" : "16.0"
82
+ },
83
+ "modelType" : {
84
+ "name" : "MLModelType_mlProgram"
85
+ },
86
+ "inputSchema" : [
87
+ {
88
+ "hasShapeFlexibility" : "0",
89
+ "isOptional" : "0",
90
+ "dataType" : "Float16",
91
+ "formattedType" : "MultiArray (Float16 1 × 3 × 224 × 224)",
92
+ "shortDescription" : "The normalized image input tensor resized to (224x224) in channels-first (BCHW) format",
93
+ "shape" : "[1, 3, 224, 224]",
94
+ "name" : "clip_input",
95
+ "type" : "MultiArray"
96
+ },
97
+ {
98
+ "hasShapeFlexibility" : "0",
99
+ "isOptional" : "0",
100
+ "dataType" : "Float16",
101
+ "formattedType" : "MultiArray (Float16 1 × 512 × 512 × 3)",
102
+ "shortDescription" : "Output of the vae_decoder (512x512) in channels-last (BHWC) format",
103
+ "shape" : "[1, 512, 512, 3]",
104
+ "name" : "images",
105
+ "type" : "MultiArray"
106
+ },
107
+ {
108
+ "hasShapeFlexibility" : "0",
109
+ "isOptional" : "0",
110
+ "dataType" : "Float16",
111
+ "formattedType" : "MultiArray (Float16 1)",
112
+ "shortDescription" : "Bias added to the concept scores to trade off increased recall for reduce precision in the safety checker classifier",
113
+ "shape" : "[1]",
114
+ "name" : "adjustment",
115
+ "type" : "MultiArray"
116
+ }
117
+ ],
118
+ "userDefinedMetadata" : {
119
+ "com.github.apple.coremltools.version" : "8.3.0",
120
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
121
+ "com.github.apple.coremltools.source" : "torch==2.5.1"
122
+ },
123
+ "generatedClassName" : "Stable_Diffusion_version_timbrooks_instruct_pix2pix_safety_checker",
124
+ "method" : "predict"
125
+ }
126
+ ]
compiled/SafetyChecker.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
compiled/SafetyChecker.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ffdfb1a4774feb816dd2ccc3e304d109013bc9591e188dcab840789583fdc1b4
3
+ size 607990114
compiled/TextEncoder.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f80ff38ca1a65a416537606256daa5e58c84772054db1eece1797c79063dfe1a
3
+ size 243
compiled/TextEncoder.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:be0f756b915b8e5925201d914102b7e5fb8112f13b11b84f60db771c6bd40b5a
3
+ size 851
compiled/TextEncoder.mlmodelc/metadata.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 77 × 1024)",
11
+ "shortDescription" : "The token embeddings as encoded by the Transformer model",
12
+ "shape" : "[1, 77, 1024]",
13
+ "name" : "last_hidden_state",
14
+ "type" : "MultiArray"
15
+ },
16
+ {
17
+ "hasShapeFlexibility" : "0",
18
+ "isOptional" : "0",
19
+ "dataType" : "Float32",
20
+ "formattedType" : "MultiArray (Float32 1 × 1024)",
21
+ "shortDescription" : "The version of the `last_hidden_state` output after pooling",
22
+ "shape" : "[1, 1024]",
23
+ "name" : "pooled_outputs",
24
+ "type" : "MultiArray"
25
+ }
26
+ ],
27
+ "version" : "sd-turbo",
28
+ "modelParameters" : [
29
+
30
+ ],
31
+ "author" : "Please refer to the Model Card available at huggingface.co\/sd-turbo",
32
+ "specificationVersion" : 7,
33
+ "storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
34
+ "license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
35
+ "mlProgramOperationTypeHistogram" : {
36
+ "Ios16.cast" : 3,
37
+ "Ios16.mul" : 23,
38
+ "Ios16.layerNorm" : 47,
39
+ "Ios16.constexprLutToDense" : 162,
40
+ "Transpose" : 92,
41
+ "Stack" : 1,
42
+ "Ios16.linear" : 138,
43
+ "Ios16.add" : 70,
44
+ "Ios16.softmax" : 23,
45
+ "Ios16.gelu" : 23,
46
+ "Ios16.matmul" : 46,
47
+ "Ios16.gatherNd" : 1,
48
+ "Ios16.gather" : 1,
49
+ "Ios16.reshape" : 230,
50
+ "Ios16.reduceArgmax" : 1
51
+ },
52
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
53
+ "stateSchema" : [
54
+
55
+ ],
56
+ "isUpdatable" : "0",
57
+ "availability" : {
58
+ "macOS" : "13.0",
59
+ "tvOS" : "16.0",
60
+ "visionOS" : "1.0",
61
+ "watchOS" : "9.0",
62
+ "iOS" : "16.0",
63
+ "macCatalyst" : "16.0"
64
+ },
65
+ "modelType" : {
66
+ "name" : "MLModelType_mlProgram"
67
+ },
68
+ "inputSchema" : [
69
+ {
70
+ "hasShapeFlexibility" : "0",
71
+ "isOptional" : "0",
72
+ "dataType" : "Float32",
73
+ "formattedType" : "MultiArray (Float32 1 × 77)",
74
+ "shortDescription" : "The token ids that represent the input text",
75
+ "shape" : "[1, 77]",
76
+ "name" : "input_ids",
77
+ "type" : "MultiArray"
78
+ }
79
+ ],
80
+ "userDefinedMetadata" : {
81
+ "com.github.apple.coremltools.version" : "7.2",
82
+ "com.github.apple.coremltools.source" : "torch==2.2.2",
83
+ "com.github.apple.coremltools.source_dialect" : "TorchScript"
84
+ },
85
+ "generatedClassName" : "Stable_Diffusion_version_sd_turbo_text_encoder",
86
+ "method" : "predict"
87
+ }
88
+ ]
compiled/TextEncoder.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
compiled/TextEncoder.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eab2e14a7fb4f95fea7b47d4701fd726afa2f8b11d74a348a8e288351c471995
3
+ size 318867584
compiled/Unet.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a71822aba17d514719155151a9f4d7fa0f6028b0d3778da2bae65c59b81a4bff
3
+ size 243
compiled/Unet.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71c48d44b87f90c76b9aa5304f0ae419e1af609a290bb6181eb62e1fef78994a
3
+ size 1284
compiled/Unet.mlmodelc/metadata.json ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 2 × 4 × 64 × 64)",
11
+ "shortDescription" : "Same shape and dtype as the `sample` input. The predicted noise to facilitate the reverse diffusion (denoising) process",
12
+ "shape" : "[2, 4, 64, 64]",
13
+ "name" : "noise_pred",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "version" : "sd-turbo",
18
+ "modelParameters" : [
19
+
20
+ ],
21
+ "author" : "Please refer to the Model Card available at huggingface.co\/sd-turbo",
22
+ "specificationVersion" : 7,
23
+ "storagePrecision" : "Mixed (Float16, Palettized (6 bits))",
24
+ "license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
25
+ "mlProgramOperationTypeHistogram" : {
26
+ "Transpose" : 32,
27
+ "UpsampleNearestNeighbor" : 3,
28
+ "Ios16.reduceMean" : 122,
29
+ "Ios16.sin" : 1,
30
+ "Ios16.softmax" : 840,
31
+ "Split" : 16,
32
+ "Ios16.add" : 169,
33
+ "Concat" : 196,
34
+ "Ios16.realDiv" : 61,
35
+ "Ios16.square" : 61,
36
+ "ExpandDims" : 3,
37
+ "Ios16.sub" : 61,
38
+ "Ios16.sqrt" : 61,
39
+ "Ios16.conv" : 282,
40
+ "Ios16.constexprLutToDense" : 310,
41
+ "Ios16.einsum" : 1680,
42
+ "Ios16.layerNorm" : 48,
43
+ "SliceByIndex" : 1772,
44
+ "Ios16.batchNorm" : 61,
45
+ "Ios16.reshape" : 154,
46
+ "Ios16.silu" : 47,
47
+ "Ios16.gelu" : 16,
48
+ "Ios16.mul" : 857,
49
+ "Ios16.cos" : 1,
50
+ "Ios16.cast" : 1
51
+ },
52
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
53
+ "stateSchema" : [
54
+
55
+ ],
56
+ "isUpdatable" : "0",
57
+ "availability" : {
58
+ "macOS" : "13.0",
59
+ "tvOS" : "16.0",
60
+ "visionOS" : "1.0",
61
+ "watchOS" : "9.0",
62
+ "iOS" : "16.0",
63
+ "macCatalyst" : "16.0"
64
+ },
65
+ "modelType" : {
66
+ "name" : "MLModelType_mlProgram"
67
+ },
68
+ "inputSchema" : [
69
+ {
70
+ "hasShapeFlexibility" : "0",
71
+ "isOptional" : "0",
72
+ "dataType" : "Float16",
73
+ "formattedType" : "MultiArray (Float16 2 × 4 × 64 × 64)",
74
+ "shortDescription" : "The low resolution latent feature maps being denoised through reverse diffusion",
75
+ "shape" : "[2, 4, 64, 64]",
76
+ "name" : "sample",
77
+ "type" : "MultiArray"
78
+ },
79
+ {
80
+ "hasShapeFlexibility" : "0",
81
+ "isOptional" : "0",
82
+ "dataType" : "Float16",
83
+ "formattedType" : "MultiArray (Float16 2)",
84
+ "shortDescription" : "A value emitted by the associated scheduler object to condition the model on a given noise schedule",
85
+ "shape" : "[2]",
86
+ "name" : "timestep",
87
+ "type" : "MultiArray"
88
+ },
89
+ {
90
+ "hasShapeFlexibility" : "0",
91
+ "isOptional" : "0",
92
+ "dataType" : "Float16",
93
+ "formattedType" : "MultiArray (Float16 2 × 1024 × 1 × 77)",
94
+ "shortDescription" : "Output embeddings from the associated text_encoder model to condition to generated image on text. A maximum of 77 tokens (~40 words) are allowed. Longer text is truncated. Shorter text does not reduce computation.",
95
+ "shape" : "[2, 1024, 1, 77]",
96
+ "name" : "encoder_hidden_states",
97
+ "type" : "MultiArray"
98
+ }
99
+ ],
100
+ "userDefinedMetadata" : {
101
+ "com.github.apple.ml-stable-diffusion.version" : "1.1.0",
102
+ "com.github.apple.coremltools.source" : "torch==2.2.2",
103
+ "com.github.apple.coremltools.version" : "7.2",
104
+ "com.github.apple.coremltools.source_dialect" : "TorchScript"
105
+ },
106
+ "generatedClassName" : "Stable_Diffusion_version_sd_turbo_unet",
107
+ "method" : "predict"
108
+ }
109
+ ]
compiled/Unet.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
compiled/Unet.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:772346dccc7a0ab4a998a652419fe3677b98f8649e0682b4450dea5131e9d2c3
3
+ size 649959936
compiled/VAEDecoder.mlmodelc/analytics/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec4f6b87000f1f19c1237776aa4111d6c7e40832db3eee89eb2fa98fb3f686b5
3
+ size 243
compiled/VAEDecoder.mlmodelc/coremldata.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e06cafb99206c52d8c3c90e9dd8e7fc45bce5ee100428b339629ae79751e2be
3
+ size 778
compiled/VAEDecoder.mlmodelc/metadata.json ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "shortDescription" : "Stable Diffusion generates images conditioned on text and\/or other images as input through the diffusion process. Please refer to https:\/\/arxiv.org\/abs\/2112.10752 for details.",
4
+ "metadataOutputVersion" : "3.0",
5
+ "outputSchema" : [
6
+ {
7
+ "hasShapeFlexibility" : "0",
8
+ "isOptional" : "0",
9
+ "dataType" : "Float32",
10
+ "formattedType" : "MultiArray (Float32 1 × 3 × 512 × 512)",
11
+ "shortDescription" : "Generated image normalized to range [-1, 1]",
12
+ "shape" : "[1, 3, 512, 512]",
13
+ "name" : "image",
14
+ "type" : "MultiArray"
15
+ }
16
+ ],
17
+ "version" : "sd-turbo",
18
+ "modelParameters" : [
19
+
20
+ ],
21
+ "author" : "Please refer to the Model Card available at huggingface.co\/sd-turbo",
22
+ "specificationVersion" : 7,
23
+ "storagePrecision" : "Float16",
24
+ "license" : "OpenRAIL (https:\/\/huggingface.co\/spaces\/CompVis\/stable-diffusion-license)",
25
+ "mlProgramOperationTypeHistogram" : {
26
+ "Ios16.cast" : 1,
27
+ "Ios16.mul" : 2,
28
+ "Ios16.sub" : 30,
29
+ "Transpose" : 6,
30
+ "Ios16.sqrt" : 30,
31
+ "UpsampleNearestNeighbor" : 3,
32
+ "Ios16.square" : 30,
33
+ "Ios16.add" : 46,
34
+ "Ios16.reduceMean" : 60,
35
+ "Ios16.realDiv" : 30,
36
+ "Ios16.conv" : 36,
37
+ "Ios16.linear" : 4,
38
+ "Ios16.matmul" : 2,
39
+ "Ios16.batchNorm" : 29,
40
+ "Ios16.softmax" : 1,
41
+ "Ios16.reshape" : 65,
42
+ "Ios16.silu" : 29
43
+ },
44
+ "computePrecision" : "Mixed (Float16, Float32, Int32)",
45
+ "stateSchema" : [
46
+
47
+ ],
48
+ "isUpdatable" : "0",
49
+ "availability" : {
50
+ "macOS" : "13.0",
51
+ "tvOS" : "16.0",
52
+ "visionOS" : "1.0",
53
+ "watchOS" : "9.0",
54
+ "iOS" : "16.0",
55
+ "macCatalyst" : "16.0"
56
+ },
57
+ "modelType" : {
58
+ "name" : "MLModelType_mlProgram"
59
+ },
60
+ "inputSchema" : [
61
+ {
62
+ "hasShapeFlexibility" : "0",
63
+ "isOptional" : "0",
64
+ "dataType" : "Float16",
65
+ "formattedType" : "MultiArray (Float16 1 × 4 × 64 × 64)",
66
+ "shortDescription" : "The denoised latent embeddings from the unet model after the last step of reverse diffusion",
67
+ "shape" : "[1, 4, 64, 64]",
68
+ "name" : "z",
69
+ "type" : "MultiArray"
70
+ }
71
+ ],
72
+ "userDefinedMetadata" : {
73
+ "com.github.apple.coremltools.source_dialect" : "TorchScript",
74
+ "com.github.apple.coremltools.version" : "7.2",
75
+ "com.github.apple.coremltools.source" : "torch==2.2.2"
76
+ },
77
+ "generatedClassName" : "Stable_Diffusion_version_sd_turbo_vae_decoder",
78
+ "method" : "predict"
79
+ }
80
+ ]
compiled/VAEDecoder.mlmodelc/model.mil ADDED
The diff for this file is too large to render. See raw diff
 
compiled/VAEDecoder.mlmodelc/weights/weight.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7cc4b185bde09496bc25e236de3a0da8d78ef83fc8a7e8fbe4435f3027413c6f
3
+ size 98993280
compiled/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
compiled/vocab.json ADDED
The diff for this file is too large to render. See raw diff