jadechoghari commited on
Commit
ef8598b
·
verified ·
1 Parent(s): ad051a1

Update modeling.py

Browse files

this chaneg will allow the model to only receive an image file (not image + source_camera). Source camera is automatically generated inside forward

Files changed (1) hide show
  1. modeling.py +3 -1
modeling.py CHANGED
@@ -69,10 +69,12 @@ class LRMGenerator(PreTrainedModel):
69
  triplane_dim=config.triplane_dim, samples_per_ray=config.rendering_samples_per_ray,
70
  )
71
 
72
- def forward(self, image, camera):
73
 
74
  # we use image processor directly in the forward pass
75
  processed_image, source_camera = self.image_processor(image)
 
 
76
 
77
  assert image.shape[0] == camera.shape[0], "Batch size mismatch"
78
  N = image.shape[0]
 
69
  triplane_dim=config.triplane_dim, samples_per_ray=config.rendering_samples_per_ray,
70
  )
71
 
72
+ def forward(self, image):
73
 
74
  # we use image processor directly in the forward pass
75
  processed_image, source_camera = self.image_processor(image)
76
+ image = processed_image
77
+ camera = source_camera
78
 
79
  assert image.shape[0] == camera.shape[0], "Batch size mismatch"
80
  N = image.shape[0]