Spaces:
Running on Zero
Running on Zero
Fast canvas stays the default; the examples carry full-resolution canvases
Browse files61 unmodified lines626364656667686970379 unmodified lines4504514524534544552 unmodified lines458459460461462463464139 unmodified lines6046056066076086096106112 unmodified lines61461561661761861962062162262362462562662762862963063163263363461 unmodified lines"768x1024 路 3:4 full": (1024, 768),"1536x672 路 21:9 full": (672, 1536),}# The full 16:9 canvas, not the fast one. `gr.Examples` are cached lazily and generated once, so what an example# is worth is its quality rather than its latency; the fast canvases stay in the dropdown for interactive use.DEFAULT_CANVAS = "1344x768 路 16:9 full"FPS, FRAMES_PER_CHUNK, LATENTS_PER_CHUNK = 24, 17, 5# 15 s is the checkpoint's ceiling, but it is the *snapped* frame count that has to hold for it: 15 s is 360 frames,# which rounds up to 362, i.e. 15.083 s, and is refused. 14 is the last whole second that survives the snap.379 unmodified linesimage_1=None,audio_path=None,video_path=None,image_2=None,image_3=None,image_4=None,2 unmodified linesimage_7=None,image_8=None,image_9=None,canvas=DEFAULT_CANVAS,match=True,duration=5,steps=28,139 unmodified linesduration_controls, [audio, video, match], [match, duration], show_progress="hidden", api_name=False)# Same order as `generate`'s signature: the exampled four first, then the remaining image slots.request = [prompt, images[0], audio, video, *images[1:], canvas, match, duration, steps, seed]gr.Examples(examples=[2 unmodified lines"examples/subject.png",None,None,],["The character speaks to camera in a quiet room, lips matching every word","examples/subject.png","examples/voice.wav",None,],["The character moves with the same camera push, down a rainy alley at night","examples/subject.png",None,"examples/motion.mp4",],],inputs=[prompt, images[0], audio, video],outputs=result,fn=generate,cache_examples=True,61 unmodified lines62636465666768697071379 unmodified lines4514524534544554564572 unmodified lines460461462463464465139 unmodified lines6056066076086096106116122 unmodified lines61561661761861962062162262362462562662762862963063163263363463563663763861 unmodified lines"768x1024 路 3:4 full": (1024, 768),"1536x672 路 21:9 full": (672, 1536),}DEFAULT_CANVAS = "960x544 路 16:9 fast"# The examples carry their own canvas, and it is a full one. They are cached lazily and generated once, so what an# example is worth is its quality rather than its latency; an interactive request starts on the fast canvas.EXAMPLE_CANVAS, EXAMPLE_PORTRAIT_CANVAS = "1344x768 路 16:9 full", "768x1024 路 3:4 full"FPS, FRAMES_PER_CHUNK, LATENTS_PER_CHUNK = 24, 17, 5# 15 s is the checkpoint's ceiling, but it is the *snapped* frame count that has to hold for it: 15 s is 360 frames,# which rounds up to 362, i.e. 15.083 s, and is refused. 14 is the last whole second that survives the snap.379 unmodified linesimage_1=None,audio_path=None,video_path=None,canvas=DEFAULT_CANVAS,image_2=None,image_3=None,image_4=None,2 unmodified linesimage_7=None,image_8=None,image_9=None,match=True,duration=5,steps=28,139 unmodified linesduration_controls, [audio, video, match], [match, duration], show_progress="hidden", api_name=False)# Same order as `generate`'s signature: the exampled five first, then the remaining image slots.request = [prompt, images[0], audio, video, canvas, *images[1:], match, duration, steps, seed]gr.Examples(examples=[2 unmodified lines"examples/subject.png",None,None,EXAMPLE_CANVAS,],["The character speaks to camera in a quiet room, lips matching every word","examples/subject.png","examples/voice.wav",None,EXAMPLE_PORTRAIT_CANVAS,],["The character moves with the same camera push, down a rainy alley at night","examples/subject.png",None,"examples/motion.mp4",EXAMPLE_CANVAS,],],inputs=[prompt, images[0], audio, video, canvas],outputs=result,fn=generate,cache_examples=True,
app.py+11-7