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

Allow lists of basemodel objects in omegaconf #5922

Merged
merged 6 commits into from Mar 11, 2024

Conversation

brandonrising
Copy link
Collaborator

@brandonrising brandonrising commented Mar 11, 2024

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Community Node Submission

Have you discussed this change with the InvokeAI team?

  • Yes
  • No, because:

Have you updated all relevant documentation?

  • Yes
  • No

Description

Prior to this PR, invokeai-configure crashes when it attempts to process the remote_api_tokens config due to it not containing primitive objects. This detects Basemodels as well as lists of BaseModels and converts them to dicts that omegaconf can handle.

QA Instructions, Screenshots, Recordings

  • Create an invokeai.yaml file with a list of remote_api_tokens similar to those below
  Model Install:
    remote_api_tokens:
    - url_regex: .*
      token: test1
    - url_regex: .*
      token: test2
    - url_regex: .*
      token: test3
    - url_regex: .*
      token: test4
  • Run invokeai-configure defined on this branch. Validate the script neither crashes nor rewrites your invokeai.yaml file without the configs above.

Merge Plan

This PR can be merged when approved

@github-actions github-actions bot added python PRs that change python files services PRs that change app services labels Mar 11, 2024
@github-actions github-actions bot added the backend PRs that change backend files label Mar 11, 2024
@maryhipp maryhipp merged commit 149ff75 into main Mar 11, 2024
14 checks passed
@maryhipp maryhipp deleted the allow-lists-of-basemodels-in-omegaconf branch March 11, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend PRs that change backend files python PRs that change python files services PRs that change app services
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants