Skip to content

Conversation

@devops117
Copy link
Contributor

@devops117 devops117 commented Nov 23, 2022

dict.update is more performant, on the side note, we can use something like

from typing import TypedDict


class ModelInfo(TypedDict):
  status: str
  description: str


def list_models(...) -> dict[str, ModelInfo]:
  ...

edit: or maybe we can use Dict from the typing module for compatibility reasons*

Copy link
Collaborator

@lstein lstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. This looks much better.

@lstein lstein merged commit 248068f into invoke-ai:development Nov 26, 2022
@devops117
Copy link
Contributor Author

ah I ended up writing
models = models.update()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants