AmericanPresidentJimmyCarter/yasd-discord-bot

some weird results using the bot

ionutanton opened this issue · 9 comments

i got dome weird results using the bot. i cant get it to generate images.
the output is just a wonderfull maze of pixels
image

using:
win 10,
wls 2,
ubuntu 20.04,
python 3.10.8,
docker for windows with wsl integration,
cuda 11.6.0,
running jina from docker build
running yasd bot from ubuntu-wsl2
(did try to run yasd bot in windows, but same results).

what did i do wrong?

What model weights are you using?

sd-v1-5-inpainting.ckpt
Propperly renamed and in ~/ldm/stable-diffusion-v1/ folder.

The brown-gray is usually a result of having noise for the latent space output of the model and then decoding it with the VAE. I am unsure why this is happening. You can also try a non-inpainting model and see if you get a similar result. What GPU and nvidia driver are you using?

tried to switch to sd 1.4. still same result.
below is the output from yasd bot and jina docker
`2022-12-01 09:32:04 INFO discord.client logging in using static token
2022-12-01 09:32:05 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: e7539a5d9959b6145b125d8fee999155).
Loading old buttons back into memory
100%|██████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 21959.71it/s]
0it [00:00, ?it/s]
Bot is alive
/home/user/yasd/yasd-discord-bot/env/lib/python3.10/site-packages/docarray/proto/io/ndarray.py:149: UserWarning: The given NumPy array is not writable, and PyTorch does not support non-writable tensors. This means writing to this tensor will result in undefined behavior. You may want to copy the array to protect its data or make it writable before converting it to a tensor. This type of warning will be suppressed for the rest of this program. (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:199.)
return from_numpy(x)

DEBUG realesrgan/rep-0@48 got an endpoint discovery request [12/01/22 07:33:11]
2022-12-01 09:33:11 DEBUG clipseg/rep-0@49 got an endpoint discovery request [12/01/22 07:33:11]
2022-12-01 09:33:11 DEBUG stable/rep-0@47 recv DataRequest at / with id: [12/01/22 07:33:11]
2022-12-01 09:33:11 12c765d3770345bdaa9c295eed806a37
2022-12-01 09:33:11 DEBUG upscaler/rep-0@52 got an endpoint discovery request [12/01/22 07:33:11]
2022-12-01 09:33:11 DEBUG store/rep-0@55 got an endpoint discovery request [12/01/22 07:33:11]
2022-12-01 09:33:11 INFO stable/rep-0@47 stable diffusion start 4 images, [12/01/22 07:33:11]
2022-12-01 09:33:11 prompt "an eye level street view of bucharest at
2022-12-01 09:33:11 1850, a street with two story houses, shops at street
2022-12-01 09:33:11 level, street is with earth pavement, carriges are
2022-12-01 09:33:11 horse driven, a church is on a small hill in the
2022-12-01 09:33:11 background, photorealistic:1.0"...
2022-12-01 09:33:11 DEBUG stable/rep-0@47 got an endpoint discovery request
Sampling: 0% 0/1 [00:00<WARNING:root:A matching Triton is not available, some optimizations will not be enabled.
2022-12-01 09:33:14 Error caught was: No module named 'triton'
100% 35/35 [00:07<00:00, 4.42it/s]
Sampling: 100% 1/1 [00:10<00:00, 10.43s/it]
2022-12-01 09:33:22 DEBUG realesrgan/rep-0@48 recv DataRequest at / with id: [12/01/22 07:33:22]
2022-12-01 09:33:22 12c765d3770345bdaa9c295eed806a37
2022-12-01 09:33:22 DEBUG realesrgan/rep-0@48 skip executor: mismatch request,
2022-12-01 09:33:22 exec_endpoint: /, requests: {'/realesrgan': <function
2022-12-01 09:33:22 RealESRGANUpscaler.realesrgan at 0x7f20ed01f880>,
2022-12-01 09:33:22 'jina_dry_run': <bound method
2022-12-01 09:33:22 BaseExecutor._dry_run_func of
2022-12-01 09:33:22 <executor.RealESRGANUpscaler object at
2022-12-01 09:33:22 0x7f20ed0265f0>>}
2022-12-01 09:33:22 DEBUG clipseg/rep-0@49 recv DataRequest at / with id: [12/01/22 07:33:22]
2022-12-01 09:33:22 12c765d3770345bdaa9c295eed806a37
2022-12-01 09:33:22 DEBUG clipseg/rep-0@49 skip executor: mismatch request,
2022-12-01 09:33:22 exec_endpoint: /, requests: {'/segment': <function
2022-12-01 09:33:22 ClipSegmentation.segment at 0x7f220060cd30>,
2022-12-01 09:33:22 'jina_dry_run': <bound method
2022-12-01 09:33:22 BaseExecutor._dry_run_func of
2022-12-01 09:33:22 <executor.ClipSegmentation object at
2022-12-01 09:33:22 0x7f220a546ef0>>}
2022-12-01 09:33:22 DEBUG upscaler/rep-0@52 recv DataRequest at / with id: [12/01/22 07:33:22]
2022-12-01 09:33:22 12c765d3770345bdaa9c295eed806a37
2022-12-01 09:33:22 DEBUG upscaler/rep-0@52 skip executor: mismatch request,
2022-12-01 09:33:22 exec_endpoint: /, requests: {'/upscale': <function
2022-12-01 09:33:22 SwinIRUpscaler.upscale at 0x7f21fdb86170>,
2022-12-01 09:33:22 'jina_dry_run': <bound method
2022-12-01 09:33:22 BaseExecutor._dry_run_func of
2022-12-01 09:33:22 <executor.SwinIRUpscaler object at 0x7f21fdb79870>>}
2022-12-01 09:33:22 DEBUG store/rep-0@55 recv DataRequest at / with id: [12/01/22 07:33:22]
2022-12-01 09:33:22 12c765d3770345bdaa9c295eed806a37
2022-12-01 09:33:22 DEBUG store/rep-0@55 skip executor: mismatch request,
2022-12-01 09:33:22 exec_endpoint: /, requests: {'/upscale': <function
2022-12-01 09:33:22 DalleFlowStore.store at 0x7f21c4227520>,
2022-12-01 09:33:22 'jina_dry_run': <bound method
2022-12-01 09:33:22 BaseExecutor._dry_run_func of
2022-12-01 09:33:22 <executor.DalleFlowStore object at 0x7f21c4095bd0>>}`

GPU is 2xQuadro RTX 8000, driver Nvidia RTX/ Quadro Desktop 517.37

Try setting use_half=False in the dalle-flow docker configuration for stable, then re-running python jina flow --uses flow.tmp.yml. Sometimes the older cards struggle with fp16.

Thank you for the advice. It seems like a jina issue. Its getting too hard for me to manage this due to jina issues.
I gave up trying and will close the issue

Sorry about that. I want to add other backends soon to make it easier for people to use.

Your bot is really the greatest. Easy to use and a lot of options. The discord integration really works. For me its the jina backend that is a dealbreaker.
And i had the bot working a while back. It broke on a update.