Skip to content

Commit 5a3feb8

Browse files
committed
clearer version labeling
1 parent 8eb25f9 commit 5a3feb8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The data within should identify clearly (A) the type and function of a model, cl
66

77
## Version
88

9-
This is specification version 1.0 - `sai_model_spec_1.0`. **NOT YET FINAL. PENDING REVIEW.**
9+
This is specification version 1.0.0. **NOT YET FINAL. PENDING REVIEW.**
1010

1111
## Technical Placement
1212

@@ -19,7 +19,7 @@ The following is an example of what the header of a compliant file might look li
1919
```js
2020
{
2121
"__metadata__": {
22-
"modelspec.version": "sai_model_spec_1.0",
22+
"modelspec.sai_model_spec": "1.0.0",
2323
"modelspec.architecture": "stable-diffusion-xl-v1-base",
2424
"modelspec.title": "Example Model Version 1.0",
2525
"other_keys": "..."
@@ -32,7 +32,7 @@ The following is an example of what the header of a compliant file might look li
3232

3333
### Trainers
3434

35-
Trainers should copy pre-existing keys from the source file where relevant (architecture, etc.), auto-generate keys (version, hash, data, etc.) where relevant, and make it easy for the user to specify any user-modifiable keys (title, description, etc.).
35+
Trainers should copy pre-existing keys from the source file where relevant (architecture, etc.), auto-generate keys (modelspec version, hash, data, etc.) where relevant, and make it easy for the user to specify any user-modifiable keys (title, description, etc.).
3636

3737
### Inferencing Tools and UIs
3838

@@ -58,7 +58,7 @@ This specification defines 3 categories of key: **MUST**, **SHOULD**, **CAN**
5858

5959
| Name | Type | Description | Examples |
6060
| --- | --- | --- | --- |
61-
| `version` | **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. | `sai_model_spec_1.0` |
61+
| `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` |
6262
| `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` |
6363
| `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` |
6464
| `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.` |

examples/python/example_hf_safetensors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# Metadata Example
1515
metadata = {
1616
# === Must ===
17-
"modelspec.version": "sai_model_spec_1.0", # Required version ID for the spec
17+
"modelspec.sai_model_spec": "1.0.0", # Required version ID for the spec
1818
"modelspec.architecture": "stable-diffusion-xl-v1-base", # Architecture, reference the ID of the original model of the arch to match the ID
1919
"modelspec.title": "Example Model Version 1.0", # Clean, human-readable title. May use your own phrasing/language/etc
2020
# === Should ===

examples/python/example_no_reqs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# Metadata Example
1414
metadata = {
1515
# === Must ===
16-
"modelspec.version": "sai_model_spec_1.0", # Required version ID for the spec
16+
"modelspec.sai_model_spec": "1.0.0", # Required version ID for the spec
1717
"modelspec.architecture": "stable-diffusion-xl-v1-base", # Architecture, reference the ID of the original model of the arch to match the ID
1818
"modelspec.title": "Example Model Version 1.0", # Clean, human-readable title. May use your own phrasing/language/etc
1919
# === Should ===

0 commit comments

Comments
 (0)