NON906 / sd-webui-chatgpt

This is a repository for conversations using OpenAI API (compatible with ChatGPT) or llama.cpp in Stable Diffusion web UI.
MIT License
39 stars 7 forks source link

json_settings issue in A1111 #5

Open OtakuFra opened 9 months ago

OtakuFra commented 9 months ago

Running on local URL: http://127.0.0.1:7860

To create a public link, set share=True in launch(). Creating model from config: D:\Data\Packages\Stable Diffusion WebUI\configs\v1-inference.yaml *** Error executing callback app_started_callback for D:\Data\Packages\Stable Diffusion WebUI\extensions\sd-webui-chatgpt\scripts\main.py Traceback (most recent call last): File "D:\Data\Packages\Stable Diffusion WebUI\modules\script_callbacks.py", line 139, in app_started_callback c.callback(demo, app) File "D:\Data\Packages\Stable Diffusion WebUI\extensions\sd-webui-chatgpt\scripts\main.py", line 368, in on_started lines = public_ui_value['json_settings'].count('\n') + 1 KeyError: 'json_settings'

I'm unable to use chatGpt in A1111, on the 1st installation the tab is showing up but after relaunch the tab has gone, and nothing to do to make it work. Can you check after this issue please? Regards.

NON906 commented 9 months ago

Apart from this, there was an issue where settings were not displayed in the UI, so I changed the process. https://github.com/NON906/sd-webui-chatgpt/commit/12efdf1897ae02a05abe549a5adf141103f164d7

Since I changed the process itself, I don't think the same error will occur, so could you please check it?

OtakuFra commented 9 months ago

*** Error executing callback ui_tabs_callback for D:\Data\Packages\Stable Diffusion WebUI\extensions\sd-webui-chatgpt\scripts\main.py Traceback (most recent call last): File "D:\Data\Packages\Stable Diffusion WebUI\modules\script_callbacks.py", line 166, in ui_tabs_callback res += c.callback() or [] File "D:\Data\Packages\Stable Diffusion WebUI\extensions\sd-webui-chatgpt\scripts\main.py", line 53, in on_ui_tabs init_txt2img_params() File "D:\Data\Packages\Stable Diffusion WebUI\extensions\sd-webui-chatgpt\scripts\main.py", line 48, in init_txt2img_params txt2img_params_base = json.loads(txt2img_params_json) File "json\__init__.py", line 346, in loads File "json\decoder.py", line 337, in decode File "json\decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Nothing changes, the tab is still missing

NON906 commented 9 months ago

The previous close was my mistake.

Nothing like that has happened here. I fixed the problem that I thought was the cause, but if it still doesn't work, please reply with the version of webui, python, etc.

OtakuFra commented 9 months ago

Thank you, I have two installations on two hard drives, one to test the extensions to avoid any possible conflicts between other modules, and one for my use, see the files with all the information for each one A111,auto-installer.txt A1111-stability matrix.txt regards.

NON906 commented 9 months ago

Currently, I am not able to reproduce the problem, but it seems that the setting files are failing to load. So, I changed to read the initial value in case of failure. https://github.com/NON906/sd-webui-chatgpt/commit/1da884b70e81f322e6d8a3c3d7e69baa41388e36

Does this work?

OtakuFra commented 9 months ago

no, for both installations I still get the same "error" message; To use your tool, I just need to configure my API key, right?

https://1drv.ms/i/s!AixYzdRQqk_-lIg9yPRN_2E6aFfCTw?e=m7eLyk

File "C:\Users\Shadow\Documents\A1111 Web UI Autoinstaller\stable-diffusion-webui\venv\lib\site-packages\openai\api_requestor.py", line 775, in _interpret_response_line
    raise self.handle_error_response(
openai.error.InvalidRequestError: **you must provide a model parameter**

what model is this here? I don't understand.

ps: I have of course the GPT-4 subscription

NON906 commented 9 months ago

Enter "gpt-3.5-turbo" (or "gpt-4") in "ChatGPT Model Name" and click the button next to it.

OtakuFra commented 9 months ago

doesn't work, still the error message :/

NON906 commented 9 months ago

I apologize for the inconvenience, but please check the following:

OtakuFra commented 9 months ago

Thank you for your time, i don't know why it didn't work, for now i've canceled my subscription, will see that later, i still have a lot to learn with Stable diffusion. regards. Ticket closed