mirror of
https://git.datalinker.icu/kijai/ComfyUI-Hunyuan3DWrapper.git
synced 2025-12-08 20:34:28 +08:00
update example, fix vae progressbar
This commit is contained in:
parent
17d4ce9d29
commit
f609b2b512
BIN
example_workflows/example_workflow.png
Normal file
BIN
example_workflows/example_workflow.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 MiB |
File diff suppressed because it is too large
Load Diff
@ -580,7 +580,7 @@ class ShapeVAE(nn.Module):
|
||||
# 2. latents to 3d volume
|
||||
batch_logits = []
|
||||
batch_size = latents.shape[0]
|
||||
comfy_pbar = ProgressBar(num_chunks * xyz_samples.shape[0])
|
||||
comfy_pbar = ProgressBar(xyz_samples.shape[0])
|
||||
for start in tqdm(range(0, xyz_samples.shape[0], num_chunks),
|
||||
desc=f"MC Level {mc_level} Implicit Function:"):
|
||||
queries = xyz_samples[start: start + num_chunks, :].to(device)
|
||||
@ -593,7 +593,7 @@ class ShapeVAE(nn.Module):
|
||||
logits = torch.sigmoid(logits) * 2 - 1
|
||||
print(f'Training with soft labels, inference with sigmoid and marching cubes level 0.')
|
||||
batch_logits.append(logits)
|
||||
comfy_pbar.update(1)
|
||||
comfy_pbar.update(num_chunks)
|
||||
grid_logits = torch.cat(batch_logits, dim=1)
|
||||
grid_logits = grid_logits.view((batch_size, grid_size[0], grid_size[1], grid_size[2])).float()
|
||||
|
||||
|
||||
3
nodes.py
3
nodes.py
@ -380,6 +380,9 @@ class Hy3DGenerateMesh:
|
||||
|
||||
image = image.permute(0, 3, 1, 2).to(device)
|
||||
|
||||
if mask is not None:
|
||||
mask = mask.unsqueeze(0).to(device)
|
||||
|
||||
pipeline.to(device)
|
||||
|
||||
mesh = pipeline(
|
||||
|
||||
@ -42,4 +42,4 @@ cd hy3dgen/texgen/differentiable_renderer
|
||||
python setup.py build_ext --inplace
|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
@ -9,4 +9,5 @@ xatlas
|
||||
pymeshlab
|
||||
pygltflib
|
||||
scikit-learn
|
||||
scikit-image
|
||||
scikit-image
|
||||
pybind11
|
||||
Loading…
x
Reference in New Issue
Block a user