update example, fix vae progressbar

This commit is contained in:
kijai 2025-01-22 00:45:01 +02:00
parent 17d4ce9d29
commit f609b2b512
7 changed files with 648 additions and 507 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

File diff suppressed because it is too large Load Diff

View File

@ -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()

BIN
image.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 639 KiB

View File

@ -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(

View File

@ -42,4 +42,4 @@ cd hy3dgen/texgen/differentiable_renderer
python setup.py build_ext --inplace
```
![alt text](image.png)
![alt text](example_workflows/example_workflow.png)

View File

@ -9,4 +9,5 @@ xatlas
pymeshlab
pygltflib
scikit-learn
scikit-image
scikit-image
pybind11