AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
139.62k stars 26.47k forks source link

[Bug]: Computer crashes when inpainting large image #13476

Open woaiseeit opened 11 months ago

woaiseeit commented 11 months ago

Is there an existing issue for this?

What happened?

Linux computer freezes when inpainting a large image. I noticed that the larger the image OR the larger the area to be inpainted is, the more likely for the freeze to happen.

I tried disabling all extensions, disabled tc_malloc, disabled xformers, but same thing happens, this is the last line of the console, showing it does not even start:

  0%|          | 0/16 [00:00<?, ?it/s] [00:29<00:00,  1.91s/it]

I tried "Inpaint area: Only masked" and it works longer, but with "Only masked padding, pixels: 256" it still happens.

I tried enabling and using "ControlNet v1.1.410" in the Inpaint tab, but it still happens.

Steps to reproduce the problem

What should have happened?

Image should have been generated.

Sysinfo

sysinfo.txt

What browsers do you use to access the UI ?

Mozilla Firefox

Console logs

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on woaiseeit user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.11.5 (main, Sep  2 2023, 14:16:33) [GCC 13.2.1 20230801]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Checking ReActor requirements... Ok
Launching Web UI with arguments: --xformers
Civitai Helper: Get Custom Model Folder
[-] ADetailer initialized. version: 23.9.3, num models: 9
2023-10-02 21:10:51,210 - ControlNet - INFO - ControlNet v1.1.410
ControlNet preprocessor location: /home/woaiseeit/Projects/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-10-02 21:10:51,277 - ControlNet - INFO - ControlNet v1.1.410
21:10:51 - ReActor - STATUS - Running v0.4.2-b3
Loading weights [ca2412816b] from /home/woaiseeit/Projects/stable-diffusion-webui/models/Stable-diffusion/realistic/aZovyaPhotoreal_v2InpaintVAE.safetensors
Civitai Helper: Settings:
Civitai Helper: max_size_preview: True
Civitai Helper: skip_nsfw_preview: False
Civitai Helper: open_url_with_js: True
Civitai Helper: proxy: 
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 10.3s (prepare environment: 2.7s, import torch: 2.7s, import gradio: 0.7s, setup paths: 0.9s, initialize shared: 0.1s, other imports: 0.6s, load scripts: 1.6s, create ui: 0.7s, gradio launch: 0.2s).
Creating model from config: /home/woaiseeit/Projects/stable-diffusion-webui/configs/v1-inpainting-inference.yaml
Applying attention optimization: xformers... done.
Model loaded in 3.9s (load weights from disk: 1.0s, create model: 0.3s, apply weights to model: 2.3s, calculate empty prompt: 0.1s).

  6%|▋         | 1/16 [00:00<00:12,  1.21it/s]
Total progress:   0%|          | 0/16 [00:00<?, ?it/s]

Additional information

nvtop output Screenshot from 2023-10-02 21-21-33

To workaround it, one needs to send smaller images to the img2img generator, like this:

gillbates commented 11 months ago

same here