Drexubery commited on
Commit
752a7e2
1 Parent(s): 84e37ca
Files changed (2) hide show
  1. app.py +1 -1
  2. viewcrafter.py +3 -3
app.py CHANGED
@@ -38,7 +38,7 @@ download_model()
38
  def viewcrafter_demo(opts):
39
  css = """#input_img {max-width: 1024px !important} #output_vid {max-width: 1024px; max-height:576px} #random_button {max-width: 100px !important}"""
40
  image2video = ViewCrafter(opts, gradio = True)
41
- image2video.run_gradio = spaces.GPU(image2video.run_gradio, duration=120)
42
  with gr.Blocks(analytics_enabled=False, css=css) as viewcrafter_iface:
43
  gr.Markdown("<div align='center'> <h1> ViewCrafter: Taming Video Diffusion Models for High-fidelity Novel View Synthesis </span> </h1> \
44
  <h2 style='font-weight: 450; font-size: 1rem; margin: 0rem'>\
 
38
  def viewcrafter_demo(opts):
39
  css = """#input_img {max-width: 1024px !important} #output_vid {max-width: 1024px; max-height:576px} #random_button {max-width: 100px !important}"""
40
  image2video = ViewCrafter(opts, gradio = True)
41
+ image2video.run_gradio = spaces.GPU(image2video.run_gradio, duration=800)
42
  with gr.Blocks(analytics_enabled=False, css=css) as viewcrafter_iface:
43
  gr.Markdown("<div align='center'> <h1> ViewCrafter: Taming Video Diffusion Models for High-fidelity Novel View Synthesis </span> </h1> \
44
  <h2 style='font-weight: 450; font-size: 1rem; margin: 0rem'>\
viewcrafter.py CHANGED
@@ -66,11 +66,11 @@ class ViewCrafter:
66
 
67
  color_mask = torch.ones(col.shape).to(device)
68
 
69
- point_cloud_mask = Pointclouds(points=[pts],features=[color_mask]).extend(views)
70
  point_cloud = Pointclouds(points=[pts], features=[col]).extend(views)
71
  images = renderer(point_cloud)
72
- view_masks = renderer(point_cloud_mask)
73
- return images, view_masks
74
 
75
  def run_render(self, pcd, imgs,masks, H, W, camera_traj,num_views,use_cpu=False):
76
  if use_cpu:
 
66
 
67
  color_mask = torch.ones(col.shape).to(device)
68
 
69
+ # point_cloud_mask = Pointclouds(points=[pts],features=[color_mask]).extend(views)
70
  point_cloud = Pointclouds(points=[pts], features=[col]).extend(views)
71
  images = renderer(point_cloud)
72
+ # view_masks = renderer(point_cloud_mask)
73
+ return images, None
74
 
75
  def run_render(self, pcd, imgs,masks, H, W, camera_traj,num_views,use_cpu=False):
76
  if use_cpu: