zixaphir / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
176 stars 24 forks source link

[Feature] Store SHA256 instead of nothing when no Civitai link exists #9

Closed JingJang closed 9 months ago

JingJang commented 9 months ago

In the info file, if it does not link to Civitai it just stores {}. It would be nice to store the SHA256, AutoV2 and maybe original filename of the file in-case person (aka me) renames it.

Also JSON structure for trigger words, so you can fill it manually yourself.

zixaphir commented 9 months ago

The empty file is only really there to tell the extension not to waste time trying to scan the model and ping Civitai's servers uselessly. I suppose adding additional data for advanced users isn't too much to ask. I'll look into working on that.

JingJang commented 9 months ago

Relevant thread https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13152#issuecomment-1712809871

Here is an example of a skeleton info file that I created. This one points to https://huggingface.co/stabilityai/stable-diffusion-2-1

The file size is incorrect.

  "id":,
  "modelId":,
  "name": "Stable-Diffusion-Model",
  "trainedWords": [
    "Missing",
    "Missing"
  ],
  "baseModel": "SD 2.1",
  "description": null,
  "model": {
    "name": "Stable-Diffusion2-1",
    "type": "checkpoint",
    "nsfw": false,
    "poi": false
  },
  "files": [
    {
      "name": "v2-1_768-nonema-pruned.ckpt",
      "sizeKB": 36990.6375,
      "type": "Model",
      "hashes": {
        "AutoV2": "ff144a4984",
        "SHA256": "ff144a49841cf383adbc68841272ce639e1032b0a1f0f6586347feb953c244f4"
      }
    }
  ],
  "downloadUrl": "https://huggingface.co/stabilityai/stable-diffusion-2-1"
}
zixaphir commented 9 months ago

Likely I'd keep the original structuring, but I don't see any point in storing anything that's a null value.

JingJang commented 9 months ago

Just an outline for trigger words and what the end user might fill out.