mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Added URL for local stable web api
This commit is contained in:
@@ -9318,7 +9318,7 @@ def text2img_api(prompt,
|
||||
"prompt": "{}, {}".format(prompt, art_guide),
|
||||
"params": final_imgen_params,
|
||||
}
|
||||
apiaddress = 'http://127.0.0.1:7860/sdapi/v1/txt2img'
|
||||
apiaddress = '{}/sdapi/v1/txt2img'.format(koboldai_vars.img_gen_api_url)
|
||||
payload_json = json.dumps(final_submit_dict)
|
||||
logger.debug(final_submit_dict)
|
||||
submit_req = requests.post(url=f'{apiaddress}', data=payload_json).json()
|
||||
|
@@ -554,6 +554,19 @@ gensettingstf = [
|
||||
'children': [{'text': 'Use Local Only', 'value': 0}, {'text':'Prefer Local','value':1}, {'text':'Prefer Horde', 'value':2}, {'text':'Use Horde Only', 'value':3}, {'text':'Use Local SD-WebUI API', 'value':4}]
|
||||
},
|
||||
{
|
||||
"UI_V2_Only": True,
|
||||
"uitype": "text",
|
||||
"unit": "text",
|
||||
"label": "Img API URL",
|
||||
"id": "img_gen_api_url",
|
||||
"default": "",
|
||||
"tooltip": "The URL to use when selecting Use Local SD-WebUI API setting in Image Priority",
|
||||
"menu_path": "Interface",
|
||||
"sub_path": "Images",
|
||||
"classname": "user",
|
||||
"name": "img_gen_api_url"
|
||||
},
|
||||
{
|
||||
"UI_V2_Only": True,
|
||||
"uitype": "toggle",
|
||||
"unit": "bool",
|
||||
|
@@ -984,6 +984,7 @@ class user_settings(settings):
|
||||
self.beep_on_complete = False
|
||||
self.img_gen_priority = 1
|
||||
self.show_budget = False
|
||||
self.img_gen_api_url = "http://127.0.0.1:7860/"
|
||||
self.cluster_requested_models = [] # The models which we allow to generate during cluster mode
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user