From 09702d2aab9a4f6093318a10ec5553a3456d3ab9 Mon Sep 17 00:00:00 2001 From: xieyongliang Date: Wed, 22 Mar 2023 21:38:32 +0800 Subject: [PATCH] Update api.py --- modules/api/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/api/api.py b/modules/api/api.py index 98d54b7405d..2459cad047b 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -418,8 +418,8 @@ def invocations(self, req: InvocationsRequest): response = requests.post(url=f'{api_endpoint}/sd/user', json=inputs) if response.status_code == 200 and response.text != '': try: - user = json.loads(response.text) - shared.opts.data = user['options'] + data = json.loads(response.text) + shared.opts.data = data['options'] with self.queue_lock: sd_models.reload_model_weights() except Exception as e: