MCPcopy Create free account
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / depthmap_mode_video

Function depthmap_mode_video

src/common_ui.py:245–267  ·  view source on GitHub ↗
(inp)

Source from the content-addressed store, hash-verified

243
244
245def depthmap_mode_video(inp):
246 gr.HTML(value="Single video mode allows generating videos from videos. Please "
247 "keep in mind that all the frames of the video need to be processed - therefore it is important to "
248 "pick settings so that the generation is not too slow. For the best results, "
249 "use a zoedepth model, since they provide the highest level of coherency between frames.")
250 inp += gr.File(elem_id='depthmap_vm_input', label="Video or animated file",
251 file_count="single", interactive=True, type="file")
252 inp += gr.Checkbox(elem_id="depthmap_vm_custom_checkbox",
253 label="Use custom/pregenerated DepthMap video", value=False)
254 inp += gr.Dropdown(elem_id="depthmap_vm_smoothening_mode", label="Smoothening",
255 type="value", choices=['none', 'experimental'], value='experimental')
256 inp += gr.File(elem_id='depthmap_vm_custom', file_count="single",
257 interactive=True, type="file", visible=False)
258 with gr.Row():
259 inp += gr.Checkbox(elem_id='depthmap_vm_compress_checkbox', label="Compress colorvideos?", value=False)
260 inp += gr.Slider(elem_id='depthmap_vm_compress_bitrate', label="Bitrate (kbit)", visible=False,
261 minimum=1000, value=15000, maximum=50000, step=250)
262
263 inp.add_rule('depthmap_vm_custom', 'visible-if', 'depthmap_vm_custom_checkbox')
264 inp.add_rule('depthmap_vm_smoothening_mode', 'visible-if-not', 'depthmap_vm_custom_checkbox')
265 inp.add_rule('depthmap_vm_compress_bitrate', 'visible-if', 'depthmap_vm_compress_checkbox')
266
267 return inp
268
269
270custom_css = """

Callers 1

on_ui_tabsFunction · 0.85

Calls 1

add_ruleMethod · 0.80

Tested by

no test coverage detected