lllyasviel / sd-forge-layerdiffuse

[WIP] Layer Diffusion for WebUI (via Forge)
Apache License 2.0
3.9k stars 334 forks source link

Can't generate transparent image and get some errors #129

Closed chen079 closed 2 months ago

chen079 commented 2 months ago

Error running postprocess_image_after_composite: F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\scripts\forge_layerdiffusion.py Traceback (most recent call last): File "F:\AIDraw\stable-diffusion-webui-forge\modules\scripts.py", line 956, in postprocess_image_after_composite script.postprocess_image_after_composite(p, pp, script_args) File "F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\scripts\forge_layerdiffusion.py", line 375, in postprocess_image_after_composite png, vis = vae_transparent_decoder.decode(latent, pixel) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, *kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\lib_layerdiffusion\models.py", line 278, in decode y = self.estimate_augmented(pixel, latent) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\lib_layerdiffusion\models.py", line 259, in estimate_augmented eps = self.estimate_single_pass(feed_pixel, feed_latent).clip(0, 1) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\lib_layerdiffusion\models.py", line 237, in estimate_single_pass y = self.model.model(pixel, latent) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\extensions\sd-forge-layerdiffuse\lib_layerdiffusion\models.py", line 176, in forward sample = upsample_block(sample, res_samples, emb) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl return self._call_impl(*args, *kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl return forward_call(args, **kwargs) File "F:\AIDraw\stable-diffusion-webui-forge\venv\lib\site-packages\diffusers\models\unets\unet_2d_blocks.py", line 2376, in forward hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 24 but got size 23 for tensor number 1 in the list.


WilDKG commented 2 months ago

What is the solution to the problem?