stable_diffusion.openvino icon indicating copy to clipboard operation
stable_diffusion.openvino copied to clipboard

fish: Job 1, 'python3 stable_diffusion.py --p…' terminated by signal SIGKILL (Forced quit)

Open mathiasfoster opened this issue 3 years ago • 8 comments

I get a persistent error when my job finishes... the process is killed, and no image is outputted.

Here's an example using 2 inference steps only (so it runs quickly):

> python3 stable_diffusion.py --prompt "Street-art painting of a dinosaur in the style of Banksy, photorealism" --output "banksy-dinosaur.jpg" --num-inference-steps 2
2it [00:25, 12.97s/it]
fish: Job 1, 'python3 stable_diffusion.py --p…' terminated by signal SIGKILL (Forced quit)

The same thing happens in both fish and bash.

What is causing this, and how can I get the job to complete?

mathiasfoster avatar Aug 30 '22 01:08 mathiasfoster

Same here. Running python3.8 under Linux Mint 20.04 EDIT: It's not getting passed self.unet = self.core.compile_model(self._unet, device) at https://github.com/bes-dev/stable_diffusion.openvino/blob/master/stable_diffusion.py#L40. device == 'CPU' and self._unet == image if that helps.

wlgrd avatar Aug 30 '22 09:08 wlgrd

@mathiasfoster it looks like the fish terminal automatically terminates hanged (???) process. But I can't to reproduce this error on my side, could you please provide more information about it?

bes-dev avatar Aug 30 '22 11:08 bes-dev

How much RAM do you have free? I had this same issue because I only had 6G free and the EOM killer kicked in.

mrnoname1000 avatar Aug 31 '22 14:08 mrnoname1000

Getting same error. Seems like issue with RAM.

kaichogami avatar Sep 08 '22 07:09 kaichogami

if you are in linux, you can have a swap file the bigger you want. https://wiki.archlinux.org/title/swap#Swap_file

rncar avatar Sep 08 '22 07:09 rncar

I was on WSL2 machine and the problem was because the RAM was limited to around 7.5K unit of memory. I increased it to 12GB and it seems to work fine. However for 32 iterations it takes around 3 mins to generate.

wsl2 docs for increasing limit

kaichogami avatar Sep 08 '22 08:09 kaichogami

Had this error too, increasing ram did remove the error and threw another: #93

smileBeda avatar Mar 26 '23 04:03 smileBeda

I was having a similar issue with SIGKILL killing my process, usually after the "Downloading..." step. Bumping the swapfile up to 6GB resolved this for me:

swapoff /swapfile  # May take a minute
fallocate -l 6G /swapfile
mkswap /swapfile
swapon /swapfile

(Ubuntu 22.04, zsh, Python 3.10, 16GB RAM, Intel i7-6600U CPU @ 2.60GHz × 4)

shadowFAQs avatar Jan 06 '24 15:01 shadowFAQs