Skip to content

Commit

Permalink
add host, port, baseurl to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
mix1009 committed Nov 8, 2022
1 parent cc7bbc0 commit 808e21c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions webuiapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,16 @@ def b64_img(image: Image):
return img_base64

class WebUIApi:
def __init__(self, sampler='Euler a', steps=20):
self.baseurl = 'http://127.0.0.1:7860/sdapi/v1'
def __init__(self,
host='127.0.0.1',
port=7860,
baseurl=None,
sampler='Euler a',
steps=20):
if baseurl is None:
baseurl = f'http://{host}:{port}/sdapi/v1'

self.baseurl = baseurl
self.default_sampler = sampler
self.default_steps = steps

Expand Down

0 comments on commit 808e21c

Please sign in to comment.