Spaces:
Runtime error
Runtime error
Update app.py
#1
by linoyts HF Staff - opened
123 unmodified lines12412512612712812913024 unmodified lines1551561571581591601611629 unmodified lines172173174175176177178115 unmodified lines294295296297123 unmodified linescfg_guidance_scale: float,height: int,width: int,progress=gr.Progress()):"""Generate a video based on the given parameters."""try:24 unmodified lines# Format: (image_path, frame_idx, strength)images = [(str(temp_image_path), 0, 1.0)]# Run inferenceprogress(0, desc="Generating video (2-stage)...")pipeline(prompt=prompt,negative_prompt=negative_prompt,9 unmodified linestiling_config=TilingConfig.default(),)progress(1.0, desc="Done!")return str(output_path)except Exception as e:115 unmodified linesif __name__ == "__main__":demo.launch()123 unmodified lines12412512612712812913024 unmodified lines1551561571581591601619 unmodified lines171172173174175176115 unmodified lines292293294295123 unmodified linescfg_guidance_scale: float,height: int,width: int,progress=gr.Progress(track_tqdm=True)):"""Generate a video based on the given parameters."""try:24 unmodified lines# Format: (image_path, frame_idx, strength)images = [(str(temp_image_path), 0, 1.0)]# Run inference - progress automatically tracks tqdm from pipelinepipeline(prompt=prompt,negative_prompt=negative_prompt,9 unmodified linestiling_config=TilingConfig.default(),)return str(output_path)except Exception as e:115 unmodified linesif __name__ == "__main__":demo.launch()
app.py+3-5