BlenderNeko / ComfyUI_TiledKSampler

Tiled samplers for ComfyUI
GNU General Public License v3.0
327 stars 18 forks source link

The example script produces a black image. #8

Open maray29 opened 1 year ago

maray29 commented 1 year ago

I just tried again and the output is a black image. I used the beach example.

Console output:

100%|██████████████████████████████████████████████████████████████████████████████████| 20/20 [00:03<00:00,  5.66it/s]
100%|████████████████████████████████████████████████████████████████████████████████| 236/236 [01:37<00:00,  2.42it/s]
D:\Code\stable-diffusion\ComfyUI_windows_portable\ComfyUI\nodes.py:1140: RuntimeWarning: invalid value encountered in cast
  img = Image.fromarray(np.clip(i, 0, 255).astype(np.uint8))
Prompt executed in 112.21 seconds
BlenderNeko commented 1 year ago

I can not reproduce this on my system. what is your GPU, OS, and what model did you use?

maray29 commented 1 year ago

RTX 3090 FE, Win 10 22H2, Model: Silicon29.safetensors, CC model: control_v11f1e_sd15_tile_fp16.safetensors.

Also tried with vanilla vl-5-pruned-emaonly.safetensors.

The problem must be from my end, because I've had problems with almost all SD implementations. I'd appreciate if you have any suggestions what I can try/test.

iamrohitanshu commented 1 year ago

@maray29 Have you tried applying a VAE separately?

Lerc commented 11 months ago

I'm getting this error, but since I'm using a tiled VAE decoder, I get different symptoms. The VAE decodes most tiles correctly but some come out as black. It doesn't always happen for me though, perhaps dependent on the seed. Interestingly there's a 128px wide strip of correctly decoded within the black. The tile size for the Sampler and the VAE decode was both 512px.

Blackbits

Lerc commented 11 months ago

Doing some experiments with multiple generations and adjusting the VAE tile size. It seems that the black region is always associated with the bottom right corner.

Is it possible that a NaN is propagated by reading beyond the image data in the corner of the image? A literal corner-case if you will.

Lerc commented 11 months ago

A few more tests and the problem does not appear to occur on "random strict" strategy