allow for multiple generations per run
parent
c4c1b91349
commit
0031c0d14f
|
|
@ -117,6 +117,52 @@ def create_zoom(
|
|||
zoom_speed,
|
||||
outputsizeW,
|
||||
outputsizeH,
|
||||
batchcount,
|
||||
):
|
||||
for i in range(batchcount):
|
||||
print(f"Batch {i+1}/{batchcount}")
|
||||
result = create_zoom_single(
|
||||
prompts_array,
|
||||
negative_prompt,
|
||||
num_outpainting_steps,
|
||||
guidance_scale,
|
||||
num_inference_steps,
|
||||
custom_init_image,
|
||||
video_frame_rate,
|
||||
video_zoom_mode,
|
||||
video_start_frame_dupe_amount,
|
||||
video_last_frame_dupe_amount,
|
||||
inpainting_denoising_strength,
|
||||
inpainting_mask_blur,
|
||||
inpainting_fill_mode,
|
||||
inpainting_full_res,
|
||||
inpainting_padding,
|
||||
zoom_speed,
|
||||
outputsizeW,
|
||||
outputsizeH
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
def create_zoom_single(
|
||||
prompts_array,
|
||||
negative_prompt,
|
||||
num_outpainting_steps,
|
||||
guidance_scale,
|
||||
num_inference_steps,
|
||||
custom_init_image,
|
||||
video_frame_rate,
|
||||
video_zoom_mode,
|
||||
video_start_frame_dupe_amount,
|
||||
video_last_frame_dupe_amount,
|
||||
inpainting_denoising_strength,
|
||||
inpainting_mask_blur,
|
||||
inpainting_fill_mode,
|
||||
inpainting_full_res,
|
||||
inpainting_padding,
|
||||
zoom_speed,
|
||||
outputsizeW,
|
||||
outputsizeH
|
||||
):
|
||||
|
||||
fix_env_Path_ffprobe()
|
||||
|
|
@ -197,7 +243,7 @@ def create_zoom(
|
|||
|
||||
current_image.paste(prev_image, mask=prev_image)
|
||||
|
||||
# interpolation steps bewteen 2 inpainted images (=sequential zoom and crop)
|
||||
# interpolation steps between 2 inpainted images (=sequential zoom and crop)
|
||||
for j in range(num_interpol_frames - 1):
|
||||
interpol_image = current_image
|
||||
|
||||
|
|
@ -293,6 +339,7 @@ def on_ui_tabs():
|
|||
with gr.Column(scale=1, variant="panel"):
|
||||
|
||||
with gr.Tab("Main"):
|
||||
batchcount_slider = gr.Slider(minimum=1, maximum=25,value=shared.opts.data.get("infzoom_batchcount",1),step=1,label="Batch Count")
|
||||
outsizeW_slider = gr.Slider(minimum=16, maximum=2048,value=shared.opts.data.get("infzoom_outsizeW",512),step=16,label="Output Width")
|
||||
outsizeH_slider = gr.Slider(minimum=16, maximum=2048,value=shared.opts.data.get("infzoom_outsizeH",512),step=16,label="Output Height")
|
||||
outpaint_prompts = gr.Dataframe(
|
||||
|
|
@ -418,7 +465,8 @@ def on_ui_tabs():
|
|||
inpainting_padding,
|
||||
zoom_speed_slider,
|
||||
outsizeW_slider,
|
||||
outsizeH_slider
|
||||
outsizeH_slider,
|
||||
batchcount_slider,
|
||||
],
|
||||
outputs=[output_video, out_image, generation_info, html_info, html_log],
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue