bes-dev / stable_diffusion.openvino

Apache License 2.0
1.53k stars 206 forks source link

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

Open mathiasfoster opened 2 years ago

mathiasfoster commented 2 years ago

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?

wlgrd commented 2 years ago

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.

bes-dev commented 2 years ago

@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?

mrnoname1000 commented 2 years ago

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

kaichogami commented 2 years ago

Getting same error. Seems like issue with RAM.

rncar commented 2 years ago

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

kaichogami commented 2 years ago

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

smileBeda commented 1 year ago

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

shadowFAQs commented 8 months ago

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)