Skip to content

Commit 5636153

Browse files
committed
Fixes
1 parent 182ec7d commit 5636153

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

webuiapi/webuiapi.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def to_dict(self):
111111

112112

113113
def b64_img(image: Image) -> str:
114-
return "data:image/png;base64," + raw_b64_img(image)
114+
return "data:image/png;base64," + raw_b64_img(image)
115+
115116

116117
def raw_b64_img(image: Image) -> str:
117118
# XXX controlnet only accepts RAW base64 without headers
@@ -230,7 +231,7 @@ async def _to_api_result_async(self, response):
230231
def txt2img(
231232
self,
232233
enable_hr=False,
233-
denoising_strength=0.7,
234+
denoising_strength=0.0,
234235
firstphase_width=0,
235236
firstphase_height=0,
236237
hr_scale=2,
@@ -625,10 +626,22 @@ def get_samplers(self):
625626
response = self.session.get(url=f"{self.baseurl}/samplers")
626627
return response.json()
627628

629+
def get_vaes(self):
630+
response = self.session.get(url=f"{self.baseurl}/sd-vae")
631+
return response.json()
632+
628633
def get_upscalers(self):
629634
response = self.session.get(url=f"{self.baseurl}/upscalers")
630635
return response.json()
631636

637+
def get_latent_upscale_modes(self):
638+
response = self.session.get(url=f"{self.baseurl}/latent-upscale-modes")
639+
return response.json()
640+
641+
def get_loras(self):
642+
response = self.session.get(url=f"{self.baseurl}/loras")
643+
return response.json()
644+
632645
def get_sd_models(self):
633646
response = self.session.get(url=f"{self.baseurl}/sd-models")
634647
return response.json()
@@ -775,7 +788,7 @@ def util_wait_for_ready(self, check_interval=5.0):
775788
time.sleep(check_interval)
776789

777790

778-
## Interface for extensions
791+
# Interface for extensions
779792

780793

781794
# https://github.com/mix1009/model-keyword

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy