Coder Social home page Coder Social logo

v0xie / sd-webui-agentattention Goto Github PK

View Code? Open in Web Editor NEW
39.0 39.0 3.0 13.86 MB

Speed up image generation and improve image quality using Agent Attention.

License: GNU General Public License v3.0

Python 100.00%
extension stable-diffusion-webui stable-diffusion-webui-plugin

sd-webui-agentattention's People

Contributors

v0xie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

johndpope rgx650

sd-webui-agentattention's Issues

Extremely slow after first generation

I generated an image using Apply to Hires. Fix Only option and at first the speed was fine, but after the first pass the generation became very slow, from around 9 seconds to a minute and 20 seconds. Tried unloading and reloading the model, changing the model, but it still remained at that speed.

SDNEXT: Hypertile error / TypeError: xformers_attention_forward() got an unexpected keyword argument 'agent'

7:12:36-721823 ERROR Hypertile error: width=512 height=768 xformers_attention_forward() got an unexpected keyword
argument 'agent'
07:12:36-726157 ERROR Exception: xformers_attention_forward() got an unexpected keyword argument 'agent'
...
07:12:36-756215 ERROR gradio call: TypeError
╭────────────────────────────── Traceback (most recent call last) ─────────────────────────────╮
│ C:\AI\SDNEXT\automatic\modules\sd_hijack_hypertile.py:112 in wrapper
││
││ 111 │ │ │ │ │ │ x = rearrange(x, "b (nh h nw w) c -> (b nh nw) (h w) c", h=h //
││ ❱ 112 │ │ │ │ │ out = forward(x, *args[1:], **kwargs)
││ 113 │ │ │ │ │ if do_split: │╰───────────────────────────────────────────────────────────────────────────────╯
TypeError: xformers_attention_forward() got an unexpected keyword argument 'agent'

During handling of the above exception, another exception occurred:

╭───────────────────────────── Traceback (most recent call last) ──────────────────────────────╮
│ C:\AI\SDNEXT\automatic\modules\call_queue.py:31 in f
││
││ 30 │ │ │ try:
││ ❱ 31 │ │ │ │ res = func(*args, **kwargs)
││ 32 │ │ │ │ progress.record_results(id_task, res)
││
││ C:\AI\SDNEXT\automatic\modules\txt2img.py:88 in txt2img
││
││ 87 │ if processed is None:
││ ❱ 88 │ │ processed = processing.process_images(p)
││ 89 │ p.close()
││
││ C:\AI\SDNEXT\automatic\modules\processing.py:760 in process_images
││
││ 759 │ │ │ with context_hypertile_vae(p), context_hypertile_unet(p):
││ ❱ 760 │ │ │ │ res = process_images_inner(p)
││ 761
││
││ C:\AI\SDNEXT\automatic\extensions-builtin\sd-webui-controlnet\scripts\batch_hijack.py:42 in
││ processing_process_images_hijack
││
││ 41 │ │ │ # we are not in batch mode, fallback to original function
││ ❱ 42 │ │ │ return getattr(processing, '__controlnet_original_process_images_inner')(p,
││ 43
││
││ C:\AI\SDNEXT\automatic\modules\processing.py:900 in process_images_inner
││
││ 899 │ │ │ │ with devices.without_autocast() if devices.unet_needs_upcast else device
││ ❱ 900 │ │ │ │ │ samples_ddim = p.sample(conditioning=c, unconditional_conditioning=u
││ 901 │ │ │ │ x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(
││
││ ... 36 frames hidden ...
││
││ C:\AI\SDNEXT\automatic\venv\lib\site-packages\torch\utils\checkpoint.py:230 in forward
││
││ 229 │ │ with torch.no_grad():
││ ❱ 230 │ │ │ outputs = run_function(*args)
││ 231 │ │ return outputs
││
││ C:\AI\SDNEXT\automatic\extensions\sd-webui-agentattention-SDNEXT\agentsd\patch.py:78 in _forward
││
││ 77 │ │ │ feature, agent = m_a(y)
││ ❱ 78 │ │ │ x = u_a(self.attn1(feature, agent=agent, context=context if self.disable_sel
││ 79 │ │ │ y = self.norm2(x)
││
││ C:\AI\SDNEXT\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1518 in _wrapped_call_impl
││
││ 1517 │ │ else:
││ ❱ 1518 │ │ │ return self._call_impl(*args, **kwargs)
││ 1519
││
││ C:\AI\SDNEXT\automatic\venv\lib\site-packages\torch\nn\modules\module.py:1527 in _call_impl
││
││ 1526 │ │ │ │ or _global_forward_hooks or _global_forward_pre_hooks):
││ ❱ 1527 │ │ │ return forward_call(*args, **kwargs)
││ 1528
││
││ C:\AI\SDNEXT\automatic\modules\sd_hijack_hypertile.py:120 in wrapper
││
││ 119 │ │ │ │ │ │ log.error(f'Hypertile error: width={width} height={height} {e}')
││ ❱ 120 │ │ │ │ │ out = forward(x, *args[1:], **kwargs)
││ 121 │ │ │ return out │╰──────────────────────────────────────────────────────────────────────────────╯
TypeError: xformers_attention_forward() got an unexpected keyword argument 'agent'

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.