Closed scruffynerf closed 1 year ago
This would be amazing. Could we get this to be a thing? I download Loras and have to keep referencing outside sources from the gui.
this would be revolutionary
How are you using Lora models? Is it natively supported in webui or do we still need https://github.com/kohya-ss/sd-webui-additional-networks ?
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Features#lora
Looks like it's natively supported :)
Here's a jumpstart... hashes v1, trigger, and lora filename... sourced from Civitai json records. Not every lora is there, as some only have hashv2, and I didn't list any with no training words listed.
I'll post code I used to generate this list on a gist/repo later. I have a bunch of lora/TI code to post, including how to identify if a TI or Lora is v1 or v2 (myself, I rename the v2s to avoid confusion)
How did you get nsfw contents? The REST API for models only returns nsfw=False without the api key. Could not find any documentation on how to use the api key for REST API.
Most of that is sourced before apikey was added.
We have a script that should work, and I'll get @justmaier of Civitai involved if need be.
That would be great. I'm running cron scripts to update the text file.
Implemented LORA support. Default database doesn't contain NSFW, but users can add custom mappings.
About the AutoV1 hash problem. AutoV1 hashes 64KB starting from 1MB. Even though some hashes are missing from the civitai json, it's really easy to calculate hash without downloading the whole model file. But some LORA models are smaller than 1MB. I'll try to hash the whole file in this case. The workaround shouldn't have side effects since nobody seems to use it now :>
There are hash v2s in Civitai, I just didn't include them because you were not using them. Easily added.
That would be great. I'm running cron scripts to update the text file.
If you msg me or post the cron job script, I'll review and get it working. "API key shouldn’t be necessary unless they’re trying to do user specific stuff like getting favorites or downloading an early access model." is the official answer I got.
"There was a bug in the api after adding the browsing mode changes yesterday. This should be working as expected again now." Try it now. Let me know if you get all of the models you are looking for.
Tried it now, but seems civitai.com is down. 502(cloudflare) for website. 503 for api.
I'll try later. Thanks.
The API is working and it's returning all LORA models including NSFW.
With Loras gaining massive speed (and small size), they are growing in popularity. Mostly similar to the checkpoint models, they use trigger words... so a hash/trigger word approach would be needed. Pretty much like a middle ground between TIs and Checkpoint models.
Loras only get loaded on prompt start, so either adding them via model keyword (similar to TIs), or detecting they are in prompt as (# is strength, can be floating and more or less than 1)