img2img prompt strength config

This commit is contained in:
cmdr2
2022-08-25 22:56:52 +05:30
parent 05f986ef14
commit 7fcd7918af
2 changed files with 19 additions and 1 deletions

View File

@ -19,6 +19,7 @@ class ImageRequest(BaseModel):
width: str = "512"
height: str = "512"
seed: str = "30000"
prompt_strength: str = "0.8"
@app.get('/')
def read_root():
@ -48,6 +49,7 @@ async def image(req : ImageRequest):
if req.init_image is not None:
data['input']['init_image'] = req.init_image
data['input']['prompt_strength'] = req.prompt_strength
if req.seed == "-1":
del data['input']['seed']