aboutsummaryrefslogtreecommitdiffstats
path: root/modules/api
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2023-06-05 19:20:29 +0000
committerAarni Koskela <akx@iki.fi>2023-06-05 19:43:57 +0000
commitba70a220e3176153ba2a559acb9e5aa692dce7ca (patch)
tree9db9f6cb0aaad717b01e3a8cd2a5c134ea4b30e2 /modules/api
parent0895c2369cdb795acd0de072acf426c4b54fedc5 (diff)
downloadstable-diffusion-webui-gfx803-ba70a220e3176153ba2a559acb9e5aa692dce7ca.tar.gz
stable-diffusion-webui-gfx803-ba70a220e3176153ba2a559acb9e5aa692dce7ca.tar.bz2
stable-diffusion-webui-gfx803-ba70a220e3176153ba2a559acb9e5aa692dce7ca.zip
Remove a bunch of unused/vestigial code
As found by Vulture and some eyes
Diffstat (limited to 'modules/api')
-rw-r--r--modules/api/api.py7
-rw-r--r--modules/api/models.py4
2 files changed, 0 insertions, 11 deletions
diff --git a/modules/api/api.py b/modules/api/api.py
index 2e49526e..41cd7eca 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -32,13 +32,6 @@ import piexif
import piexif.helper
-def upscaler_to_index(name: str):
- try:
- return [x.name.lower() for x in shared.sd_upscalers].index(name.lower())
- except Exception as e:
- raise HTTPException(status_code=400, detail=f"Invalid upscaler, needs to be one of these: {' , '.join([x.name for x in shared.sd_upscalers])}") from e
-
-
def script_name_to_index(name, scripts):
try:
return [script.title().lower() for script in scripts].index(name.lower())
diff --git a/modules/api/models.py b/modules/api/models.py
index b3a745f0..b5683071 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -274,10 +274,6 @@ class PromptStyleItem(BaseModel):
prompt: Optional[str] = Field(title="Prompt")
negative_prompt: Optional[str] = Field(title="Negative Prompt")
-class ArtistItem(BaseModel):
- name: str = Field(title="Name")
- 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")