AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.56k stars 26.75k forks source link

[Bug]: D:\stable-diffusion2\automatic\modules\processing.py:733: RuntimeWarning: invalid value encountered in cast x_sample = x_sample.astype(np.uint8) #12696

Closed Accy587 closed 1 year ago

Accy587 commented 1 year ago

Is there an existing issue for this?

What happened?

I got RuntimeWarning: invalid value encountered in cast x_sample = x_sample.astype(np.uint8) trying to use a lora trained by https://github.com/bmaltais/kohya_ss which is also the newest version v21.8.7 with these settings https://www.mediafire.com/file/p7hc4q8n7wuu31z/CharacterLoraSettings.json/file. The output in the web ui is also just black too but the samples from kohya look fine. Any other lora works just fine and dose not have that error or issue, just the ones I train.

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ... load my lora tell it to produce an image

What should have happened?

It should have not given me that error or just a black output.

Version or Commit where the problem happens

1.5.1

What Python version are you running on ?

Python 3.10.x

What platforms do you use to access the UI ?

Windows

What device are you running WebUI on?

Nvidia GPUs (RTX 20 above)

Cross attention optimization

xformers

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

No

List of extensions

Yes

sd_dreambooth_extension

Console logs

Using VENV: D:\stable-diffusion2\automatic\venv
08:44:39-663592 INFO     Starting SD.Next
08:44:39-683542 INFO     Python 3.10.11 on Windows
08:44:39-775292 INFO     Version: 1666ee68 Sat Aug 19 19:44:58 2023 +0300
08:44:41-207729 INFO     Latest published version: 70395fb63a76f99579f040e67f3c55ad17f6035b 2023-08-20T12:16:06Z
08:44:41-212715 INFO     nVidia CUDA toolkit detected
08:44:41-609698 INFO     Disabled extensions: []
08:44:41-611645 INFO     Enabled extensions-builtin: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR',
                         'Lora', 'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
08:44:41-621622 INFO     Enabled extensions: ['sd_dreambooth_extension']
08:44:41-624616 INFO     No changes detected: Quick launch active
08:44:41-625608 INFO     Verifying requirements
08:44:41-652537 INFO     Verifying packages
08:44:41-656530 INFO     Disabled extensions: []
08:44:41-658520 INFO     Enabled extensions-builtin: ['a1111-sd-webui-lycoris', 'clip-interrogator-ext', 'LDSR',
                         'Lora', 'multidiffusion-upscaler-for-automatic1111', 'ScuNET', 'sd-dynamic-thresholding',
                         'sd-extension-system-info', 'sd-webui-agent-scheduler', 'sd-webui-controlnet',
                         'stable-diffusion-webui-images-browser', 'stable-diffusion-webui-rembg', 'SwinIR']
08:44:41-667500 INFO     Enabled extensions: ['sd_dreambooth_extension']
08:44:41-751276 INFO     Extension preload: 0.0s D:\stable-diffusion2\automatic\extensions-builtin
08:44:41-772219 INFO     Extension preload: 0.0s D:\stable-diffusion2\automatic\extensions
08:44:41-847021 INFO     Server arguments: []
08:45:57-633734 INFO     Pipeline: Backend.ORIGINAL
08:46:03-507649 INFO     Libraries loaded
08:46:03-510639 INFO     Using data path: D:\stable-diffusion2\automatic
08:46:03-514634 INFO     Available VAEs: D:\stable-diffusion2\automatic\models\VAE 0
08:46:03-554522 INFO     Available models: D:\stable-diffusion2\automatic\models\Stable-diffusion 3
08:46:10-457457 INFO     ControlNet v1.1.234
ControlNet v1.1.234
ControlNet preprocessor location: D:\stable-diffusion2\automatic\extensions-builtin\sd-webui-controlnet\annotator\downloads
08:46:10-875785 INFO     ControlNet v1.1.234
ControlNet v1.1.234
08:46:15-107524 WARNING  Selected checkpoint not found: CharacterLora-000014.safetensors [ac70463d5a]
Selected checkpoint not found: CharacterLora-000014.safetensors [ac70463d5a]
Loading weights: D:\stable-diffusion2\automatic\models\Stable-diffusion\CharacterLora.safetensors ------ 0.0/1… -:--:--
                                                                                                         MB
08:46:15-488502 INFO     Torch override dtype: no-half set
Torch override dtype: no-half set
08:46:15-489503 INFO     Torch override VAE dtype: no-half set
Torch override VAE dtype: no-half set
08:46:15-490496 INFO     Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
Setting Torch parameters: dtype=torch.float32 vae=torch.float32 unet=torch.float32
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
08:46:28-955953 INFO     Applying xformers cross attention optimization
Applying xformers cross attention optimization
08:46:29-005852 INFO     Embeddings: loaded=0 skipped=0
Embeddings: loaded=0 skipped=0
08:46:29-013802 INFO     Model loaded in 13.7s (load=0.2s create=11.6s move=1.9s)
Model loaded in 13.7s (load=0.2s create=11.6s move=1.9s)
08:46:29-221325 INFO     Model load finished: {'ram': {'used': 1.02, 'total': 15.77}, 'gpu': {'used': 5.11, 'total':
                         12.0}, 'retries': 0, 'oom': 0} cached=0
Model load finished: {'ram': {'used': 1.02, 'total': 15.77}, 'gpu': {'used': 5.11, 'total': 12.0}, 'retries': 0, 'oom': 0} cached=0
08:46:30-368442 INFO     Loading UI theme: name=black-orange style=Auto
08:46:31-091116 INFO     Available models: D:\stable-diffusion2\automatic\models\Stable-diffusion 3
Running on local URL:  http://127.0.0.1:7860
08:46:32-577922 INFO     Local URL: http://127.0.0.1:7860/
08:46:32-580881 INFO     Initializing middleware
08:46:32-747437 INFO     [AgentScheduler] Task queue is empty
08:46:32-750428 INFO     [AgentScheduler] Registering APIs
08:46:32-859825 INFO     Startup time: 111.0s (torch=55.8s gradio=7.0s libraries=18.8s codeformer=0.9s gfpgan=0.4s
                         scripts=24.9s onchange=0.6s ui-txt2img=0.1s ui-img2img=0.1s ui-settings=0.1s
                         ui-extensions=1.5s ui-defaults=0.1s launch=0.4s app-started=0.3s)
D:\stable-diffusion2\automatic\modules\sd_samplers_common.py:42: RuntimeWarning: invalid value encountered in cast
  x_sample = np.moveaxis(x_sample.numpy(), 0, 2).astype(np.uint8)
Progress 2.28it/s ---------------------------------------- 100% 0:00:00 0:00:08
D:\stable-diffusion2\automatic\modules\processing.py:733: RuntimeWarning: invalid value encountered in cast
  x_sample = x_sample.astype(np.uint8)

Additional information

No response

catboxanon commented 1 year ago

Console log indicates you're using SD.Next. Please open an issue in the correct repo. https://github.com/vladmandic/automatic