Civitai-to-A1111 translator版本v1.42Cors-Less (ID: 802372)

Civitai-to-A1111 translator版本v1.42Cors-Less (ID: 802372)

Update: Bugfix - The old pure JS-Version stopped working due to CORS-Errors. Also newer Meta-Data sometimes crashed the extension. Fixed now. Feels slower, but still does the job...

Purpose: I like to save AI-images, to drop them later into A1111 and play with the used Loras/Styles. However, the Civitai-Generator doesn't offer Meta-Data in the format A1111 is used to, so it's quite a effort to set everything up. With help of Civitai-API I wrote a little extension, that helps with that.

Usage: Unzip the extension into your Extensions folder and restart the UI. A new Button appears. Drop an image into the prompt-area. Hit the new button (1) under "Generate". Wait a little until the prompt gets an update. Hit the good old apply-button (2), hit Generate and see (or read) what happens.

What happens:

Let's take for example: https://civitai.com/images/8010475 (and leave a thumbs up, while you're there). If you'd save it and drop it into the prompt area, you can see, it has the following info...

[{"type":"checkpoint","modelVersionId":290640},{"type":"lora","weight":1,"modelVersionId":349887},{"type":"embed","weight":1,"modelVersionId":5637}]

... which A1111 and Forge totally ignore. The overall Prompt is used, but the Checkpoint and the Loras are lost, even if they are installed. Hitting the new translate [↔] button, my script asks the Civitai-Api for Info and converts it to a format the "Apply" button understands and adds some further infos after the #

By default A1111 ignores everything in a line after a "#" when it comes to generation, so you can just ignore the following if you don't like that info.

After the # you get a "ready to paste" URL to open the models on Civitai, in case you don't have the model installed. If my extension doesn't find the file, it puts ? to the end of the line, otherwise you get an ☑(icons might look slightly differently on your computer). If it doesn't find the models, despite them being in your folders, check if the filename is correct in the <angle brackets:1>. Sometimes files get renamed and that's enough for A1111 and Forge to skip over them (sometimes this makes them ignoring all loras, even found one's).

On top it adds "RNG:CPU", to the end which seems to be what Civitai is using (this setting will appear in the overrides).

After this, hit "Apply" like usual ,and "Generate" now has a chance to find the the correct loras/models.

Limitations:

A) You will not get the exact same picture, just pretty close. Differences in Hardware and Software-versions as well as Civitai's "behind the scenes magic/optimizations" will always make at least a tiny difference (You can experiment to with CFG/GFG-fix - in my experiments +1.5 or +2.5 get the results often a little closer, but that seems to be random as well, and not worth the time). However for me the important thing, is to use pictures as an archive for interesting styles, so this is only making sure, that I have the right ingredients together.

B) It will only work for Images created with the Civitai-Generator.

C) Updates/Changes in the Api might break this little script in no time.

D) If a resource is gone from Civitai, my script and the Api will be of no use.

E) If your Web UI is set to remove styles on "apply", the whole procedure will probably be useless.

描述:

Former versions of the plugins suddenly stopped working, due to some CORS-Problems. A1111 and Forge now handle the Requests in the background. Also newer Meta-Data sometimes crashed the extension. Fixed now. Feels slower than the former Version, but it does the job. On the plus-side I could finally add a check, if the WebGui finds the used Loras/Models.

训练词语:

名称: civitaiToA1111_v142corsLess.zip

大小 (KB): 5

类型: Archive

Pickle 扫描结果: Success

Pickle 扫描信息: No Pickle imports

病毒扫描结果: Success

Civitai-to-A1111 translator

Civitai-to-A1111 translator

资源下载
下载价格VIP专享
仅限VIP下载升级VIP
犹豫不决让我们错失一次又一次机会!!!
原文链接:https://1111down.com/1098291.html,转载请注明出处
由于网站升级,部分用户密码全部设置为111111,登入后自己修改, 并且VIP等级提升一级(包月提升至包季,包季提升到包年 包年提升至永久)
没有账号?注册  忘记密码?

社交账号快速登录