Spaces:
Runtime error
Runtime error
New examples for Depth guided T2V0
Browse filesFiles changed (3)
- app_depth.py+27-14
- gradio_utils.py+18-2
- model.py+1-1
6 unmodified lines78910111213141516171819202122231011121314151617181920212223242526272829303132333435363738396 unmodified linesdef create_demo(model: Model):
examples = [ ["__assets__/depth_videos/butterfly.mp4", "white butterfly, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/deer.mp4", "oil painting of a deer, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/fox.mp4", "wild red fox is walking on the grass, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/girl_dancing.mp4", "oil painting of a girl dancing close-up, masterpiece, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/girl_turning.mp4", "oil painting of a beautiful girl, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/halloween.mp4", "beautiful girl halloween style, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos/santa.mp4", "a santa claus, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/girl_dancing.mp4", "A stormtrooper, masterpiece, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/girl_dancing.mp4", "Oil painting of a catwoman, masterpiece, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/girl_dancing.mp4", "Oil painting of a girl dancing closed eyes, masterpiece, a high-quality, detailed, and professional photo"],
["__assets__/depth_videos_depth/woman.mp4", "A robot is dancing in the Sahara desert, detailed, and professional photo"], ["__assets__/depth_videos_depth/woman.mp4", "Wonder woman is dancing, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/woman.mp4", "Oil painting of a girl dancing close-up, masterpiece, a high-quality, detailed, and professional photo"],
["__assets__/depth_videos_depth/man.mp4", "An astronaut is Dancing in space, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/man.mp4", "Iron Man is dancing, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/man.mp4", "Spiderman is Dancing, a high-quality, detailed, and professional photo"],
["__assets__/depth_videos_depth/halloween.mp4", "Beautiful blonde girl, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/halloween.mp4", "Beautiful brunette girl, a high-quality, detailed, and professional photo"], ["__assets__/depth_videos_depth/halloween.mp4", "Beautiful red-haired girl, a high-quality, detailed, and professional photo"], ]
with gr.Blocks() as demo:1234545687 unmodified lines949596979899100101102103104105106107108109110111112113114import os
# App Canny utils
def edge_path_to_video_path(edge_path): video_path = edge_path
87 unmodified lines if name in logo_paths: return logo_paths[name] return name
# App Depth utilsdef depth_path_to_video_path(edge_path): video_path = edge_path
vid_name = edge_path.split("/")[-1] if vid_name == "girl_dancing.mp4": video_path = "__assets__/depth_videos_mp4/girl_dancing.mp4" elif vid_name == "halloween.mp4": video_path = "__assets__/depth_videos_mp4/halloween.mp4" elif vid_name == "man.mp4": video_path = "__assets__/depth_videos_mp4/man.mp4" elif vid_name == "woman.mp4": video_path = "__assets__/depth_videos_mp4/woman.mp4"
assert os.path.isfile(video_path) return video_path210 unmodified lines211212213214214215216217210 unmodified lines use_cf_attn=True, save_path=None): print("Module Depth") video_path = gradio_utils.edge_path_to_video_path(video_path) video_path = gradio_utils.depth_path_to_video_path(video_path) if self.model_type != ModelType.ControlNetDepth: controlnet = ControlNetModel.from_pretrained( "lllyasviel/sd-controlnet-depth")app_depth.py+27-14
gradio_utils.py+18-2
model.py+1-1