[FE] increase rate limt, moves strength variable out
This commit is contained in:
parent
e98b7bc206
commit
54dc193f4e
|
|
@ -40,7 +40,7 @@ limiter = Limiter(
|
||||||
|
|
||||||
|
|
||||||
@app.route("/add_job", methods=["POST"])
|
@app.route("/add_job", methods=["POST"])
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("4/second")
|
||||||
def add_job():
|
def add_job():
|
||||||
req = request.get_json()
|
req = request.get_json()
|
||||||
|
|
||||||
|
|
@ -90,7 +90,7 @@ def add_job():
|
||||||
|
|
||||||
|
|
||||||
@app.route("/cancel_job", methods=["POST"])
|
@app.route("/cancel_job", methods=["POST"])
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("4/second")
|
||||||
def cancel_job():
|
def cancel_job():
|
||||||
req = request.get_json()
|
req = request.get_json()
|
||||||
if APIKEY not in req:
|
if APIKEY not in req:
|
||||||
|
|
@ -131,7 +131,7 @@ def cancel_job():
|
||||||
|
|
||||||
|
|
||||||
@app.route("/get_jobs", methods=["POST"])
|
@app.route("/get_jobs", methods=["POST"])
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("4/second")
|
||||||
def get_jobs():
|
def get_jobs():
|
||||||
req = request.get_json()
|
req = request.get_json()
|
||||||
if APIKEY not in req:
|
if APIKEY not in req:
|
||||||
|
|
@ -168,7 +168,7 @@ def get_jobs():
|
||||||
|
|
||||||
|
|
||||||
@app.route("/random_jobs", methods=["GET"])
|
@app.route("/random_jobs", methods=["GET"])
|
||||||
@limiter.limit("1/second")
|
@limiter.limit("4/second")
|
||||||
def random_jobs():
|
def random_jobs():
|
||||||
# define max number of jobs to fetch from db
|
# define max number of jobs to fetch from db
|
||||||
job_count_limit = 20
|
job_count_limit = 20
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@
|
||||||
data-zh_CN="非必填。形容这张图不长什么样。">Optional. Describe what's NOT the image.</div>
|
data-zh_CN="非必填。形容这张图不长什么样。">Optional. Describe what's NOT the image.</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-2 mb-3">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<label for="inputSeed" class="input-group-text" data-en_XX="Seed"
|
<label for="inputSeed" class="input-group-text" data-en_XX="Seed"
|
||||||
data-zh_CN="随机数">Seed</label>
|
data-zh_CN="随机数">Seed</label>
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
Leave it empty or set 0 to use a random seed
|
Leave it empty or set 0 to use a random seed
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3 mb-3">
|
<div class="col-md-2 mb-3">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<label for="guidanceScale" class="input-group-text" data-en_XX="Guidance"
|
<label for="guidanceScale" class="input-group-text" data-en_XX="Guidance"
|
||||||
data-zh_CN="指示强度">Guidance</label>
|
data-zh_CN="指示强度">Guidance</label>
|
||||||
|
|
@ -114,6 +114,20 @@
|
||||||
20 = follow prompt, 7 = creative/artistic. Lower it if you see bad images.
|
20 = follow prompt, 7 = creative/artistic. Lower it if you see bad images.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2 mb-3">
|
||||||
|
<div class="input-group input-group-sm">
|
||||||
|
<label for="strength" class="input-group-text" data-en_XX="Strength"
|
||||||
|
data-zh_CN="改变程度">Strength</label>
|
||||||
|
<input type="number" class="form-control" id="inputStrength"
|
||||||
|
aria-describedby="inputStrengthHelp" placeholder="0.5" min="0"
|
||||||
|
max="1">
|
||||||
|
</div>
|
||||||
|
<div id="inputStrengthHelp" class="form-text"
|
||||||
|
data-en_XX="How different from the original image. 0 means the same, 1 means very different."
|
||||||
|
data-zh_CN="和原图有多么的不同。0指一样,1指非常不一样。">How different from the
|
||||||
|
original image
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-md-2 mb-3">
|
<div class="col-md-2 mb-3">
|
||||||
<div class="input-group input-group-sm">
|
<div class="input-group input-group-sm">
|
||||||
<label for="inputSteps" class="input-group-text" data-en_XX="Steps"
|
<label for="inputSteps" class="input-group-text" data-en_XX="Steps"
|
||||||
|
|
@ -180,20 +194,6 @@
|
||||||
data-en_XX="Upload image" data-zh_CN="上传一张图片">Upload
|
data-en_XX="Upload image" data-zh_CN="上传一张图片">Upload
|
||||||
image</button>
|
image</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="row mb-3">
|
|
||||||
<div class="input-group input-group-sm">
|
|
||||||
<label for="strength" class="input-group-text" data-en_XX="Strength"
|
|
||||||
data-zh_CN="改变程度">Strength</label>
|
|
||||||
<input type="number" class="form-control" id="inputStrength"
|
|
||||||
aria-describedby="inputStrengthHelp" placeholder="0.5" min="0"
|
|
||||||
max="1">
|
|
||||||
</div>
|
|
||||||
<div id="inputStrengthHelp" class="form-text"
|
|
||||||
data-en_XX="How different from the original image. 0 means the same, 1 means very different."
|
|
||||||
data-zh_CN="和参照图有多么的不同。0指一样,1指非常不一样。">How different from the
|
|
||||||
original image
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<button id="newImg2ImgJob" class="btn btn-primary mb-3"
|
<button id="newImg2ImgJob" class="btn btn-primary mb-3"
|
||||||
data-en_XX="Let's Go with Image Below!" data-zh_CN="就用下面的图生成!">Let's
|
data-en_XX="Let's Go with Image Below!" data-zh_CN="就用下面的图生成!">Let's
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue