lllyasviel / stable-diffusion-webui-forge

GNU Affero General Public License v3.0
8.52k stars 835 forks source link

[Bug]: The generated images are coming out to be all blank #841

Open 4yu5h-crtl opened 4 months ago

4yu5h-crtl commented 4 months ago

Checklist

What happened?

the txt2img is not working as expected as whenever I write some text and click generate, it generates a blank or all-black image Screenshot 2024-07-14 131214

Steps to reproduce the problem

1) go to txt2img and type any prompt of your choice. 2) click generate

What should have happened?

I don't understand

What browsers do you use to access the UI ?

Brave

Sysinfo

sysinfo-2024-07-14-07-44.json

Console logs

Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f0.0.9-latest-51-g5bea443d
Commit hash: 5bea443d94f3a85f819cb8541c1bba0aac208d83
Installing forge_legacy_preprocessor requirement: changing opencv-python version from 4.10.0.84 to 4.8.0
Installing sd-forge-controlnet requirement: changing opencv-python version from 4.10.0.84 to 4.8.0
Launching Web UI with arguments:
Total VRAM 4096 MB, total RAM 16264 MB
Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --always-normal-vram
Set vram state to: LOW_VRAM
Device: cuda:0 NVIDIA T400 4GB : native
VAE dtype: torch.float32
Using pytorch cross attention
ControlNet preprocessor location: E:\Stable-Diffusion-Webui_Forge\webui\models\ControlNetPreprocessor
hand_yolov8n.pt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.24M/6.24M [00:05<00:00, 1.10MB/s]
person_yolov8n-seg.pt: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████| 6.78M/6.78M [00:08<00:00, 819kB/s]
face_yolov8n.pt: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6.23M/6.23M [00:08<00:00, 715kB/s]
person_yolov8s-seg.pt: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 23.9M/23.9M [00:17<00:00, 1.38MB/s]
face_yolov8s.pt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 22.5M/22.5M [00:22<00:00, 1.01MB/s]
yolov8x-worldv2.pt: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████| 146M/146M [00:54<00:00, 2.67MB/s]
[-] ADetailer initialized. version: 24.6.0, num models: 10
CivitAI Browser+: Aria2 RPC started                                                                                                | 10.5M/146M [00:16<03:32, 638kB/s]
Loading weights [7c819b6d13] from E:\Stable-Diffusion-Webui_Forge\webui\models\Stable-diffusion\majicmixRealistic_v7.safetensors  | 21.0M/146M [00:21<01:55, 1.09MB/s]
2024-07-14 12:51:12,754 - ControlNet - INFO - ControlNet UI callback registered.███████████████████████████████████████████████████| 146M/146M [00:54<00:00, 3.69MB/s]
model_type EPS
UNet ADM Dimension 0
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
IIB Database file has been successfully backed up to the backup folder.
Startup time: 78.8s (prepare environment: 10.7s, import torch: 5.0s, import gradio: 1.2s, setup paths: 1.1s, initialize shared: 0.2s, other imports: 0.9s, load scripts: 58.3s, create ui: 1.1s, gradio launch: 0.3s).
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
To load target model SD1ClipModel
Begin to load 1 model
Model loaded in 5.1s (forge load real models: 2.9s, calculate empty prompt: 2.1s).
activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x000002EA66144EB0>, <modules.extra_networks.ExtraNetworkParams object at 0x000002EA660EAF20>, <modules.extra_networks.ExtraNetworkParams object at 0x000002EA660EA170>]: AttributeError
Traceback (most recent call last):
  File "E:\Stable-Diffusion-Webui_Forge\webui\modules\extra_networks.py", line 135, in activate
    extra_network.activate(p, extra_network_args)
  File "E:\Stable-Diffusion-Webui_Forge\webui\extensions-builtin\Lora\extra_networks_lora.py", line 43, in activate
    networks.load_networks(names, te_multipliers, unet_multipliers, dyn_dims)
  File "E:\Stable-Diffusion-Webui_Forge\webui\extensions-builtin\Lora\networks.py", line 51, in load_networks
    compiled_lora_targets.append([a.filename, b, c])
AttributeError: 'NoneType' object has no attribute 'filename'

To load target model BaseModel
Begin to load 1 model
Moving model(s) has taken 0.52 seconds
 43%|███████████████████████████████████████████████████████▉                                                                         | 13/30 [03:15<04:13, 14.93s/it]E:\Stable-Diffusion-Webui_Forge\webui\modules\sd_samplers_common.py:66: RuntimeWarning: invalid value encountered in cast              | 13/30 [02:51<04:26, 15.70s/it]
  x_sample = x_sample.astype(np.uint8)
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:28<00:00, 14.94s/it]
To load target model AutoencoderKL████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [06:59<00:00, 14.83s/it]
Begin to load 1 model
Moving model(s) has taken 1.06 seconds
E:\Stable-Diffusion-Webui_Forge\webui\modules\processing.py:965: RuntimeWarning: invalid value encountered in cast
  x_sample = x_sample.astype(np.uint8)

0: 640x448 (no detections), 153.0ms
Speed: 119.0ms preprocess, 153.0ms inference, 280.0ms postprocess per image at shape (1, 3, 640, 448)
[-] ADetailer: nothing detected on image 1 with 1st settings.
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:19<00:00, 14.64s/it]
Loading weights [15012c538f] from E:\Stable-Diffusion-Webui_Forge\webui\models\Stable-diffusion\realisticVisionV51_v51VAE.safetensors█| 30/30 [07:19<00:00, 14.83s/it]
model_type EPS
UNet ADM Dimension 0
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra {'cond_stage_model.clip_l.logit_scale', 'cond_stage_model.clip_l.text_projection'}
To load target model SD1ClipModel
Begin to load 1 model
Model loaded in 9.8s (unload existing model: 0.4s, forge load real models: 8.8s, calculate empty prompt: 0.5s).
activating extra network lora with arguments [<modules.extra_networks.ExtraNetworkParams object at 0x000002EA68170F70>, <modules.extra_networks.ExtraNetworkParams object at 0x000002EA68171090>, <modules.extra_networks.ExtraNetworkParams object at 0x000002EA68170F10>]: AttributeError
Traceback (most recent call last):
  File "E:\Stable-Diffusion-Webui_Forge\webui\modules\extra_networks.py", line 135, in activate
    extra_network.activate(p, extra_network_args)
  File "E:\Stable-Diffusion-Webui_Forge\webui\extensions-builtin\Lora\extra_networks_lora.py", line 43, in activate
    networks.load_networks(names, te_multipliers, unet_multipliers, dyn_dims)
  File "E:\Stable-Diffusion-Webui_Forge\webui\extensions-builtin\Lora\networks.py", line 51, in load_networks
    compiled_lora_targets.append([a.filename, b, c])
AttributeError: 'NoneType' object has no attribute 'filename'

To load target model BaseModel
Begin to load 1 model
Moving model(s) has taken 0.49 seconds
 53%|████████████████████████████████████████████████████████████████████▊                                                            | 16/30 [03:58<03:28, 14.89s/it]
To load target model AutoencoderKL███████████████████████████████████████████████▎                                                    | 16/30 [03:43<03:27, 14.85s/it]
Begin to load 1 model
Moving model(s) has taken 1.03 seconds
Total progress:  53%|████████████████████████████████████████████████████████████▎                                                    | 16/30 [03:58<03:28, 14.90s/it]
To load target model BaseModel███████████████████████████████████████████████████▎                                                    | 16/30 [03:58<03:27, 14.85s/it]
Begin to load 1 model
Moving model(s) has taken 0.66 seconds
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:23<00:00, 14.77s/it]
To load target model AutoencoderKL████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:08<00:00, 14.69s/it]
Begin to load 1 model
Moving model(s) has taken 0.96 seconds

0: 640x448 (no detections), 14.0ms
Speed: 4.0ms preprocess, 14.0ms inference, 1.0ms postprocess per image at shape (1, 3, 640, 448)
[-] ADetailer: nothing detected on image 1 with 1st settings.
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:23<00:00, 14.79s/it]
Total progress: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [07:23<00:00, 14.69s/it]

Additional information

No response

l0stl0rd commented 3 months ago

similar issue on MacOS for me I get this:

stable-diffusion-webui-forge/modules/processing.py:990: RuntimeWarning: invalid value encountered in cast x_sample = x_sample.astype(np.uint8)

About half way into the generation. Have not been able to figure out yet why and I did try different checkpoints or using no VAE.

The end result is that I get a black picture as the generation.

Elura21 commented 1 month ago

Same issue but only with SDXL, sd1.5 works just fine. I have also tried different samplers but its all the same.

JonatasBarros commented 2 weeks ago

For me it happens if I use more than 15 Sampling steps below that it works, as soon as I increase it to 16 it goes black.