[bug]: validation error for InvokeAIAppConfig
Is there an existing issue for this?
- [X] I have searched the existing issues
OS
Windows
GPU
cuda
VRAM
8GB
What version did you experience this issue on?
3.0.1 Hotfix 3
What happened?
I am an existing windows Invoke-AI user and have performed at least a few updates on the 2.x versions. On my first attempt to upgrade to 3.x, I tried the in place update, which failed (not much of a surprise). After this I renamed my old Invoke-AI folder and decided to install a fresh copy using the 3.0.0 installer and perform the migration using the migration script.
I did attempt to perform a fresh install with 3.0.0, which failed with the same error, after which I waited for a few days, in case this was a common error.
I downloaded the Invoke-AI 3.0.1 Hotfix 3 installer, ran this following the install instructions to a new clean folder. After the install is complete, when the 'Configuring InvokeAI' script runs, it returns the following error:
A matching Triton is not available, some optimizations will not be enabled.
Error caught was: No module named 'triton'
Traceback (most recent call last):
File "d:\InvokeAI\InvokeAI-Installer\lib\main.py", line 51, in <module>
inst.install(**args.__dict__)
File "d:\InvokeAI\InvokeAI-Installer\lib\installer.py", line 191, in install
self.instance.configure()
File "d:\InvokeAI\InvokeAI-Installer\lib\installer.py", line 351, in configure
from invokeai.frontend.install import invokeai_configure
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\frontend\install\__init__.py", line 4, in <module>
from .invokeai_configure import main as invokeai_configure
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\frontend\install\invokeai_configure.py", line 4, in <module>
from ...backend.install.invokeai_configure import main
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\backend\__init__.py", line 4, in <module>
from .generator import InvokeAIGeneratorBasicParams, InvokeAIGenerator, InvokeAIGeneratorOutput, Img2Img, Inpaint
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\backend\generator\__init__.py", line 4, in <module>
from .base import (
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\backend\generator\base.py", line 28, in <module>
import invokeai.backend.util.logging as logger
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\backend\util\__init__.py", line 4, in <module>
from .devices import (
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\backend\util\devices.py", line 13, in <module>
config = InvokeAIAppConfig.get_config()
File "D:\AI-Art\Invoke-AI\.venv\Lib\site-packages\invokeai\app\services\config.py", line 464, in get_config
cls.singleton_config = cls(**kwargs)
File "pydantic\env_settings.py", line 40, in pydantic.env_settings.BaseSettings.__init__
File "pydantic\main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for InvokeAIAppConfig
version
value could not be parsed to a boolean (type=type_error.bool)
Press any key to continue . . .
I have tried multiple clean installs to different locations, but this does not change the issue. I have also tried re-running the configuration script using the option 7 (Re-run the configure script to fix a broken install), which returned the same error. If I attempt to start the browser UI, I get the same error as above.
I am running on Windows 11, with Python 3.10.11
Screenshots
No response
Additional context
No response
Contact Details
No response
Hi, can you please provide your invokeai.yaml file?
3.0.2 also didnt fix this for me. still getting this in red Server Error Validation Error
InvokeAI:
Web Server:
host: 127.0.0.1
port: 9090
allow_origins: []
allow_credentials: true
allow_methods:
- '*'
allow_headers:
- '*'
Features:
esrgan: true
internet_available: true
log_tokenization: false
patchmatch: true
ignore_missing_core_models: false
Memory/Performance:
always_use_cpu: false
free_gpu_mem: false
max_cache_size: 8.5
max_vram_cache_size: 2.25
precision: auto
sequential_guidance: false
xformers_enabled: true
tiled_decode: false
Paths:
autoimport_dir: autoimport
lora_dir: null
embedding_dir: null
controlnet_dir: null
conf_path: configs\models.yaml
models_dir: models
legacy_conf_dir: configs\stable-diffusion
db_dir: databases
outdir: C:\Users\home\invokeai\outputs
use_memory_db: false
Logging:
log_handlers:
- console
log_format: color
log_level: info
Having the same Validation Error as in this image. Worked well before update. My yaml have this settings:
InvokeAI: Web Server: host: 127.0.0.1 port: 9090 allow_origins: [] allow_credentials: true allow_methods: - '' allow_headers: - '' Features: esrgan: true internet_available: true log_tokenization: false patchmatch: true ignore_missing_core_models: false Memory/Performance: always_use_cpu: false free_gpu_mem: false precision: float16 max_cache_size: 12.0 max_vram_cache_size: 0.5 sequential_guidance: false xformers_enabled: true tiled_decode: false Paths: autoimport_dir: autoimport lora_dir: null embedding_dir: null controlnet_dir: null conf_path: configs\models.yaml models_dir: models legacy_conf_dir: configs\stable-diffusion db_dir: databases outdir: D:\Ai Art\InvokeAI\outputs use_memory_db: false Logging: log_handlers: - console log_format: color log_level: info
had same error, solved by changing server port to 9080
Hi, can you please provide your
invokeai.yamlfile?
Sorry for the delayed response, I missed the notification of your reply.
I do not have an invokeai.yaml file in either the old or new folders (or their subfolders). I assume this file is generated by the post install configuration wizard, which is failing to start.
In the new install folder I see these files when it stops:
I retried with 3.0.2 today and got a screenshot of where this message happens, it's directly after the install runs:
@danstis Thanks.
Paging @lstein :
Here's another validation error for InvokeAIAppConfig, this time for version. This is from before the changes you recently made to restore, and still occurs in 3.0.2post1, so I think it's unrelated.
@prashantpatole @gus-uktena
You have different issues entirely from this thread. Please create an issue for your issue. For your issues, invokeai.yaml isn't a problem, you've gotten past that. Be sure you have a model selected before clicking invoke (we have a fix for this in progress).
@psychedelicious
In my troubleshooting on this one I have done a full flush of the pip cache using pip cache purge and performed a new clean install but see the same behaviour.
I also went into that file and commented out the version validation, which allowed me to perform the configuration, but of course then it failed to launch due to the missing version.
I would imagine this is environmental, as others are not seeing this en masse, so if you want me to run anything or provide some other info on my machine config, I am happy to help.
I'm not sure what's going on, sorry :/ the installer and this particular area of the code is @lstein 's domain, hopefully the issue is clear to him
🤦♂️ I figured it out by running a debug session on the .venv\Scripts\configure_invokeai.exe script. In the env_settings.py we check if there are existing environment variables on the machine that match the config properties. On my machine I have a version variable configured for another app that I am working on.
If I clear this environment variable in the session I run the script from, everything works as normal.
So root cause in this case was my machine being polluted with an environment variable that matched the config item name 'version'. If others are seeing this, I imagine that we couldn't have an environment variable on the machine that matches any of the items in the InvokeAIAppConfig class:
- host
- port
- allow_origins
- allow_credentials
- allow_methods
- allow_headers
- esrgan
- internet_available
- log_tokenization
- patchmatch
- always_use_cpu
- free_gpu_mem
- max_cache_size
- max_vram_cache_size
- precision
- sequential_guidance
- xformers_enabled
- tiled_decode
- root
- autoimport_dir
- lora_dir
- embedding_dir
- controlnet_dir
- conf_path
- models_dir
- legacy_conf_dir
- db_dir
- outdir
- from_file
- use_memory_db
- ignore_missing_core_
- log_handlers
- log_format
- log_level
- version
That's very much unexpected - there must be something funky happening because AFAIK we don't store things as environment variables. At least, once installed, we don't do that.
It's not that you are storing anything as an environment variable, more that you can override the configuration with them, useful for running with docker etc.
In my case I had the version variable populated for an unrelated app that I am testing.
Maybe I'm missing something, but the app neither stores nor references any env variables. It shouldn't care if you have an environment variable called version and shouldn't create one either.
That config class is instantiated internally and/or pulls config from the yaml file (if it exists), so it's very strange that an environment variable affects things at all.
I found one more observation.
When I try to use node features, this starts appearing. May be I am chosing incorrect combination of nodes. But as node editor has no delete feature its difficult to trace out root cause.
After few restarts it gets back normal.
On Sun, Aug 13, 2023, 2:32 PM psychedelicious @.***> wrote:
Maybe I'm missing something, but the app neither stores nor references any env variables. It shouldn't care if you have an environment variable called version and shouldn't create one either.
That config class is instantiated internally and pulls from the yaml file if it exists so it's very strange that an environment variable affects things at all.
— Reply to this email directly, view it on GitHub https://github.com/invoke-ai/InvokeAI/issues/4098#issuecomment-1676288341, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUK5ZCURDBGNU2XN2J4OZDXVCJZRANCNFSM6AAAAAA267VNQA . You are receiving this because you were mentioned.Message ID: @.***>
had same error, solved by changing server port to 9080
Editing the invokeai.yaml file and changing the port to 9080 also worked for me. The error is gone. Thanks for the tip, @KornienkoDev!
Same here, server validation error fixed with changing port to 9080.
The error is caused by a problem in the web UI settings. The reason it works when you change the port is because Invoke goes back to the default settings. I changed the port to 9080 and it worked but I had to re-enter all of my settings for the UI. I changed back to the 9090 port, did a 'reset web ui', refreshed, entered my settings, and it works fine.
@prashantpatole @matt000000 @panicsteve @KennethLj
Your problems are not the same problem as described in this issue.
A validation error means the graph that is created is not valid. That can be for many reasons. It shouldn't happen on the Linear UI. I suspect the issue is that you do not have a model selected.
As @Aenon1 noted, changing the port merely gives your UI a fresh start. This is a workaround, but not a solution. We should instead fix the root issue.
Please create a new issue. In the issue, provide the full error message.
To get the full error message, please:
- Open your browser's JavaScript console
- Find the red error message at the bottom of the console's output
- Right click the
Object->Copy Object - Paste the object here
Please do not reply in this issue, it's totally different.
The error is caused by a problem in the web UI settings. The reason it works when you change the port is because Invoke goes back to the default settings. I changed the port to 9080 and it worked but I had to re-enter all of my settings for the UI. I changed back to the 9090 port, did a 'reset web ui', refreshed, entered my settings, and it works fine.
Sadly, even a reset of the UI doesn't seem to fix this for me. Currently cannot produce an images through the base interface or the node interface (version 3.0.2post1)