Spaces:
Runtime error
Runtime error
envs
Browse filesFiles changed (3)
- README.md+1-2
- app-12.py → app-23.pyRenamed+62-61
- app.py+53-54
3 unmodified lines4567789101112123 unmodified linescolorFrom: bluecolorTo: bluesdk: gradiosdk_version: 4.37.2sdk_version: 4.7.0app_file: app.pypinned: falselicense: apache-2.0---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference149 unmodified lines15015115215315315415515615615715815916016116215715815916016116216316416416516616716816917016516616716816917017117217317317417517617717817917417517617717817918018118118218318418518618718218318418518618718818918919019119219319419519019119219319419519619719819919920020120220320420520620020120220320420520620720820820921021121221321421520921021121221321421521621721821984 unmodified lines304305306306307308309310311312313307308309310311312313314315316317331 unmodified lines649650651651652653654655149 unmodified lines "object", 11318446767408804497, "", "turtle" "__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/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/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/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/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" ], # ["__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",}# 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",}# 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",# }
84 unmodified lines @spaces.GPU(duration=120) 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) # 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, 256 if isinstance(tracking_points, list):331 unmodified lines example = gr.Examples( label="Input Example", examples=image_examples, inputs=[input_image, prompt, drag_mode, seed, personalized, examples_type], inputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path_var, tracking_points_var], examples_per_page=10, cache_examples=False, )149 unmodified lines150151152153154153154155157158159160161162163156157158159160161162163165166167168169170171164165166167168169170171172174175176177178179180173174175176177178179180182183184185186187188181182183184185186187188190191192193194195196189190191192193194195196197198200201202203204205206207199200201202203204205206207209210211212213214215216208209210211212213214215216217218429 unmodified lines648649650652651652653654149 unmodified lines "object", 11318446767408804497, "", "__asset__/images/object/turtle-1.jpg", json.load(open("__asset__/trajs/object/turtle-1.json")) "turtle" ], # ["__asset__/images/object/rose-1.jpg", # "a red rose engulfed in flames.", # "object", # 6854275249656120509, # "", # "rose", # ], ["__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/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/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/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" # ], ["__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",# }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",# }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",}
429 unmodified lines example = gr.Examples( label="Input Example", examples=image_examples, inputs=[input_image, prompt, drag_mode, seed, personalized, first_frame_path_var, tracking_points_var], inputs=[input_image, prompt, drag_mode, seed, personalized, examples_type], examples_per_page=10, cache_examples=False, )README.md+1-2
app-12.py → app-23.pyRenamed+62-61
app.py+53-54