painebenjamin / app.enfugue.ai

ENFUGUE is an open-source web app for making studio-grade images and video using generative AI.
GNU General Public License v3.0
686 stars 65 forks source link

Black image as result #144

Open IDelant opened 6 months ago

IDelant commented 6 months ago

I`m trying to generate any image, but in results get blank black image. I follow the guide, starting with fresh install, and this appears. Already tried: Reinstall from auto installer and from manual download Reinstall to another ssd Using different checkpoint model Updating gpu drivers

Notes: Sometimes it's generate an image, but only in between steps, like with 20 steps image appears in 5 10 and 15, but on final step is black. Also, all tries of generating image larger than 320x320 produces black image from first step. Using Samples or Itteration with walue greater than 1 also results in black image Using different model create similar results. Appears on steps, but does't in finals Earlier i`ve installed RealESRGAN, and in results getting black images cause of wrong pytorch version Screenshot_1

Screenshot_2 Screenshot_3

Temder commented 6 months ago

The only thing I can think of that produces black images is the nsfw filter. Do you have it turned off?

IDelant commented 6 months ago

The only thing I can think of that produces black images is the nsfw filter. Do you have it turned off?

I tried different combinations with safety checker/precision/caching/unloading but unfortunatly getting same results

painebenjamin commented 6 months ago

The other situation in which a black image can occur is when a number is out of range - for instance, it gets converted to RGB where one of those values is less than 0 or greater than 255. That occurs due to floating-point rounding errors in some less-stable models; for instance, SDXL 1.0 was infamous for its rounding errors when operating in half-precision, so much so that the standard still is not to use SDXL 1.0's VAE and instead to use SDXL 0.9's.

Could you please let me know what hardware you are using? This has occurred with several other users, and I'm trying to find a commonality between you all so I might be able to fix. At the moment, I'm still unable to reproduce this issue.

A few possible options for remediation:

  1. Under System > Settings, there is an option labeled Precision Mode which defaults to Use Half-Precision When Available. Please try setting this to the alternative option, Always Use Full Precision.
  2. Using the More Model Configuration button will allow you to configure a specific VAE to use. There are two drop-in SD 1.5 VAE's that you can select instead of using the default baked VAE; please try selecting either of them (sd-vae-ft-ema or sd-vae-ft-mse) to see if that changes the final result.

Please let me know if these fix it for you so I can hopefully better address this if it happens in the future, too. Thank you!

IDelant commented 6 months ago

Could you please let me know what hardware

GTX 1660 Super 6gb Ryzen 5 3600 16gb ram Fresh win 10 on which i immediatly downloaded realesgan and dedmucs, day later enfugue

At the moment, I'm still unable to reproduce this issue.

Maybe at some point i can give you remote access so you can possibly debug and catch this

Precision Mode

I tried different combinations with safety checker/precision/caching/unloading but unfortunatly getting same results

Tried, did't help

More Model Configuration button will allow you to configure a specific VAE to use. There are two drop-in SD 1.5 VAE's that you can select instead of using the default baked VAE; please try selecting either of them (sd-vae-ft-ema or sd-vae-ft-mse) to see if that changes the final result.

Please let me know if these fix it for you so I can hopefully better address this if it happens in the future, too. Thank you!

Tried all vae's in list + clearvae from civit al, with both half and full precisions, didn't help

Updated notes: Tried SD webui and encountered an error with vae and net. Both produced NaN values in half precision modes, but using full precision helped get images.

i'm not an expert in AI at all and it's just my thought. but did preview steps decode using selected vae or some integrated and fast solution? Like in SD web you can select vae for preview decoding and maybe preview decodes in full precision, but result in half, so result gets NaN values and image are black.

Also sometimes getting log error(or not), but doesn't exactly know what causes it

stderr (may not be an error:) DEBUG:root:Initializing MLIR with module: _site_initialize_0
DEBUG:root:Registering dialects from initializer <module 'jaxlib.mlir._mlir_libs._site_initialize_0' from 'E:\\Enfugue\\enfugue-server\\jaxlib\\mlir\\_mlir_libs\\_site_initialize_0.pyd'>

DEBUG:jax._src.path:etils.epath was not found. Using pathlib for file I/O.

WARNING:xformers:A matching Triton is not available, some optimizations will not be enabled.

Error caught was: No module named 'triton'

Sorry if i wrote this with a grammar mistakes, i' not a native speaker and was too lazy to check spelling with translator. Thanks!

xXEyeDropXx commented 6 months ago

Hello !

Same issue here.. My hardware :

GTX 1660 Super 6gb Ryzen 5 1600AF 16Gb RAM