You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -60,11 +61,13 @@ This specification defines 3 categories of key: **MUST**, **SHOULD**, **CAN**
60
61
| --- | --- | --- | --- |
61
62
|`sai_model_spec`|**MUST**| Mandatory identifier key, indicates the presence and version of this specification. Trainer tools that support the spec should automatically emit this key, set to the version they support. |`1.0.0`|
62
63
|`architecture`|**MUST**| The specific classifier of the model's architecture, must be unique between models that have different inferencing requirements (*so for example SDV2-512 and SDv2-768-v are different enough that the distinction must be marked here, as the code must behave different to support it*). Simple finetunes of a model do not require a unique class, as the inference code does not have to change to support it. See architecture ID listing below this table for specific examples. |`stable-diffusion-v1`, `stable-diffusion-xl-v1-base`, `stable-diffusion-xl-v1-refiner`, `stable-diffusion-v1-lora`, `stable-diffusion-v1-textual-inversion`, `gpt-neo-x`|
64
+
|`implementation`|**MUST**| The name/identifier of the standard implementation codebase. The model's tensor keys generally will match variable names within the official codebase. |`sgm`, `diffusers`|
63
65
|`title`|**MUST**| A title unique to the specific model. Generally for end-user training software, the user should provide this. If they do not, one can be provided as just eg the original file name or training run name. Inference UIs are encouraged to display this title to users in any model selector tools. |`Stable Diffusion XL 1.0 Base`, `My Example LoRA`|
64
66
|`description`|**SHOULD**| A user-friendly textual description of the model. This may describe what the model is trained on, what its capabilities are, or specific data like trigger words for a small SD finetunes. This field is permitted to contain very long sections of text, with paragraphs and etc. Inference UIs are encouraged to make this description visible-but-not-in-the-way to end users. Usage of markdown formatting is encouraged, and UIs are encouraged to format the markdown properly (displaying as plaintext is also acceptable where markdown is not possible). |`Stable Diffusion XL is the next generation of Stable Diffusion, a 6.5B parameter model-ensemble that generates etc. etc.`|
65
67
|`author`|**SHOULD**| The name or identity of the company or individual that created a model. Can even be a username or personal profile link. |`Stability.AI`, `MyCorp`, `John Doe`, `github.com/example`|
66
68
|`date`|**SHOULD**| The precise date that a model was created or published, in any ISO-8601-compliant format. |`2023-07-16`, `2023‐07‐16T18:13:38Z`|
67
69
|`hash_sha256`|**SHOULD**| A hash of all tensor content (ie excluding the header section), with `0x` prefix and no byte-separator symbols. Other keys with the `hash_` prefix followed by a different hash algorithm (eg `hash_md5`) are expected to obey the same format rules and implement the hash algorithm named within. Future versions of the spec may change which algorithm is encouraged as `SHOULD`. Inferencing engines are encouraged to validate that the hash matches after loading a file and warn the user if it does not match (ie possible file corruption). Model trainers/modifiers are strongly encouraged to calculate the hash and emit it correctly automatically whenever saving a model. This is not a `MUST` because hash algorithms may change with time, and the format should not be locked in to just one. |`0x123abc...`|
70
+
|`implementation_version`|**CAN**| A minimum required version of the specified `implementation` codebase. This can be an actual version ID (eg `2.0.0`) or a commit hash. |`2.0.0`, `abc123`|
68
71
|`license`|**CAN**| If the model is under any form of license terms or restrictions, they should be clearly identified here. The model creator may at their own discretion (A) provide the name of the license, (B) provide a link to the license terms, or (C) emit the license terms in full in this slot. |`CC-BY-SA-4.0`, `CreativeML Open RAIL-M`|
69
72
|`usage_hint`|**CAN**| Usage hint(s) for the model, where applicable. This field should be short, and just quickly describe bits of information a user might need while operating the model. Inference UIs are encouraged to make this information readily visible to the user when it is present. For example, a small SD finetune model would use this to list trigger words. |`Trigger word: mypetcat`, `Always use <user> and <assistant> prefixes!`|
70
73
|`thumbnail`|**CAN**| A (very small!) thumbnail icon in data-image format to be provided as a preview in inference UIs. Note that safetensors headers usually occupy a few hundreds of kilobytes, and don't get officially limited until 100 megabytes, so a small jpeg in data-image format does not significantly increase the size. `256x256` is a recommended size and aspect ratio (square). |`data:image/jpg;base64,abc123…`|
0 commit comments