ellypaws / stable-diffusion-discord-bot

A Discord bot, written in Go, that interfaces with the Automatic 1111's API interface.
MIT License
6 stars 0 forks source link

Unable to upscale any image. #6

Closed TheMeIonGod closed 3 weeks ago

TheMeIonGod commented 1 month ago

(I am using SD3) When ever I click the button to upscale an image it pops out this message:

Error Multiple errors have occurred: I'm sorry, but I had a problem upscaling your image. error with POST request: unexpected status code: 422 Unprocessable Entity {"error":"HTTPException","detail":"Script 'ADetailer' not found","body":"","errors":""}

I do see a adetailer.go in the entities folder if that helps.

ellypaws commented 3 weeks ago

You can try installing https://github.com/Bing-su/adetailer for your installation of SD to make ADetailer to work as a feature if you haven't installed this extension yet. Otherwise I'll work on a way to disable it if someone doesn't need ADetailer.

You can adjust the code so that upscale doesn't force ADetailer by commenting out the lines in queue/stable_diffusion/upscale.go https://github.com/ellypaws/stable-diffusion-discord-bot/blob/ec8d1bc09b401711311dc68542e5061d5009699c/queue/stable_diffusion/upscale.go#L72-L75

TheMeIonGod commented 3 weeks ago

You can try installing https://github.com/Bing-su/adetailer for your installation of SD to make ADetailer to work as a feature if you haven't installed this extension yet. Otherwise I'll work on a way to disable it if someone doesn't need ADetailer.

You can adjust the code so that upscale doesn't force ADetailer by commenting out the lines in queue/stable_diffusion/upscale.go

https://github.com/ellypaws/stable-diffusion-discord-bot/blob/ec8d1bc09b401711311dc68542e5061d5009699c/queue/stable_diffusion/upscale.go#L72-L75

Thank You. Adding ADetailer does seem to work. Though I think the Upscaler that the bot wants to use isn't really used anymore. I had to manually install it and Automatic1111 did not grab the correct name. I grabbed the Upscaler from https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth put it into the ESRGAN folder under models folder and renamed it to "R-ESRGAN 2x+" to get it to work.