aboutsummaryrefslogtreecommitdiff
path: root/modules/api/models.py
diff options
context:
space:
mode:
authorbrkirch <brkirch@users.noreply.github.com>2023-01-04 00:40:16 -0500
committerbrkirch <brkirch@users.noreply.github.com>2023-01-06 00:14:20 -0500
commitf6ab5a39d762a7791573d1c52ae5a3024b10e8ed (patch)
treec3958d77a6dae42457b571dbe0f1efec7ce45dd2 /modules/api/models.py
parentd782a95967c9eea753df3333cd1954b6ec73eba0 (diff)
parent3e22e294135ed0327ce9d9738655ff03c53df3c0 (diff)
Merge branch 'AUTOMATIC1111:master' into sub-quad_attn_opt
Diffstat (limited to 'modules/api/models.py')
-rw-r--r--modules/api/models.py10
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