BlafKing / sd-civitai-browser-plus

Extension to access CivitAI via WebUI: download, delete, scan for updates, list installed models, assign tags, and boost downloads with multi-threading.
GNU Affero General Public License v3.0
289 stars 44 forks source link

add modelVersionId to model json #279

Closed anonstash closed 2 months ago

anonstash commented 2 months ago

I'm working on a change to stable-diffusion-webui to automatically parse the model weights from the "Civitai resources" json when using buttons such as "Send to txt2img". An example of civitai resources json:

Civitai resources: [{"type":"checkpoint","modelVersionId":290640},{"type":"ImageJobNetworkParams { Strength = 0.4, TriggerWord = , Type = lora }","weight":0.4,"modelVersionId":135867},
{"type":"embed","modelVersionId":250708}]

Note the desired Loras are specified by modelVersionId. Currently only the modelId is saved to the model json by the extension, so this change just adds the modelVersionId as well.

BlafKing commented 2 months ago

Looks good! thanks for making a commit, merged! :)