zixaphir / Stable-Diffusion-Webui-Civitai-Helper

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

[BUG] Does not create skeleton info file when model is not online #38

Closed JingJang closed 7 months ago

JingJang commented 8 months ago

No longer seems to create a skeleton info file when it does not find the file on Civtia.

zixaphir commented 8 months ago

I've pushed some changes to the dev branch. Can you give them a try and see if that helps? Please make sure to backup your data if you do.

JingJang commented 8 months ago

I tried latest version and the dev branch. Latest version doesn't work. But the dev version does seem to work. You also add tags to the info file. Does that work also when select "Replace Old Metadata Formats". Does it add the tags?

zixaphir commented 8 months ago

The tags are just whatever prompts can be scrapped from the Lora file header. I believe it will replace old skeleton files if "replace old metadata formats" is enabled but I have not checked

ewebgh33 commented 7 months ago

If I understand this correctly, it SHOULD create a blank info file if it finds a model but the model is not on CivitAi. I've added a bunch of LORAs from a different site, and true enough, even though I updated yesterday, it does not scaffold a blank file or see that I have manually added .preview.png to the filenames. Should it auto-detect preview images? Or is it the info file that points the extension to the preview image?

Ideally it would make a blank .info and see that I have already added the .preview to the name, and add that to the info file.

zixaphir commented 7 months ago

If I understand this correctly, it SHOULD create a blank info file if it finds a model but the model is not on CivitAi. I've added a bunch of LORAs from a different site, and true enough, even though I updated yesterday.

Please ensure that the version you are running is v1.7.8. You can see the civitai helper version at the bottom of the civitai helper tab. If this is the case, that means that sometime between @JingJang confirming it worked and releasing the newest update, something broke and I need to fix it again.

Ideally it would make a blank .info and see that I have already added the .preview to the name, and add that to the info file.

Local preview files are never added to the civitai.info file. SD WebUI does its own detection of preview images and currently supports the following naming formats: [model_name].[jpg|jpeg|png|webp] or [model_name].preview.[jpg|jpeg|png|webp] (per ui_extra_networks.py#L271-L286), where model_name is the model filename without its file extension. The SD Webui Civitai Helper extension does not do any management what-so-ever of locally added preview files.

That said, the current code for the "use image prompt" option is essentially broken if you're using any image except the first image existing within the metadata. This means even the current options to skip preview files that contain NSFW elements breaks this feature for any models where the first preview image is NSFW. I intend to update this to try several methods of ensuring the correct prompt is returned by this function.

ewebgh33 commented 7 months ago

Thanks for clarifying. I get it now