Debug dtype/device
Browse files
app.py
CHANGED
|
@@ -368,8 +368,9 @@ def generate(prompt: str, temperature: float, max_tokens: int, num_steps: int, g
|
|
| 368 |
output_type="latent",
|
| 369 |
)
|
| 370 |
latent = result.images.to(dtype)
|
| 371 |
-
print(f"Latent shape: {latent.shape}, dtype: {latent.dtype}")
|
| 372 |
print(f"Latent stats: min={latent.min():.3f}, max={latent.max():.3f}, mean={latent.mean():.3f}")
|
|
|
|
| 373 |
|
| 374 |
# Latent -> Gcode via trained decoder (with debug)
|
| 375 |
with torch.no_grad():
|
|
|
|
| 368 |
output_type="latent",
|
| 369 |
)
|
| 370 |
latent = result.images.to(dtype)
|
| 371 |
+
print(f"Latent shape: {latent.shape}, dtype: {latent.dtype}, device: {latent.device}")
|
| 372 |
print(f"Latent stats: min={latent.min():.3f}, max={latent.max():.3f}, mean={latent.mean():.3f}")
|
| 373 |
+
print(f"Decoder dtype: {next(gcode_decoder.parameters()).dtype}, device: {next(gcode_decoder.parameters()).device}")
|
| 374 |
|
| 375 |
# Latent -> Gcode via trained decoder (with debug)
|
| 376 |
with torch.no_grad():
|