[Guide] InvokeAI: A Stable Diffusion Toolkit - Docker


Recommended Posts

>> 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

 

 

Link to comment
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

Link to comment
  • 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
  • Like 1
Link to comment
  • 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

Link to comment
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
  • Like 1
Link to comment

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 😄

  • Like 1
Link to comment
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

Link to comment

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

 

Link to comment
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

  • Upvote 1
Link to comment
  • 3 weeks later...
Posted (edited)
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
Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.