Spaces:
Runtime error
Runtime error
envs
Browse filesFiles changed (2)
- app-23.py → app-12.pyRenamed+64-65
- app.py+65-64
149 unmodified lines15015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821981 unmodified lines3013023033043053063073083093103113123133143153163173 unmodified lines321322323324325326327240 unmodified lines56856957057157257357474 unmodified lines649650651652653654655149 unmodified lines"object",11318446767408804497,"","__asset__/images/object/turtle-1.jpg",json.load(open("__asset__/trajs/object/turtle-1.json"))],# ["__asset__/images/object/rose-1.jpg",# "a red rose engulfed in flames.",# "object",# 6854275249656120509,# "",# "rose",# ],# ["__asset__/images/object/jellyfish-1.jpg",# "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",# "object",# 17966188172968903484,# "HelloObject",# "jellyfish"# ],# ["__asset__/images/camera/lush-1.jpg",# "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",# "camera",# 7970487946960948963,# "HelloObject",# "lush",# ],# ["__asset__/images/camera/tusun-1.jpg",# "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",# "camera",# 996953226890228361,# "TUSUN",# "tusun",# ],# ["__asset__/images/camera/painting-1.jpg",# "A oil painting.",# "camera",# 16867854766769816385,# "",# "painting"# ],]# POINTS = {# 'turtle': "__asset__/trajs/object/turtle-1.json",# 'rose': "__asset__/trajs/object/rose-1.json",# 'jellyfish': "__asset__/trajs/object/jellyfish-1.json",# 'lush': "__asset__/trajs/camera/lush-1.json",# 'tusun': "__asset__/trajs/camera/tusun-1.json",# 'painting': "__asset__/trajs/camera/painting-1.json",# }# IMAGE_PATH = {# 'turtle': "__asset__/images/object/turtle-1.jpg",# 'rose': "__asset__/images/object/rose-1.jpg",# 'jellyfish': "__asset__/images/object/jellyfish-1.jpg",# 'lush': "__asset__/images/camera/lush-1.jpg",# 'tusun': "__asset__/images/camera/tusun-1.jpg",# 'painting': "__asset__/images/camera/painting-1.jpg",# }81 unmodified linesself.blur_kernel = blur_kernel@spaces.GPU(duration=20)def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):print("Run!")# if examples_type != "":# ### for adapting high version gradio# tracking_points = gr.State([])# first_frame_path = IMAGE_PATH[examples_type]# points = json.load(open(POINTS[examples_type]))# tracking_points.value.extend(points)# print("example first_frame_path", first_frame_path)# print("example tracking_points", tracking_points.value)original_width, original_height=384, 256if isinstance(tracking_points, list):3 unmodified linesprint("input_all_points", input_all_points)resized_all_points = [tuple([tuple([float(e1[0]*self.width/original_width), float(e1[1]*self.height/original_height)]) for e1 in e]) for e in input_all_points]print("first_frame_path", first_frame_path)dir, base, ext = split_filename(first_frame_path)id = base.split('_')[-1]240 unmodified lineswidth=384,model_length=16)first_frame_path_var = gr.State()tracking_points_var = gr.State([])with gr.Row():74 unmodified linesexample = gr.Examples(label="Input Example",examples=image_examples,inputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path_var, tracking_points_var],examples_per_page=10,cache_examples=False,)149 unmodified lines15015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721881 unmodified lines3003013023033043053063073083093103113123133143153163 unmodified lines320321322323324325326240 unmodified lines56756856957057157257374 unmodified lines648649650651652653654149 unmodified lines"object",11318446767408804497,"","turtle"],["__asset__/images/object/rose-1.jpg","a red rose engulfed in flames.","object",6854275249656120509,"","rose",],["__asset__/images/object/jellyfish-1.jpg","intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.","object",17966188172968903484,"HelloObject","jellyfish"],["__asset__/images/camera/lush-1.jpg","detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.","camera",7970487946960948963,"HelloObject","lush",],["__asset__/images/camera/tusun-1.jpg","tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.","camera",996953226890228361,"TUSUN","tusun",],["__asset__/images/camera/painting-1.jpg","A oil painting.","camera",16867854766769816385,"","painting"],]POINTS = {'turtle': "__asset__/trajs/object/turtle-1.json",'rose': "__asset__/trajs/object/rose-1.json",'jellyfish': "__asset__/trajs/object/jellyfish-1.json",'lush': "__asset__/trajs/camera/lush-1.json",'tusun': "__asset__/trajs/camera/tusun-1.json",'painting': "__asset__/trajs/camera/painting-1.json",}IMAGE_PATH = {'turtle': "__asset__/images/object/turtle-1.jpg",'rose': "__asset__/images/object/rose-1.jpg",'jellyfish': "__asset__/images/object/jellyfish-1.jpg",'lush': "__asset__/images/camera/lush-1.jpg",'tusun': "__asset__/images/camera/tusun-1.jpg",'painting': "__asset__/images/camera/painting-1.jpg",}81 unmodified linesself.blur_kernel = blur_kernel@spaces.GPU(duration=180)def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):print("Run!")if examples_type != "":### for adapting high version gradiotracking_points = gr.State([])first_frame_path = IMAGE_PATH[examples_type]points = json.load(open(POINTS[examples_type]))tracking_points.value.extend(points)print("example first_frame_path", first_frame_path)print("example tracking_points", tracking_points.value)original_width, original_height=384, 256if isinstance(tracking_points, list):3 unmodified linesprint("input_all_points", input_all_points)resized_all_points = [tuple([tuple([float(e1[0]*self.width/original_width), float(e1[1]*self.height/original_height)]) for e1 in e]) for e in input_all_points]dir, base, ext = split_filename(first_frame_path)id = base.split('_')[-1]240 unmodified lineswidth=384,model_length=16)first_frame_path_var = gr.State(value=None)tracking_points_var = gr.State([])with gr.Row():74 unmodified linesexample = gr.Examples(label="Input Example",examples=image_examples,inputs=[input_image, prompt, drag_mode, seed, personalized, examples_type],examples_per_page=10,cache_examples=False,)
149 unmodified lines15015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721881 unmodified lines3003013023033043053063073083093103113123133143153163 unmodified lines320321322323324325326240 unmodified lines56756856957057157257374 unmodified lines648649650651652653654149 unmodified lines"object",11318446767408804497,"","turtle"],["__asset__/images/object/rose-1.jpg","a red rose engulfed in flames.","object",6854275249656120509,"","rose",],["__asset__/images/object/jellyfish-1.jpg","intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.","object",17966188172968903484,"HelloObject","jellyfish"],["__asset__/images/camera/lush-1.jpg","detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.","camera",7970487946960948963,"HelloObject","lush",],["__asset__/images/camera/tusun-1.jpg","tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.","camera",996953226890228361,"TUSUN","tusun",],["__asset__/images/camera/painting-1.jpg","A oil painting.","camera",16867854766769816385,"","painting"],]POINTS = {'turtle': "__asset__/trajs/object/turtle-1.json",'rose': "__asset__/trajs/object/rose-1.json",'jellyfish': "__asset__/trajs/object/jellyfish-1.json",'lush': "__asset__/trajs/camera/lush-1.json",'tusun': "__asset__/trajs/camera/tusun-1.json",'painting': "__asset__/trajs/camera/painting-1.json",}IMAGE_PATH = {'turtle': "__asset__/images/object/turtle-1.jpg",'rose': "__asset__/images/object/rose-1.jpg",'jellyfish': "__asset__/images/object/jellyfish-1.jpg",'lush': "__asset__/images/camera/lush-1.jpg",'tusun': "__asset__/images/camera/tusun-1.jpg",'painting': "__asset__/images/camera/painting-1.jpg",}81 unmodified linesself.blur_kernel = blur_kernel@spaces.GPU(duration=180)def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):print("Run!")if examples_type != "":### for adapting high version gradiotracking_points = gr.State([])first_frame_path = IMAGE_PATH[examples_type]points = json.load(open(POINTS[examples_type]))tracking_points.value.extend(points)print("example first_frame_path", first_frame_path)print("example tracking_points", tracking_points.value)original_width, original_height=384, 256if isinstance(tracking_points, list):3 unmodified linesprint("input_all_points", input_all_points)resized_all_points = [tuple([tuple([float(e1[0]*self.width/original_width), float(e1[1]*self.height/original_height)]) for e1 in e]) for e in input_all_points]dir, base, ext = split_filename(first_frame_path)id = base.split('_')[-1]240 unmodified lineswidth=384,model_length=16)first_frame_path_var = gr.State(value=None)tracking_points_var = gr.State([])with gr.Row():74 unmodified linesexample = gr.Examples(label="Input Example",examples=image_examples,inputs=[input_image, prompt, drag_mode, seed, personalized, examples_type],examples_per_page=10,cache_examples=False,)149 unmodified lines15015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821981 unmodified lines3013023033043053063073083093103113123133143153163173 unmodified lines321322323324325326327240 unmodified lines56856957057157257357474 unmodified lines649650651652653654655149 unmodified lines"object",11318446767408804497,"","__asset__/images/object/turtle-1.jpg",json.load(open("__asset__/trajs/object/turtle-1.json"))],# ["__asset__/images/object/rose-1.jpg",# "a red rose engulfed in flames.",# "object",# 6854275249656120509,# "",# "rose",# ],# ["__asset__/images/object/jellyfish-1.jpg",# "intricate detailing,photorealism,hyperrealistic, glowing jellyfish mushroom, flying, starry sky, bokeh, golden ratio composition.",# "object",# 17966188172968903484,# "HelloObject",# "jellyfish"# ],# ["__asset__/images/camera/lush-1.jpg",# "detailed craftsmanship, photorealism, hyperrealistic, roaring waterfall, misty spray, lush greenery, vibrant rainbow, golden ratio composition.",# "camera",# 7970487946960948963,# "HelloObject",# "lush",# ],# ["__asset__/images/camera/tusun-1.jpg",# "tusuncub with its mouth open, blurry, open mouth, fangs, photo background, looking at viewer, tongue, full body, solo, cute and lovely, Beautiful and realistic eye details, perfect anatomy, Nonsense, pure background, Centered-Shot, realistic photo, photograph, 4k, hyper detailed, DSLR, 24 Megapixels, 8mm Lens, Full Frame, film grain, Global Illumination, studio Lighting, Award Winning Photography, diffuse reflection, ray tracing.",# "camera",# 996953226890228361,# "TUSUN",# "tusun",# ],# ["__asset__/images/camera/painting-1.jpg",# "A oil painting.",# "camera",# 16867854766769816385,# "",# "painting"# ],]# POINTS = {# 'turtle': "__asset__/trajs/object/turtle-1.json",# 'rose': "__asset__/trajs/object/rose-1.json",# 'jellyfish': "__asset__/trajs/object/jellyfish-1.json",# 'lush': "__asset__/trajs/camera/lush-1.json",# 'tusun': "__asset__/trajs/camera/tusun-1.json",# 'painting': "__asset__/trajs/camera/painting-1.json",# }# IMAGE_PATH = {# 'turtle': "__asset__/images/object/turtle-1.jpg",# 'rose': "__asset__/images/object/rose-1.jpg",# 'jellyfish': "__asset__/images/object/jellyfish-1.jpg",# 'lush': "__asset__/images/camera/lush-1.jpg",# 'tusun': "__asset__/images/camera/tusun-1.jpg",# 'painting': "__asset__/images/camera/painting-1.jpg",# }81 unmodified linesself.blur_kernel = blur_kernel@spaces.GPU(duration=20)def run(self, first_frame_path, tracking_points, prompt, drag_mode, negative_prompt, seed, randomize_seed, guidance_scale, num_inference_steps, personalized, examples_type):print("Run!")# if examples_type != "":# ### for adapting high version gradio# tracking_points = gr.State([])# first_frame_path = IMAGE_PATH[examples_type]# points = json.load(open(POINTS[examples_type]))# tracking_points.value.extend(points)# print("example first_frame_path", first_frame_path)# print("example tracking_points", tracking_points.value)original_width, original_height=384, 256if isinstance(tracking_points, list):3 unmodified linesprint("input_all_points", input_all_points)resized_all_points = [tuple([tuple([float(e1[0]*self.width/original_width), float(e1[1]*self.height/original_height)]) for e1 in e]) for e in input_all_points]print("first_frame_path", first_frame_path)dir, base, ext = split_filename(first_frame_path)id = base.split('_')[-1]240 unmodified lineswidth=384,model_length=16)first_frame_path_var = gr.State()tracking_points_var = gr.State([])with gr.Row():74 unmodified linesexample = gr.Examples(label="Input Example",examples=image_examples,inputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path_var, tracking_points_var],examples_per_page=10,cache_examples=False,)
app-23.py → app-12.pyRenamed+64-65
app.py+65-64