Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: Issues with the database maintenance script, invokeai.yaml settings ignored #6188

Closed
1 task done
mcbexx opened this issue Apr 9, 2024 · 2 comments · Fixed by #6783
Closed
1 task done

[bug]: Issues with the database maintenance script, invokeai.yaml settings ignored #6188

mcbexx opened this issue Apr 9, 2024 · 2 comments · Fixed by #6783
Labels
bug Something isn't working

Comments

@mcbexx
Copy link

mcbexx commented Apr 9, 2024

Is there an existing issue for this problem?

  • I have searched the existing issues

Operating system

Windows

GPU vendor

Nvidia (CUDA)

GPU model

No response

GPU VRAM

No response

Version number

4.0.4

Browser

Firefox 124.0.2

Python dependencies

No response

What happened

Started the DB Maintenance script, wanted a) to remove orphaned files and b) rebuild the database with 3 images I accidentally deleted from the gallery and restored from the Windows Recycle Bin.

Upon running the script to remove orphaned images, ALL images were removed from my boards and galleries.

After some prodding around, I noticed that

  • the Database Maintenance script still launches as "for Invoke AI 3.0.0 +"
  • script says

The invokeai.yaml file was found but is missing the db_dir setting! Defaulting to databases
The invokeai.yaml file was found but is missing the outdir setting! Defaulting to outputs
Found invokeai.yaml file at H:\InvokeAI\invokeai.yaml:
Database : H:\InvokeAI\databases\invokeai.db - Exists!
Outputs : H:\InvokeAI\outputs\images- Exists!

Im my invoke.yaml, only the DB path was present, I manually added outputs_dir:

After running the script once and after all files were pruned, the database was empty, so I grabbed the one from the backup folder (good call to create one automatically, unironically thanks) and replaced the existing one.

Upon launching the Web GUI, I got an error message that invokeai.db could not be created as it already existed (in \invokeAI\databases), so I deleted it (still had the backup in the backup folder) and launched invokeai.bat again.
This time, it lauched - but now it created an additional folder and put the invokeai.db file there.
The full path to the db file now is
\invokeai\databases\invokeai.db\invokeai.db
whereas I'm pretty sure before it was
\invokeai\databases\invokeai.db

Now I copied the backup file over as \invokeai\databases\invokeai.db\invokeai.db, relaunched the GUI and, thankfully, all images were back in their corresponding boards.

Still can't seem to run the Database Maintenance script though, as it still claims the output_dir and db_dir are not set and it reverts to the default settings (as quoted above)

This is my invokeai.yaml file

`# Internal metadata - do not edit:
schema_version: 4.0.0

Put user settings here:

db_dir: H:\InvokeAI\databases\invokeai.db
outputs_dir: K:_Stable Diffusion Output Archive_Outputs
ram: 8.0`

What you expected to happen

I expected the DB Maintenance script to acknowledge and use the settings I put in my invokeai.yaml file and not revert to its default directories, which did not contain the necessary and correct information and therefore pruned my gallery of all images, as they were considered orphaned.

How to reproduce the problem

No response

Additional context

No response

Discord username

No response

@mcbexx mcbexx added the bug Something isn't working label Apr 9, 2024
@psychedelicious
Copy link
Collaborator

Yikes, sorry about this. It's the same root cause as #6103.

@mcbexx
Copy link
Author

mcbexx commented Apr 19, 2024

Thanks for acknowledging. I simply just won't use the script for the time being. As I said, good thing there's an automatic database backup to fall back to. Maybe you could for the time being add an entry to the troubleshooting pages in case someone else runs into the issue and thinks their images are gone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants