File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 11
11
12
12
setup (
13
13
name = "webuiapi" ,
14
- version = "0.9.0 " ,
14
+ version = "0.9.1 " ,
15
15
description = "Python API client for AUTOMATIC1111/stable-diffusion-webui" ,
16
16
url = "https://github.com/mix1009/sdwebuiapi" ,
17
17
author = "ChunKoo Park" ,
Original file line number Diff line number Diff line change 12
12
ControlNetUnit ,
13
13
)
14
14
15
- __version__ = "0.9.0 "
15
+ __version__ = "0.9.1 "
16
16
17
17
__all__ = [
18
18
"__version__" ,
Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ def __init__(
138
138
sampler = "Euler a" ,
139
139
steps = 20 ,
140
140
use_https = False ,
141
+ username = None ,
142
+ password = None ,
141
143
):
142
144
if baseurl is None :
143
145
if use_https :
@@ -151,7 +153,10 @@ def __init__(
151
153
152
154
self .session = requests .Session ()
153
155
154
- self .check_controlnet ()
156
+ if username and password :
157
+ self .set_auth (username , password )
158
+ else :
159
+ self .check_controlnet ()
155
160
156
161
def check_controlnet (self ):
157
162
try :
@@ -162,6 +167,7 @@ def check_controlnet(self):
162
167
163
168
def set_auth (self , username , password ):
164
169
self .session .auth = (username , password )
170
+ self .check_controlnet ()
165
171
166
172
def _to_api_result (self , response ):
167
173
if response .status_code != 200 :
You can’t perform that action at this time.
0 commit comments