LTT commited on
Commit
dfc2f3d
·
verified ·
1 Parent(s): b5bf93b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -111,7 +111,7 @@ state_dict = torch.load(model_ckpt_path, map_location='cpu')['state_dict']
111
  state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_generator.')}
112
  model.load_state_dict(state_dict, strict=True)
113
  model = model.to(device_1)
114
-
115
  @spaces.GPU
116
  def lrm_reconstructions(image, input_cameras, save_path=None, name="temp", export_texmap=False, if_save_video=False):
117
  images = image.unsqueeze(0).to(device_1)
@@ -199,7 +199,8 @@ def local_normal_global_transform(local_normal_images, azimuths_deg, elevations_
199
  @spaces.GPU(duration=120)
200
  def generate_multi_view_images(prompt, seed):
201
  # torch.cuda.empty_cache()
202
- generator = torch.manual_seed(seed)
 
203
  with torch.no_grad():
204
  images = flux_pipe(
205
  prompt=prompt,
 
111
  state_dict = {k[14:]: v for k, v in state_dict.items() if k.startswith('lrm_generator.')}
112
  model.load_state_dict(state_dict, strict=True)
113
  model = model.to(device_1)
114
+ torch.cuda.empty_cache()
115
  @spaces.GPU
116
  def lrm_reconstructions(image, input_cameras, save_path=None, name="temp", export_texmap=False, if_save_video=False):
117
  images = image.unsqueeze(0).to(device_1)
 
199
  @spaces.GPU(duration=120)
200
  def generate_multi_view_images(prompt, seed):
201
  # torch.cuda.empty_cache()
202
+ # generator = torch.manual_seed(seed)
203
+ generator = torch.Generator().manual_seed(seed)
204
  with torch.no_grad():
205
  images = flux_pipe(
206
  prompt=prompt,