InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[bug]: Black Images NVIDIA T1000 8GB

Open creakyrock08847 opened this issue 1 year ago • 3 comments

Is there an existing issue for this problem?

  • [X] I have searched the existing issues

Operating system

Linux

GPU vendor

Nvidia (CUDA)

GPU model

NVIDIA T1000

GPU VRAM

8GB

Version number

v4.0.0rc1

Browser

Google Chrome 122.0.6261.113

Python dependencies

No response

What happened

Hello, everything I try to generate an image it just turns out as a black image. I am running invoke in a docker on unraid.

I have tried tried lowing my steps and setting my steps to an odd number suggested by others. I'm using model 1-5.

I have tried a few different schedulers with no luck.

I have switched the VAE Precision between 16 and 32 with nothing changing.

When an image first starts it shows up some pixles and then goes black a second or 2 after. image (1) image log.txt

What you expected to happen

I expected images to generate.

How to reproduce the problem

No response

Additional context

No response

Discord username

creakyrock

creakyrock08847 avatar Mar 15 '24 20:03 creakyrock08847

Did it work previously? If so, what was the last app version where it worked?

This line is interesting:

/home/invokeuser/venv/lib/python3.10/site-packages/diffusers/image_processor.py:90: RuntimeWarning: invalid value encountered in cast
  images = (images * 255).round().astype("uint8")

That's in the VaeImageProcessor class, as it tries to convert the numpy image into a PIL image. This code hasn't been changed in some time, but maybe something around it has been.

psychedelicious avatar Mar 21 '24 04:03 psychedelicious

Did it work previously? If so, what was the last app version where it worked?

This line is interesting:

/home/invokeuser/venv/lib/python3.10/site-packages/diffusers/image_processor.py:90: RuntimeWarning: invalid value encountered in cast
  images = (images * 255).round().astype("uint8")

That's in the VaeImageProcessor class, as it tries to convert the numpy image into a PIL image. This code hasn't been changed in some time, but maybe something around it has been.

It has never worked.

creakyrock08847 avatar Mar 21 '24 12:03 creakyrock08847

Ok. I believe this issue is related to the GPU and its supported precision settings.

Let's try forcing fp32 precision for the whole app.

In the invokeai.yaml file, add a Device: section if it doesn't already exist. Then, add precision: float32 under it:

InvokeAI:
  Device:
    precision: float32

You could also try precision: autocast.

Do either of those fix the issue?

psychedelicious avatar Mar 21 '24 21:03 psychedelicious