diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-01-09 23:02:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 23:02:19 +0000 |
commit | b1d976dca2d866f9c9bb5d21c110d279565ed9c7 (patch) | |
tree | 2c31bd673e786bdd50532883f5fcfa50f4a1bbb9 /modules/api/models.py | |
parent | 50f91c294514149ff090003775e28f9af4e03dc1 (diff) | |
parent | 95727312ca5913876aa1c74f47d1ff6d93bb6b1f (diff) | |
download | stable-diffusion-webui-gfx803-b1d976dca2d866f9c9bb5d21c110d279565ed9c7.tar.gz stable-diffusion-webui-gfx803-b1d976dca2d866f9c9bb5d21c110d279565ed9c7.tar.bz2 stable-diffusion-webui-gfx803-b1d976dca2d866f9c9bb5d21c110d279565ed9c7.zip |
Merge pull request #6466 from vladmandic/api-get-memory
Implement 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 ce43c858..880edde6 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") |