Spaces:
Running
on
Zero
Running
on
Zero
fix some bug in RVC
Browse files
trellis/pipelines/trellis_image_to_3d.py
CHANGED
|
@@ -643,11 +643,15 @@ class TrellisImageTo3DPipeline(Pipeline):
|
|
| 643 |
feats=torch.randn(coords.shape[0], flow_model.in_channels).to(self.device),
|
| 644 |
coords=coords,
|
| 645 |
)
|
|
|
|
|
|
|
| 646 |
sampler_params = {**self.slat_sampler_params, **sampler_params}
|
| 647 |
slat = self.slat_sampler.sample_slat_opt_delta_v(
|
| 648 |
flow_model,
|
| 649 |
slat_decoder_gs,
|
| 650 |
slat_decoder_mesh,
|
|
|
|
|
|
|
| 651 |
self.dreamsim_model,
|
| 652 |
apperance_learning_rate,
|
| 653 |
start_t,
|
|
@@ -660,8 +664,6 @@ class TrellisImageTo3DPipeline(Pipeline):
|
|
| 660 |
verbose=True
|
| 661 |
).samples
|
| 662 |
|
| 663 |
-
std = torch.tensor(self.slat_normalization['std'])[None].to(slat.device)
|
| 664 |
-
mean = torch.tensor(self.slat_normalization['mean'])[None].to(slat.device)
|
| 665 |
slat = slat * std + mean
|
| 666 |
# from trellis.utils import render_utils, postprocessing_utils
|
| 667 |
# import imageio
|
|
|
|
| 643 |
feats=torch.randn(coords.shape[0], flow_model.in_channels).to(self.device),
|
| 644 |
coords=coords,
|
| 645 |
)
|
| 646 |
+
std = torch.tensor(self.slat_normalization['std'])[None].to(self.device)
|
| 647 |
+
mean = torch.tensor(self.slat_normalization['mean'])[None].to(self.device)
|
| 648 |
sampler_params = {**self.slat_sampler_params, **sampler_params}
|
| 649 |
slat = self.slat_sampler.sample_slat_opt_delta_v(
|
| 650 |
flow_model,
|
| 651 |
slat_decoder_gs,
|
| 652 |
slat_decoder_mesh,
|
| 653 |
+
std,
|
| 654 |
+
mean,
|
| 655 |
self.dreamsim_model,
|
| 656 |
apperance_learning_rate,
|
| 657 |
start_t,
|
|
|
|
| 664 |
verbose=True
|
| 665 |
).samples
|
| 666 |
|
|
|
|
|
|
|
| 667 |
slat = slat * std + mean
|
| 668 |
# from trellis.utils import render_utils, postprocessing_utils
|
| 669 |
# import imageio
|