diff options
author | Philpax <me@philpax.me> | 2023-01-05 05:00:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-05 05:00:58 +0100 |
commit | 83ca8dd0c96e3cc8dd444e8d980c07718dc647ee (patch) | |
tree | cbadd09c9305099db7763532b7aaf909d366d326 /modules/api/models.py | |
parent | fa931733f6acc94e058a1d3d4655846e33ae34be (diff) | |
parent | 5f4fa942b8ec3ed3b15a352903489d6f9e6eb46e (diff) |
Merge branch 'AUTOMATIC1111:master' into fix-sd-arch-switch-in-override-settings
Diffstat (limited to 'modules/api/models.py')
-rw-r--r-- | modules/api/models.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index c446ce7a..4a632c68 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -249,3 +249,13 @@ class ArtistItem(BaseModel): score: float = Field(title="Score") category: str = Field(title="Category") +class EmbeddingItem(BaseModel): + step: Optional[int] = Field(title="Step", description="The number of steps that were used to train this embedding, if available") + sd_checkpoint: Optional[str] = Field(title="SD Checkpoint", description="The hash of the checkpoint this embedding was trained on, if available") + sd_checkpoint_name: Optional[str] = Field(title="SD Checkpoint Name", description="The name of the checkpoint this embedding was trained on, if available. Note that this is the name that was used by the trainer; for a stable identifier, use `sd_checkpoint` instead") + shape: int = Field(title="Shape", description="The length of each individual vector in the embedding") + vectors: int = Field(title="Vectors", description="The number of vectors in the embedding") + +class EmbeddingsResponse(BaseModel): + loaded: Dict[str, EmbeddingItem] = Field(title="Loaded", description="Embeddings loaded for the current model") + skipped: Dict[str, EmbeddingItem] = Field(title="Skipped", description="Embeddings skipped for the current model (likely due to architecture incompatibility)")
\ No newline at end of file |