Skip to content

Metadata Format Changes

Zixaphir edited this page Nov 11, 2023 · 15 revisions

On occasion, the extension will make changes to the metadata files that can provide additional information, have additional preprocessing to certain fields, or change the structure of files for various reasons. Most users should not need to worry about this and will be fine ignoring these updates as the majority of metadata is unused by SD WebUI or this extension. However, sometimes SD WebUI or this extension will provide new fields users may want that are missing from older versions of the metadata.

Using older versions of metadata should not break anything and care will always be taken to faciliate that new changes are accompanied by compatibility code to ensure no new errors occur.

All changes to the metadata files done by this extension are documented here.

[model_name].civitai.info

1.7.2

  • New section creator added:
{
    ...
    "creator": {
        "username": [str: The creator's username on CivitAI],
        "image": [str: a hyperlink to a thumbnail of the user's profile picture],
    },
    ...
}
  • New section extensions added.
    • This is mostly to keep track of the version of the extension used to generate the file, but other extensions may also add info here.
{
    ...
    "extensions": {
        "sd_civitai_helper": {
            "version": [str: version, X.Y.Z]
        }
        ...
    }
    ...
}
  • The fields allowNoCredit, allowCommercialUse, allowDerivatives, and allowDifferentLicense have been moved from the root of the JSON into the model section.
  • the previous description field has been moved under the model section.
  • version info is now description under the root of the JSON.
  • Old format:
{
    ...
    "description": [str: the model description shown on the model's civitai.com page]
    "allowNoCredit": [bool],
    "allowCommercialUse": [str],
    "allowDerivatives": [bool],
    "allowDifferentLicense": [bool]
    "version info": [str: version information shown on the "version info" card on the model's civitai.com page.]
    ...
},
  • New format:
{
    ...
    "description": [str: version information shown on the "version info" card on the model's civitai.com page.],
    ...
    "model": {
        "description": [str: the model description shown on the model's civitai.com page],
        "allowNoCredit": [bool],
        "allowCommercialUse": [str],
        "allowDerivatives": [bool],
        "allowDifferentLicense": [bool]
    },
    ...
},

1.7.0

  • New field, version info:
{
    ...
    "version info": [str: version information shown on the "version info" card on the model's civitai.com page.],
    ...
}

[model_name].json

1.8.0

  • The VAE field on SD Checkpoints is now populated with the filename of the recommended VAE on Civitai if it is provided.

1.7.4

Old:

{
    ...
    "description": "This is a perfectly fine description.",
    ...
},

New:

{
    ...
    "description": "<!-- This is a perfectly fine description. -->",
    ...
},

1.7.2

  • Field preprocessing changed for fields "description" and "model": {"description": ...}. Non-breaking spaces (\u00a0) are now removed. Trailing newlines are now removed. Some HTML tags are now replaced with markdown-equivalents:
    • <li> replaced with *
    • <code> and </code> replaced with `
  • New section extensions added.
    • This is mostly to keep track of the version of the extension used to generate the file, but other extensions may also add info here.
{
    ...
    "extensions": {
        "sd_civitai_helper": {
            "version": [str: version, X.Y.Z]
        }
        ...
    }
    ...
}

1.7.1

  • Added field preprocessing for description and version info. HTML should now be completely removed from these fields. (BUG: version info was not properly sanitized.)
Clone this wiki locally