lllyasviel / lllyasviel/stable-diffusion-webui-forge

PC Crash when generating large number of images (100+) using API access

Open
#2,043 2 comments 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

I am using Forge on my WIndows 11 PC(4080). I am using the API via python script to generate multiple images in a row using automated prompts. If I run my script for a long time (100+ images), my PC restarts. I tracked the issue to VRAM out of memory issue. I believe there is a memory leak, but I am not able to identify it.

Has anyone experienced the same issue, and how do you make sure that it does not crash the PC.

My current hacky solution is to add a 30 second delay timer between every generation and using never OOM. However, it kills the speed of my script.

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

Start by reproducing the Windows 11 crash with the reported Python API script while monitoring VRAM across 100 or more image generations. Compare runs with and without the 30-second delay and with “never OOM” enabled. Done means the memory growth or crash trigger is identified and a verified mitigation is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.