fixed bug in change_model
This commit is contained in:
parent
85892939f1
commit
43a51e4060
1 changed files with 5 additions and 4 deletions
|
|
@ -1208,6 +1208,7 @@ async def change_model(ctx, model_choice='0'):
|
||||||
model_id, model_name = model_choices[model_choice]
|
model_id, model_name = model_choices[model_choice]
|
||||||
if current_model != model_id:
|
if current_model != model_id:
|
||||||
payload = {"sd_model_checkpoint": model_id}
|
payload = {"sd_model_checkpoint": model_id}
|
||||||
|
async with aiohttp.ClientSession() as session:
|
||||||
async with session.post(url=f'{url}/sdapi/v1/options', json=payload) as response:
|
async with session.post(url=f'{url}/sdapi/v1/options', json=payload) as response:
|
||||||
output = "Changed model to: " + model_name
|
output = "Changed model to: " + model_name
|
||||||
await ctx.send(output)
|
await ctx.send(output)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue