mix1009 / sdwebuiapi

Python API client for AUTOMATIC1111/stable-diffusion-webui
MIT License
1.35k stars 181 forks source link

fix could not find ESRGAN4X problem #127

Closed wangzijian1010 closed 9 months ago

wangzijian1010 commented 11 months ago

the name of ESRGAN4X method has chaned in WEBUI, need update the name of webuiapi's name of ESRGAN

davidmartinrius commented 9 months ago

Hi! How are you doing?

Why did you delete the lines of the function "util_get_current_model" from 779 to 785?

I see you finally return "return self.get_options()["sd_model_checkpoint"]"

Thanks,

David Martin Rius

wangzijian1010 commented 9 months ago

Hi! How are you doing?

Why did you delete the lines of the function "util_get_current_model" from 779 to 785?

I see you finally return "return self.get_options()["sd_model_checkpoint"]"

Thanks,

David Martin Rius

hi there, it's my mistake, i forget to undo this delte

davidmartinrius commented 9 months ago

ok @wangzijian1010 , anyway, there is an endpoint to list the available upscalers in /sdapi/v1/upscalers

Also there is an already implemented function for that get_upscalers()

So, the hardcoded upscalers need to dissapear and this pull request is not needed anymore. Unless, there is a reason that I do not know, that it is another possibility...

Thank you!

David Martin Rius

davidmartinrius commented 9 months ago

Well, after reviewing it again it makes sense to have that properties hardcoded in webuiapi.py. Although they can become obsolete at any time. It's good to have them available. And if one stops working it is always possible to call the get_upscalers endpoint and update the list by hand.

If you restore the function util_get_current_model I can add my review to this pull request.

Thank you!

wangzijian1010 commented 9 months ago

Well, after reviewing it again it makes sense to have that properties hardcoded in webuiapi.py. Although they can become obsolete at any time. It's good to have them available. And if one stops working it is always possible to call the get_upscalers endpoint and update the list by hand.

If you restore the function util_get_current_model I can add my review to this pull request.

Thank you!

hi there!, thank you david, I have restore line 779 to 785 and you can add your review to this pull request, thanks for your reminder, i see your github repo has a lot of ai, can I add you on Skype?

davidmartinrius commented 9 months ago

Well, after reviewing it again it makes sense to have that properties hardcoded in webuiapi.py. Although they can become obsolete at any time. It's good to have them available. And if one stops working it is always possible to call the get_upscalers endpoint and update the list by hand. If you restore the function util_get_current_model I can add my review to this pull request. Thank you!

hi there!, thank you david, I have restore line 779 to 785 and you can add your review to this pull request, thanks for your reminder, i see your github repo has a lot of ai, can I add you on Skype?

Absolutely, if you wanted you can share your skype id and I will add you in my contact list.

David Martin Rius

wangzijian1010 commented 9 months ago

Well, after reviewing it again it makes sense to have that properties hardcoded in webuiapi.py. Although they can become obsolete at any time. It's good to have them available. And if one stops working it is always possible to call the get_upscalers endpoint and update the list by hand. If you restore the function util_get_current_model I can add my review to this pull request. Thank you!

hi there!, thank you david, I have restore line 779 to 785 and you can add your review to this pull request, thanks for your reminder, i see your github repo has a lot of ai, can I add you on Skype?

Absolutely, if you wanted you can share your skype id and I will add you in my contact list.

David Martin Rius

live:2422717601,this is my skype id! Zijian wang