Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Guide] InvokeAI: A Stable Diffusion Toolkit - Docker

Featured Replies

>> patchmatch.patch_match: INFO - Compiling and loading c extensions from "/invokeai/.venv/lib/python3.10/site-packages/patchmatch".
[2023-09-04 06:44:45,471]::[InvokeAI]::INFO --> Patchmatch initialized
/invokeai/.venv/lib/python3.10/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
  warnings.warn(

An exception has occurred: /root/invokeai/configs/models.yaml not found
== STARTUP ABORTED ==
** One or more necessary files is missing from your InvokeAI root directory **
** Please rerun the configuration script to fix this problem. **
** From the launcher, selection option [7]. **
** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" **
** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not installing these core models will prevent the loading of some or all .safetensors and .ckpt files. However, you can always come back and install these core models in the future.)
Press any key to continue...k
(InvokeAI) root@vspagy:/invokeai# invokeai-configure --root .
[2023-09-04 06:46:48,835]::[InvokeAI]::INFO --> Initializing InvokeAI runtime directory
[2023-09-04 06:46:48,855]::[InvokeAI]::INFO --> Scanning /invokeai/models for new models
[2023-09-04 06:46:48,891]::[InvokeAI]::INFO --> Scanned 6 files and directories, imported 0 models
[2023-09-04 06:46:48,918]::[InvokeAI]::INFO --> Scanning /invokeai/models for new models
[2023-09-04 06:46:48,952]::[InvokeAI]::INFO --> Scanned 6 files and directories, imported 0 models
Traceback (most recent call last):
  File "/invokeai/.venv/bin/invokeai-configure", line 8, in <module>
    sys.exit(invokeai_configure())
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 917, in main
    init_options, models_to_download = run_console_ui(opt, new_init_file)
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 739, in run_console_ui
    editApp.run()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_                                                                                     no_fork
    return_code = call_function(_SCREEN)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplication.py", line 25, in __remov                                                                                     e_argument_call_main
    return self.main()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplicationManaged.py", line 172, in                                                                                      main
    self._THISFORM.edit()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/fm_form_edit_loop.py", line 47, in edit
    self.edit_loop()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/fm_form_edit_loop.py", line 38, in edit_l                                                                                     oop
    self._widgets__[self.editw].edit()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 458, in edit
    self._edit_loop()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 474, in _edit_loop
    self.get_and_use_key_press()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 610, in get_and_use_ke                                                                                     y_press
    self.handle_input(ch)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 71, in handle_input
    self.handlers[_input](_input)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgbutton.py", line 97, in h_toggle
    self.when_pressed_function()
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 561, in on_ok
    options = self.marshall_arguments()
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 597, in marshall_arguments
    setattr(new_opts, attr, getattr(self, attr).value)
AttributeError: 'editOptsForm' object has no attribute 'vram'. Did you mean: 'ram'?

 

 

 

 

Please help me solve this error in my invoke ai

 

 

  • Replies 142
  • Views 88.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

Posted Images

  • Author
1 hour ago, four-day-disloyalty7410 said:

>> patchmatch.patch_match: INFO - Compiling and loading c extensions from "/invokeai/.venv/lib/python3.10/site-packages/patchmatch".
[2023-09-04 06:44:45,471]::[InvokeAI]::INFO --> Patchmatch initialized
/invokeai/.venv/lib/python3.10/site-packages/torchvision/transforms/functional_tensor.py:5: UserWarning: The torchvision.transforms.functional_tensor module is deprecated in 0.15 and will be **removed in 0.17**. Please don't rely on it. You probably just need to use APIs in torchvision.transforms.functional or in torchvision.transforms.v2.functional.
  warnings.warn(

An exception has occurred: /root/invokeai/configs/models.yaml not found
== STARTUP ABORTED ==
** One or more necessary files is missing from your InvokeAI root directory **
** Please rerun the configuration script to fix this problem. **
** From the launcher, selection option [7]. **
** From the command line, activate the virtual environment and run "invokeai-configure --yes --skip-sd-weights" **
** (To skip this check completely, add "--ignore_missing_core_models" to your CLI args. Not installing these core models will prevent the loading of some or all .safetensors and .ckpt files. However, you can always come back and install these core models in the future.)
Press any key to continue...k
(InvokeAI) root@vspagy:/invokeai# invokeai-configure --root .
[2023-09-04 06:46:48,835]::[InvokeAI]::INFO --> Initializing InvokeAI runtime directory
[2023-09-04 06:46:48,855]::[InvokeAI]::INFO --> Scanning /invokeai/models for new models
[2023-09-04 06:46:48,891]::[InvokeAI]::INFO --> Scanned 6 files and directories, imported 0 models
[2023-09-04 06:46:48,918]::[InvokeAI]::INFO --> Scanning /invokeai/models for new models
[2023-09-04 06:46:48,952]::[InvokeAI]::INFO --> Scanned 6 files and directories, imported 0 models
Traceback (most recent call last):
  File "/invokeai/.venv/bin/invokeai-configure", line 8, in <module>
    sys.exit(invokeai_configure())
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 917, in main
    init_options, models_to_download = run_console_ui(opt, new_init_file)
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 739, in run_console_ui
    editApp.run()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplication.py", line 30, in run
    return npyssafewrapper.wrapper(self.__remove_argument_call_main)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/npyssafewrapper.py", line 41, in wrapper
    wrapper_no_fork(call_function)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/npyssafewrapper.py", line 97, in wrapper_                                                                                     no_fork
    return_code = call_function(_SCREEN)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplication.py", line 25, in __remov                                                                                     e_argument_call_main
    return self.main()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/apNPSApplicationManaged.py", line 172, in                                                                                      main
    self._THISFORM.edit()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/fm_form_edit_loop.py", line 47, in edit
    self.edit_loop()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/fm_form_edit_loop.py", line 38, in edit_l                                                                                     oop
    self._widgets__[self.editw].edit()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 458, in edit
    self._edit_loop()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 474, in _edit_loop
    self.get_and_use_key_press()
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 610, in get_and_use_ke                                                                                     y_press
    self.handle_input(ch)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgwidget.py", line 71, in handle_input
    self.handlers[_input](_input)
  File "/invokeai/.venv/lib/python3.10/site-packages/npyscreen/wgbutton.py", line 97, in h_toggle
    self.when_pressed_function()
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 561, in on_ok
    options = self.marshall_arguments()
  File "/invokeai/.venv/lib/python3.10/site-packages/invokeai/backend/install/invokeai_configure.py", li                                                                                     ne 597, in marshall_arguments
    setattr(new_opts, attr, getattr(self, attr).value)
AttributeError: 'editOptsForm' object has no attribute 'vram'. Did you mean: 'ram'?

 

 

 

 

Please help me solve this error in my invoke ai

 

 

what docker image are you using? as models config should be here /home/invokeuser/userfiles/configs/models.yaml not where it is looking for it in /root/invokeai/configs/models.yaml with my docker image in first post

  • 3 weeks later...

Btw, just to let you and others know, there is an issue/typo in your xml file. In the line were you specify the port, there is a missing > right before the actual port number

 

Edit: I mean the second xml, not the first one, that one is correct for no specific reason. The second one is missing the >

Edited by Joly0

Btw, just another thing, afaik invokeai supports rocm. Is it possible to get this working in this image aswell?

  • Author
1 minute ago, Joly0 said:

Btw, just another thing, afaik invokeai supports rocm. Is it possible to get this working in this image aswell?

Yes but not easily, but my issue is I dont have a amd card to test it on

Ok, i could help with testing. If you tell me what to do, i can try that

  • Author

Updated to Support the change from yarn classic to pnpm

  • Author

Updated onnxruntime and xformers

Edited by mickr777

  • 3 weeks later...

Hi, excellent tool. I am using everyday!

 

I am actually doing something very similar with LLM Vicuna. I did the same thing, in this case using the Linuxserver ubuntu base image/their S6 overlay and oobabooga/text-generation-webui. The main problem I faced, is that I was not able to any create folders (either during runtime or docker image build) inside /config and install miniconda and ai tools inside them. I have a suspicion that it is a permission issue. I chmod them to abc:abc and still no luck.

 

I asked in LSIO Discord and couldn't get the answer. I was wondering how did you guys managed to install everything in config. I really like the idea of not re-installing every time I change something inside the container and re-download all models from Huggingface. I am new on shell scripting, and I am still struggling with this project's code in github .

 

Any help would be greatly appreciated. And once I have it ready, I will publish the docker version of text-generation-webui in Unraid.

 

This is the project: https://github.com/killerkaos/vicuna

Docker hub project: https://hub.docker.com/repository/docker/chencichen/vicuna/general

 

PD: the latest tag will install everything inside root, it works, scripts all works, but not inside config folder =(

Thank you again

 

Chen

  • Author
10 hours ago, chenci said:

Hi, excellent tool. I am using everyday!

 

I am actually doing something very similar with LLM Vicuna. I did the same thing, in this case using the Linuxserver ubuntu base image/their S6 overlay and oobabooga/text-generation-webui. The main problem I faced, is that I was not able to any create folders (either during runtime or docker image build) inside /config and install miniconda and ai tools inside them. I have a suspicion that it is a permission issue. I chmod them to abc:abc and still no luck.

 

I asked in LSIO Discord and couldn't get the answer. I was wondering how did you guys managed to install everything in config. I really like the idea of not re-installing every time I change something inside the container and re-download all models from Huggingface. I am new on shell scripting, and I am still struggling with this project's code in github .

 

Any help would be greatly appreciated. And once I have it ready, I will publish the docker version of text-generation-webui in Unraid.

 

This is the project: https://github.com/killerkaos/vicuna

Docker hub project: https://hub.docker.com/repository/docker/chencichen/vicuna/general

 

PD: the latest tag will install everything inside root, it works, scripts all works, but not inside config folder =(

Thank you again

 

Chen

I ended up having to have anything that I wanted in to the folders in appdata to be installed or ran in the start.sh script, if you want more info on that you can see all that in the main post under full manual install (I left comments in start.sh code to show what each section of it does), so in realty the docker image just has all the basic prerequisites to get the main install done with the start.sh.

 

this was my first ever docker, so i just winged it and hoped for the best and it worked for unraid 😁

Edited by mickr777

It is also my first ever docker image created.

You can see my .sh script is so barebone and so crappy. It works, but I was not able to create the folder inside appdata. I am not sure why. Got to look closer your script. I did borrow a lot of concepts from yours, hope you don't mind 😄

  • Author
1 hour ago, chenci said:

It is also my first ever docker image created.

You can see my .sh script is so barebone and so crappy. It works, but I was not able to create the folder inside appdata. I am not sure why. Got to look closer your script. I did borrow a lot of concepts from yours, hope you don't mind 😄

The empty folders should be made by the xml for them to be in the appdata eg mine is my-invokeai.xml (bit like an external symbolic link), then the script can use them like any other folder, but the data doesnt get wiped on docker image changes

Hello,

 

I'm getting the following error. I copied the xml from the first post. Maybe the issue is with the //, but I don't know how to fix it.

The invokeai folder in unraid has some folders but inside the folders, there are no files.

 

Thanks!

Requirement already satisfied: nvidia-nvjitlink-cu12 in /home/invokeuser/.local/lib/python3.10/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.1.1->xformers==0.0.23) (12.4.99)
Requirement already satisfied: MarkupSafe>=2.0 in /home/invokeuser/.local/lib/python3.10/site-packages (from jinja2->torch==2.1.1->xformers==0.0.23) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in /home/invokeuser/.local/lib/python3.10/site-packages (from sympy->torch==2.1.1->xformers==0.0.23) (1.3.0)
Checking if The Git Repo Has Changed....
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Local Files Are Up to Date
stat: cannot statx '/home/invokeuser//InvokeAI/pyproject.toml': No such file or directory
stat: cannot statx '/home/invokeuser//userfiles/models/core/convert/bert-base-uncased/tokenizer.json': No such file or directory
Loading InvokeAI WebUI.....
start.sh: line 106: cd: /home/invokeuser//InvokeAI/invokeai/frontend/web/: No such file or directory
 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /home/invokeuser/InvokeAI
start.sh: line 108: python: command not found

 

  • Author
28 minutes ago, luisalrp said:

Hello,

 

I'm getting the following error. I copied the xml from the first post. Maybe the issue is with the //, but I don't know how to fix it.

The invokeai folder in unraid has some folders but inside the folders, there are no files.

 

Thanks!

Requirement already satisfied: nvidia-nvjitlink-cu12 in /home/invokeuser/.local/lib/python3.10/site-packages (from nvidia-cusolver-cu12==11.4.5.107->torch==2.1.1->xformers==0.0.23) (12.4.99)
Requirement already satisfied: MarkupSafe>=2.0 in /home/invokeuser/.local/lib/python3.10/site-packages (from jinja2->torch==2.1.1->xformers==0.0.23) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in /home/invokeuser/.local/lib/python3.10/site-packages (from sympy->torch==2.1.1->xformers==0.0.23) (1.3.0)
Checking if The Git Repo Has Changed....
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /home/invokeuser)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Local Files Are Up to Date
stat: cannot statx '/home/invokeuser//InvokeAI/pyproject.toml': No such file or directory
stat: cannot statx '/home/invokeuser//userfiles/models/core/convert/bert-base-uncased/tokenizer.json': No such file or directory
Loading InvokeAI WebUI.....
start.sh: line 106: cd: /home/invokeuser//InvokeAI/invokeai/frontend/web/: No such file or directory
 ERR_PNPM_NO_PKG_MANIFEST  No package.json found in /home/invokeuser/InvokeAI
start.sh: line 108: python: command not found

 

Just did a fresh install and i couldnt get it to give that error, I repushed docker image to docker hub see if that helps

Thanks! It worked!

  • 3 weeks later...

Has this docker been removed? Can't find it anymore.

  • Author
2 hours ago, GnaXi said:

Has this docker been removed? Can't find it anymore.

Still active, the github repo got changed a while back, you can update that in you xml file (its not in the community apps if that where you were looking), all info in first post should be still up to date

 

Edited by mickr777

  • 1 month later...

I'm trying to start the docker container, but it stops after a couple of seconds.
In the logs I can see the following error:

Quote

 

[2024-05-28 16:30:36,218]::[uvicorn.error]::ERROR --> Traceback (most recent call last):
  File "/home/invokeuser/venv/lib/python3.10/site-packages/starlette/routing.py", line 734, in lifespan
    async with self.lifespan_context(app) as maybe_state:
  File "/usr/lib/python3.10/contextlib.py", line 199, in __aenter__
    return await anext(self.gen)
  File "/home/invokeuser/InvokeAI/invokeai/app/api_app.py", line 74, in lifespan
    ApiDependencies.initialize(config=app_config, event_handler_id=event_handler_id, logger=logger)
  File "/home/invokeuser/InvokeAI/invokeai/app/api/dependencies.py", line 137, in initialize
    ApiDependencies.invoker = Invoker(services)
  File "/home/invokeuser/InvokeAI/invokeai/app/services/invoker.py", line 14, in __init__
    self._start()
  File "/home/invokeuser/InvokeAI/invokeai/app/services/invoker.py", line 31, in _start
    self.__start_service(getattr(self.services, service))
  File "/home/invokeuser/InvokeAI/invokeai/app/services/invoker.py", line 20, in __start_service
    start_op(self)
  File "/home/invokeuser/InvokeAI/invokeai/app/services/model_manager/model_manager_default.py", line 58, in start
    service.start(invoker)
  File "/home/invokeuser/InvokeAI/invokeai/app/services/model_install/model_install_default.py", line 122, in start
    self._migrate_yaml()
  File "/home/invokeuser/InvokeAI/invokeai/app/services/model_install/model_install_default.py", line 323, in _migrate_yaml
    yaml_metadata = legacy_models_yaml.pop("__metadata__")
KeyError: '__metadata__'

[2024-05-28 16:30:36,218]::[uvicorn.error]::ERROR --> Application startup failed. Exiting.

 

 

  • Author
10 hours ago, GnaXi said:

I'm trying to start the docker container, but it stops after a couple of seconds.
In the logs I can see the following error:

 

Trying to replicate this error, is this a fresh install? or after an update to to and install?

Edited by mickr777

5 hours ago, mickr777 said:

Trying to replicate this error, is this a fresh install? or after an update to to and install?

I tried updating an existing docker, but it gave me another error.
So I decided to run a fresh install, which gave me the above.

Is the hugging face access token no longer required?
It doesn't seem to be part of the config, as it was previously.

  • Author
1 hour ago, GnaXi said:

Is the hugging face access token no longer required?
It doesn't seem to be part of the config, as it was previously.

should still be able to add as a variable HUGGING_FACE_HUB_TOKEN

  • Author
1 hour ago, GnaXi said:

I tried updating an existing docker, but it gave me another error.
So I decided to run a fresh install, which gave me the above.

double check all folders under the invokeai appdata folder are set to owner "nobody"

1 hour ago, mickr777 said:

double check all folders under the invokeai appdata folder are set to owner "nobody"

They are all set to nobody:

image.png.eba148e901dcbc6d5cd319a6013519b7.png

  • Author
9 minutes ago, GnaXi said:

They are all set to nobody:

image.png.eba148e901dcbc6d5cd319a6013519b7.png

Ok, try replacing the invokeai.yaml under userfiles with this file

invokeai.yaml

Edited by mickr777

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.