changed wording to help users understand concept very easily. disabling generate button on invalid table
parent
443b3256f5
commit
700b1c9560
|
|
@ -42,7 +42,7 @@ def on_ui_tabs():
|
|||
maximum=100,
|
||||
step=1,
|
||||
value=8,
|
||||
label="Total Outpaint Steps",
|
||||
label="Total video length [s]",
|
||||
)
|
||||
|
||||
# safe reading json prompt
|
||||
|
|
@ -55,7 +55,7 @@ def on_ui_tabs():
|
|||
|
||||
main_prompts = gr.Dataframe(
|
||||
type="array",
|
||||
headers=["outpaint step", "prompt"],
|
||||
headers=["Start at second [0,1,...]", "Prompt"],
|
||||
datatype=["number", "str"],
|
||||
row_count=1,
|
||||
col_count=(2, "fixed"),
|
||||
|
|
@ -255,8 +255,9 @@ Our best experience and trade-off is the R-ERSGAn4x upscaler.
|
|||
) = create_output_panel(
|
||||
"infinite-zoom", shared.opts.outdir_img2img_samples
|
||||
)
|
||||
|
||||
generate_btn.click(
|
||||
fn=wrap_gradio_gpu_call(check_create_zoom, extra_outputs=[None, "", ""]),
|
||||
fn=wrap_gradio_gpu_call(create_zoom, extra_outputs=[None, "", ""]),
|
||||
inputs=[
|
||||
main_common_prompt_pre,
|
||||
main_prompts,
|
||||
|
|
@ -288,70 +289,17 @@ Our best experience and trade-off is the R-ERSGAn4x upscaler.
|
|||
],
|
||||
outputs=[output_video, out_image, generation_info, html_info, html_log],
|
||||
)
|
||||
interrupt.click(fn=lambda: shared.state.interrupt(), inputs=[], outputs=[])
|
||||
|
||||
main_prompts.change(fn=checkPrompts,inputs=[main_prompts], outputs=[generate_btn])
|
||||
|
||||
interrupt.click(fn=shared.state.interrupt(), inputs=[], outputs=[])
|
||||
infinite_zoom_interface.queue()
|
||||
return [(infinite_zoom_interface, "Infinite Zoom", "iz_interface")]
|
||||
|
||||
|
||||
|
||||
def check_create_zoom(
|
||||
main_common_prompt_pre,
|
||||
main_prompts,
|
||||
main_common_prompt_suf,
|
||||
main_negative_prompt,
|
||||
main_outpaint_steps,
|
||||
main_guidance_scale,
|
||||
sampling_step,
|
||||
init_image,
|
||||
exit_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,
|
||||
video_zoom_speed,
|
||||
seed,
|
||||
main_width,
|
||||
main_height,
|
||||
batchcount_slider,
|
||||
main_sampler,
|
||||
upscale_do,
|
||||
upscaler_name,
|
||||
upscale_by,
|
||||
):
|
||||
keys = main_prompts.keys()
|
||||
if 0 not in keys:
|
||||
raise gr.Error("Ensure your prompt table has a step 9 (zero) prompt")
|
||||
|
||||
return create_zoom( main_common_prompt_pre,
|
||||
main_prompts,
|
||||
main_common_prompt_suf,
|
||||
main_negative_prompt,
|
||||
main_outpaint_steps,
|
||||
main_guidance_scale,
|
||||
sampling_step,
|
||||
init_image,
|
||||
exit_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,
|
||||
video_zoom_speed,
|
||||
seed,
|
||||
main_width,
|
||||
main_height,
|
||||
batchcount_slider,
|
||||
main_sampler,
|
||||
upscale_do,
|
||||
upscaler_name,
|
||||
upscale_by,
|
||||
def checkPrompts(p):
|
||||
return gr.Button.update(
|
||||
interactive=
|
||||
any(0 in sublist for sublist in p)
|
||||
or
|
||||
any('0' in sublist for sublist in p)
|
||||
)
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
infzoom_titles = {
|
||||
"Batch Count":"How many separate videos to create",
|
||||
"Total Outpaint Steps":"The more it is, the longer your videos will be. Each step generates frame for 1 second at your FPS, while cycling through your array of prompts",
|
||||
"Total video length [s]":"For each seconds frame (FPS) will be generated. Define prompts at which time they should start wihtin this duration.",
|
||||
"Common Prompt Prefix":"Prompt inserted before each step",
|
||||
"Common Prompt Suffix":"Prompt inserted after each step",
|
||||
"Negative Prompt":"What your model shall avoid",
|
||||
|
|
@ -12,9 +12,8 @@ infzoom_titles = {
|
|||
"Custom initial image":"An image at the end resp. begin of your movie, depending or ZoomIn or Out",
|
||||
"Custom exit image":"An image at the end resp. begin of your movie, depending or ZoomIn or Out",
|
||||
"Zoom Speed":"Varies additional frames per second",
|
||||
|
||||
|
||||
|
||||
"Start at second [0,1,...]": "At which time the prompt has to be occure. We need at least one prompt starting at time 0",
|
||||
"Generate video": "Start rendering. If it´s disabled the prompt table is invalid, check we have a start prompt at time 0"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue