diff options
author | Vladimir Mandic <mandic00@live.com> | 2023-01-07 12:51:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-07 12:51:35 +0000 |
commit | 47534577eda63b0db1eeb8921c2a161773ec434c (patch) | |
tree | 6f7ee4901af5459ef5966f17f3f248b1ccfa1f78 /modules/api/models.py | |
parent | 151233399c4b79934bdbb7c12a97eeb6499572fb (diff) | |
download | stable-diffusion-webui-gfx803-47534577eda63b0db1eeb8921c2a161773ec434c.tar.gz stable-diffusion-webui-gfx803-47534577eda63b0db1eeb8921c2a161773ec434c.tar.bz2 stable-diffusion-webui-gfx803-47534577eda63b0db1eeb8921c2a161773ec434c.zip |
api-get-memory
Diffstat (limited to 'modules/api/models.py')
-rw-r--r-- | modules/api/models.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index 5fa63774..49bf1e7a 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -260,3 +260,7 @@ class EmbeddingItem(BaseModel): 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)") + +class MemoryResponse(BaseModel): + ram: dict[str, str] | dict[str, float] = Field(title="RAM", description="System memory stats") + cuda: dict[str, str] | dict[str, dict] = Field(title="CUDA", description="nVidia CUDA memory stats") |