Code Monkey home page Code Monkey logo

Comments (4)

SAC020 avatar SAC020 commented on July 3, 2024 1

I don't know if same issue, but same error, with hidiffusers.

Running hidiffusion in an xyz script renders a couple of images, then breaks. Reloading the ckpt enables the same number of images be generated before breaking again.

Running same prompt and parameters without hidiffusers yields no errors.

PS C:\ai\automatic> .\webui.bat --medvram --debug
Using VENV: C:\ai\automatic\venv
17:43:37-160033 INFO     Starting SD.Next
17:43:37-163505 INFO     Logger: file="C:\ai\automatic\sdnext.log" level=DEBUG size=65 mode=create
17:43:37-164994 INFO     Python 3.10.11 on Windows
17:43:37-347574 INFO     Version: app=sd.next updated=2024-05-18 hash=ef736488 branch=dev
                         url=https://github.com/vladmandic/automatic/tree/dev
17:43:37-938624 INFO     Latest published version: e081f232d2648d79659b9a53070cecb544b85b3d 2024-05-07T19:11:45Z
17:43:37-953007 INFO     Platform: arch=AMD64 cpu=Intel64 Family 6 Model 165 Stepping 5, GenuineIntel system=Windows
                         release=Windows-10-10.0.22631-SP0 python=3.10.11
17:51:46-784318 ERROR    Processing: RuntimeError
╭───────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────╮
│ C:\ai\automatic\modules\processing_diffusers.py:118 in process_diffusers                                             │
│                                                                                                                      │
│   117 │   │   #    base_args['image'] = set_latents(p)                                                               │
│ ❱ 118 │   │   output = shared.sd_model(**base_args) # pylint: disable=not-callable                                   │
│   119 │   │   if isinstance(output, dict):                                                                           │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\torch\utils\_contextlib.py:115 in decorate_context                            │
│                                                                                                                      │
│   114 │   │   with ctx_factory():                                                                                    │
│ ❱ 115 │   │   │   return func(*args, **kwargs)                                                                       │
│   116                                                                                                                │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\diffusers\pipelines\stable_diffusion_xl\pipeline_stable_diffusion_xl.py:1174  │
│                                                                                                                      │
│   1173 │   │   │   │   │   added_cond_kwargs["image_embeds"] = image_embeds                                          │
│ ❱ 1174 │   │   │   │   noise_pred = self.unet(                                                                       │
│   1175 │   │   │   │   │   latent_model_input,                                                                       │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1511 in _wrapped_call_impl                         │
│                                                                                                                      │
│   1510 │   │   else:                                                                                                 │
│ ❱ 1511 │   │   │   return self._call_impl(*args, **kwargs)                                                           │
│   1512                                                                                                               │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1561 in _call_impl                                 │
│                                                                                                                      │
│   1560 │   │   │                                                                                                     │
│ ❱ 1561 │   │   │   result = forward_call(*args, **kwargs)                                                            │
│   1562 │   │   │   if _global_forward_hooks or self._forward_hooks:                                                  │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\accelerate\hooks.py:166 in new_forward                                        │
│                                                                                                                      │
│   165 │   │   else:                                                                                                  │
│ ❱ 166 │   │   │   output = module._old_forward(*args, **kwargs)                                                      │
│   167 │   │   return module._hf_hook.post_forward(module, output)                                                    │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\diffusers\models\unets\unet_2d_condition.py:1281 in forward                   │
│                                                                                                                      │
│   1280 │   │   │   if hasattr(upsample_block, "has_cross_attention") and upsample_block.has_cross_attention:         │
│ ❱ 1281 │   │   │   │   sample = upsample_block(                                                                      │
│   1282 │   │   │   │   │   hidden_states=sample,                                                                     │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1511 in _wrapped_call_impl                         │
│                                                                                                                      │
│   1510 │   │   else:                                                                                                 │
│ ❱ 1511 │   │   │   return self._call_impl(*args, **kwargs)                                                           │
│   1512                                                                                                               │
│                                                                                                                      │
│ C:\ai\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1520 in _call_impl                                 │
│                                                                                                                      │
│   1519 │   │   │   │   or _global_forward_hooks or _global_forward_pre_hooks):                                       │
│ ❱ 1520 │   │   │   return forward_call(*args, **kwargs)                                                              │
│   1521                                                                                                               │
│                                                                                                                      │
│ C:\ai\automatic\modules\hidiffusion\hidiffusion.py:1682 in forward                                                   │
│                                                                                                                      │
│   1681 │   │   │   │                                                                                                 │
│ ❱ 1682 │   │   │   │   hidden_states = torch.cat([hidden_states, res_hidden_states], dim=1)                          │
│   1683                                                                                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 128 but got size 64 for tensor number 1 in the list.

from automatic.

vladmandic avatar vladmandic commented on July 3, 2024 1

fixed.
hidiffusion had "unapply" function, but it was not unapplying all modifications that hidiffusion did, so each time it was going deeper and deeper into its own hole.

from automatic.

solsol360 avatar solsol360 commented on July 3, 2024

It might be related. You don't even need xyz script. Just running three separate generations will give the error on the third one. I've reported this in discord yesterday. No comments there yet, so it's good to have that issue also here.

from automatic.

SAC020 avatar SAC020 commented on July 3, 2024

fixed. hidiffusion had "unapply" function, but it was not unapplying all modifications that hidiffusion did, so each time it was going deeper and deeper into its own hole.

I confirm, it is fixed for me. Thank you!

from automatic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.