Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- hg_app.py +1 -1
- hy3dgen/shapegen/pipelines.py +6 -1
hg_app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
# pip install gradio==4.44.1
|
2 |
-
if
|
3 |
import os
|
4 |
import spaces
|
5 |
import subprocess
|
|
|
1 |
# pip install gradio==4.44.1
|
2 |
+
if False:
|
3 |
import os
|
4 |
import spaces
|
5 |
import subprocess
|
hy3dgen/shapegen/pipelines.py
CHANGED
@@ -186,6 +186,7 @@ class Hunyuan3DDiTPipeline:
|
|
186 |
scheduler=scheduler,
|
187 |
conditioner=conditioner,
|
188 |
image_processor=image_processor,
|
|
|
189 |
device=device,
|
190 |
dtype=dtype,
|
191 |
)
|
@@ -252,6 +253,7 @@ class Hunyuan3DDiTPipeline:
|
|
252 |
self.scheduler = scheduler
|
253 |
self.conditioner = conditioner
|
254 |
self.image_processor = image_processor
|
|
|
255 |
|
256 |
self.to(device, dtype)
|
257 |
|
@@ -421,8 +423,10 @@ class Hunyuan3DDiTPipeline:
|
|
421 |
batch_size = image.shape[0]
|
422 |
|
423 |
t_dtype = torch.long
|
|
|
424 |
timesteps, num_inference_steps = retrieve_timesteps(
|
425 |
-
|
|
|
426 |
|
427 |
latents = self.prepare_latents(batch_size, dtype, device, generator)
|
428 |
extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)
|
@@ -581,3 +585,4 @@ class Hunyuan3DDiTFlowMatchingPipeline(Hunyuan3DDiTPipeline):
|
|
581 |
output_type,
|
582 |
box_v, mc_level, num_chunks, octree_resolution, mc_algo,
|
583 |
)
|
|
|
|
186 |
scheduler=scheduler,
|
187 |
conditioner=conditioner,
|
188 |
image_processor=image_processor,
|
189 |
+
scheduler_cfg=config['scheduler'],
|
190 |
device=device,
|
191 |
dtype=dtype,
|
192 |
)
|
|
|
253 |
self.scheduler = scheduler
|
254 |
self.conditioner = conditioner
|
255 |
self.image_processor = image_processor
|
256 |
+
self.kwargs = kwargs
|
257 |
|
258 |
self.to(device, dtype)
|
259 |
|
|
|
423 |
batch_size = image.shape[0]
|
424 |
|
425 |
t_dtype = torch.long
|
426 |
+
scheduler = instantiate_from_config(self.kwargs['scheduler_cfg'])
|
427 |
timesteps, num_inference_steps = retrieve_timesteps(
|
428 |
+
scheduler, num_inference_steps, device, timesteps, sigmas
|
429 |
+
)
|
430 |
|
431 |
latents = self.prepare_latents(batch_size, dtype, device, generator)
|
432 |
extra_step_kwargs = self.prepare_extra_step_kwargs(generator, eta)
|
|
|
585 |
output_type,
|
586 |
box_v, mc_level, num_chunks, octree_resolution, mc_algo,
|
587 |
)
|
588 |
+
|