lllyasviel / lllyasviel/stable-diffusion-webui-forge

Issue with Sampling Steps When Generating Image

Open
#2,123 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

On a fresh copy of Forge apart from a single model that I installed, I had noticed that increasing the sampling steps from the base of 20 to something higher (in my case, commonly set to 30) will cause an "Connection errored out" message to display. This results in two things for me:

  1. The completed image does not actually render in the UI, as if it was "deleted" or the code points to a nonexistent image. However, the image exists where it should in output.
  2. Saving the image using the save button does nothing.

This happens regardless of model or prompt and only happens when setting the sampling steps to a higher value.

The console for Forge hints at the following when attempting to save:

Traceback (most recent call last):████████████████████████████████████| 60/60 [02:22<00:00,  3.07s/it]
  File "C:\Apps\AI\webui_forge_cu121_torch231\webui\modules\call_queue.py", line 76, in f
    res = list(func(*args, **kwargs))
  File "C:\Apps\AI\webui_forge_cu121_torch231\webui\modules\ui_common.py", line 75, in save_files
    data = json.loads(js_data)
  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)
Expecting value: line 1 column 1 (char 0)

My browser's console throws this error during generation:

Unexpected error Connection errored out. index.js:2068:28
    Re index.js:2068
    onerror index.js:1403
    onerror index.js:1402
    Xt index.js:1510

In case it matters, here's what I am using for hardware and software config:

  • GPU: RTX 4070 (8GB VRAM)
  • RAM: 32GB
  • Pagefile: 32GB
  • Launch args: --xformers

Let me know if anything else is needed. Thanks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with sampling steps set to 30, then inspect modules/ui_common.py at save_files and index.js around the reported error at line 2068. Compare generation and saving behavior with 20 steps, and verify that the image renders and saves without a connection error or JSONDecodeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, python
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.