File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ def do_POST(self):
6565 post_data = json .loads (self .rfile .read (content_length ))
6666 prompt = post_data ['prompt' ]
6767 initimg = post_data ['initimg' ]
68+ strength = float (post_data ['strength' ])
6869 iterations = int (post_data ['iterations' ])
6970 steps = int (post_data ['steps' ])
7071 width = int (post_data ['width' ])
@@ -174,6 +175,7 @@ def image_progress(sample, step):
174175 # Run img2img
175176 self .model .prompt2image (prompt ,
176177 init_img = "./img2img-tmp.png" ,
178+ strength = strength ,
177179 iterations = iterations ,
178180 cfg_scale = cfgscale ,
179181 seed = seed ,
Original file line number Diff line number Diff line change @@ -59,13 +59,14 @@ <h2 id="header">Stable Diffusion Dream Server</h2>
5959 < option value ="832 "> 832</ option > < option value ="896 "> 896</ option >
6060 < option value ="960 "> 960</ option > < option value ="1024 "> 1024</ option >
6161 </ select >
62- < br >
63- < label title ="Upload an image to use img2img " for ="initimg "> Img2Img Init:</ label >
64- < input type ="file " id ="initimg " name ="initimg " accept =".jpg, .jpeg, .png ">
6562 < label title ="Set to -1 for random seed " for ="seed "> Seed:</ label >
6663 < input value ="-1 " type ="number " id ="seed " name ="seed ">
6764 < button type ="button " id ="reset-seed "> ↺</ button >
68- < span > •</ span >
65+ < br >
66+ < label for ="strength "> Img2Img Strength:</ label >
67+ < input value ="0.75 " type ="number " id ="strength " name ="strength " step ="0.01 " min ="0 " max ="1 ">
68+ < label title ="Upload an image to use img2img " for ="initimg "> Init:</ label >
69+ < input type ="file " id ="initimg " name ="initimg " accept =".jpg, .jpeg, .png ">
6970 < button type ="button " id ="reset-all "> Reset to Defaults</ button >
7071 < br >
7172 < label for ="progress_images "> Display in-progress images (slows down generation):</ label >
You can’t perform that action at this time.
0 commit comments