Open zhouhao27 opened 1 month ago
@zhouhao27 I'm unable to reproduce this. Are you seeing the exact same traceback everytime? Is it possible to share the full traceback?
@zhouhao27 I'm unable to reproduce this. Are you seeing the exact same traceback everytime? Is it possible to share the full traceback?
The full traceback:
Loading pipeline components...: 100%|█████████████| 7/7 [00:00<00:00, 18.00it/s] 100%|███████████████████████████████████████████| 50/50 [01:08<00:00, 1.38s/it] [1] 2958 segmentation fault python run.py /opt/miniconda3/envs/sd/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown warnings.warn('resource_tracker: There appear to be %d '
Does your run.py
script consist of just that snippet you've shared? It looks like the diffusers part finished running the inference loop?
And how much RAM/GPU VRAM does your machine have?
Does your
run.py
script consist of just that snippet you've shared? It looks like the diffusers part finished running the inference loop?And how much RAM/GPU VRAM does your machine have?
Yes, all the code are shown already. I'm running in Mac Mini M2 with 16GB. Not sure how much GPU VRAM? Have no problem to run webui of Stable Diffusion.
Could you try running in FP16?
import torch
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5", torch_dtype=torch.float16)
pipe = pipe.to("mps")
# Recommended if your computer has < 64 GB of RAM
pipe.enable_attention_slicing()
prompt = "a photo of an astronaut riding a horse on mars"
image = pipe(prompt).images[0]
Describe the bug
It crashes when I call
image = pipe(prompt).images[0]
. The code is:Reproduction
Just run my code will crash.
Logs
System Info
Who can help?
No response