Skip to content

[bug]: ImportError: cannot import name 'merge_diffusion_models' [Main] #2872

@mickr777

Description

@mickr777

Is there an existing issue for this?

  • I have searched the existing issues

OS

Linux

GPU

cuda

VRAM

12GB

What happened?

You are probably aware, but main branch is giving error on webui startup

╭───────────────────── Traceback (most recent call last) ──────────────────────╮
│ /home/invokeuser/venv/bin/invokeai:8 in <module>                             │
│                                                                              │
│   5 from invokeai.frontend.CLI import invokeai_command_line_interface        │
│   6 if __name__ == '__main__':                                               │
│   7 │   sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])     │
│ ❱ 8 │   sys.exit(invokeai_command_line_interface())                          │
│   9                                                                          │
│                                                                              │
│ /home/invokeuser/InvokeAI/invokeai/frontend/CLI/CLI.py:170 in main           │
│                                                                              │
│    167 │                                                                     │
│    168 │   # web server loops forever                                        │
│    169 │   if opt.web or opt.gui:                                            │
│ ❱  170 │   │   invoke_ai_web_server_loop(gen, gfpgan, codeformer, esrgan)    │
│    171 │   │   sys.exit(0)                                                   │
│    172 │                                                                     │
│    173 │   if not infile:                                                    │
│                                                                              │
│ /home/invokeuser/InvokeAI/invokeai/frontend/CLI/CLI.py:1027 in               │
│ invoke_ai_web_server_loop                                                    │
│                                                                              │
│   1024                                                                       │
│   1025 def invoke_ai_web_server_loop(gen: Generate, gfpgan, codeformer, esrg │
│   1026 │   print("\n* --web was specified, starting web server...")          │
│ ❱ 1027 │   from invokeai.backend.web import InvokeAIWebServer                │
│   1028 │                                                                     │
│   1029 │   # Change working directory to the stable-diffusion directory      │
│   1030 │   os.chdir(os.path.abspath(os.path.join(os.path.dirname(__file__),  │
│                                                                              │
│ /home/invokeuser/InvokeAI/invokeai/backend/web/__init__.py:4 in <module>     │
│                                                                              │
│   1 """                                                                      │
│   2 Initialization file for the web backend.                                 │
│   3 """                                                                      │
│ ❱ 4 from .invoke_ai_web_server import InvokeAIWebServer                      │
│   5                                                                          │
│                                                                              │
│ /home/invokeuser/InvokeAI/invokeai/backend/web/invoke_ai_web_server.py:29 in │
│ <module>                                                                     │
│                                                                              │
│     26 from ..generator import infill_methods                                │
│     27 from ..globals import Globals, global_converted_ckpts_dir, global_mod │
│     28 from ..image_util import PngWriter, retrieve_metadata                 │
│ ❱   29 from ..model_management import merge_diffusion_models                 │
│     30 from ..prompting import (                                             │
│     31 │   get_prompt_structure,                                             │
│     32 │   get_tokenizer,                                                    │
╰──────────────────────────────────────────────────────────────────────────────╯
ImportError: cannot import name 'merge_diffusion_models' from 
'invokeai.backend.model_management' 
(/home/invokeuser/InvokeAI/invokeai/backend/model_management/__init__.py)

Screenshots

No response

Additional context

No response

Contact Details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions