diff options
author | Philpax <me@philpax.me> | 2023-01-02 01:21:22 +0000 |
---|---|---|
committer | Philpax <me@philpax.me> | 2023-01-02 01:21:48 +0000 |
commit | c65909ad16a1962129114c6251de092f49479b06 (patch) | |
tree | cf01139d7014b00bbeba986d188bfa4f1b7c2d1d /modules/api/models.py | |
parent | b5819d9bf1794071139c640b5f1e72c84a0e051a (diff) | |
download | stable-diffusion-webui-gfx803-c65909ad16a1962129114c6251de092f49479b06.tar.gz stable-diffusion-webui-gfx803-c65909ad16a1962129114c6251de092f49479b06.tar.bz2 stable-diffusion-webui-gfx803-c65909ad16a1962129114c6251de092f49479b06.zip |
feat(api): return more data for embeddings
Diffstat (limited to 'modules/api/models.py')
-rw-r--r-- | modules/api/models.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index a8472dc9..4a632c68 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -249,6 +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: List[str] = Field(title="Loaded", description="Embeddings loaded for the current model") - skipped: List[str] = Field(title="Skipped", description="Embeddings skipped for the current model (likely due to architecture incompatibility)")
\ No newline at end of file + 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 |