mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Expose img2img strength parameter in Web UI (#239)
* Expose img2img strength parameter in Web UI * Fix strength label id Co-authored-by: Mikhail Tishin <michail.tishin@fayrix.com> Co-authored-by: Kevin Gibbons https://github.com/bakkot
This commit is contained in:
parent
a547c33327
commit
b622819051
@ -65,6 +65,7 @@ class DreamServer(BaseHTTPRequestHandler):
|
||||
post_data = json.loads(self.rfile.read(content_length))
|
||||
prompt = post_data['prompt']
|
||||
initimg = post_data['initimg']
|
||||
strength = float(post_data['strength'])
|
||||
iterations = int(post_data['iterations'])
|
||||
steps = int(post_data['steps'])
|
||||
width = int(post_data['width'])
|
||||
@ -174,6 +175,7 @@ class DreamServer(BaseHTTPRequestHandler):
|
||||
# Run img2img
|
||||
self.model.prompt2image(prompt,
|
||||
init_img = "./img2img-tmp.png",
|
||||
strength = strength,
|
||||
iterations = iterations,
|
||||
cfg_scale = cfgscale,
|
||||
seed = seed,
|
||||
|
@ -59,13 +59,14 @@
|
||||
<option value="832">832</option> <option value="896">896</option>
|
||||
<option value="960">960</option> <option value="1024">1024</option>
|
||||
</select>
|
||||
<br>
|
||||
<label title="Upload an image to use img2img" for="initimg">Img2Img Init:</label>
|
||||
<input type="file" id="initimg" name="initimg" accept=".jpg, .jpeg, .png">
|
||||
<label title="Set to -1 for random seed" for="seed">Seed:</label>
|
||||
<input value="-1" type="number" id="seed" name="seed">
|
||||
<button type="button" id="reset-seed">↺</button>
|
||||
<span>•</span>
|
||||
<br>
|
||||
<label for="strength">Img2Img Strength:</label>
|
||||
<input value="0.75" type="number" id="strength" name="strength" step="0.01" min="0" max="1">
|
||||
<label title="Upload an image to use img2img" for="initimg">Init:</label>
|
||||
<input type="file" id="initimg" name="initimg" accept=".jpg, .jpeg, .png">
|
||||
<button type="button" id="reset-all">Reset to Defaults</button>
|
||||
<br>
|
||||
<label for="progress_images">Display in-progress images (slows down generation):</label>
|
||||
|
Loading…
Reference in New Issue
Block a user