aboutsummaryrefslogtreecommitdiffstats
path: root/modules/api
diff options
context:
space:
mode:
Diffstat (limited to 'modules/api')
-rw-r--r--modules/api/api.py4
-rw-r--r--modules/api/processing.py2
2 files changed, 5 insertions, 1 deletions
diff --git a/modules/api/api.py b/modules/api/api.py
index a04f2428..3df6ff96 100644
--- a/modules/api/api.py
+++ b/modules/api/api.py
@@ -72,6 +72,10 @@ class Api:
if init_images is None:
raise HTTPException(status_code=404, detail="Init image not found")
+ mask = img2imgreq.mask
+ if mask:
+ raise HTTPException(status_code=400, detail="Mask not supported yet")
+
populate = img2imgreq.copy(update={ # Override __init__ params
"sd_model": shared.sd_model,
diff --git a/modules/api/processing.py b/modules/api/processing.py
index 9f1d65c0..f551fa35 100644
--- a/modules/api/processing.py
+++ b/modules/api/processing.py
@@ -102,5 +102,5 @@ StableDiffusionTxt2ImgProcessingAPI = PydanticModelGenerator(
StableDiffusionImg2ImgProcessingAPI = PydanticModelGenerator(
"StableDiffusionProcessingImg2Img",
StableDiffusionProcessingImg2Img,
- [{"key": "sampler_index", "type": str, "default": "Euler"}, {"key": "init_images", "type": list, "default": None}, {"key": "denoising_strength", "type": float, "default": 0.75}]
+ [{"key": "sampler_index", "type": str, "default": "Euler"}, {"key": "init_images", "type": list, "default": None}, {"key": "denoising_strength", "type": float, "default": 0.75}, {"key": "mask", "type": str, "default": None}]
).generate_model() \ No newline at end of file