Spaces:
Running
on
Zero
Running
on
Zero
add dtype property to the Generator
Browse files- auffusion_pipeline.py +8 -0
auffusion_pipeline.py
CHANGED
|
@@ -321,6 +321,14 @@ class Generator(torch.nn.Module):
|
|
| 321 |
|
| 322 |
return wavs
|
| 323 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 324 |
|
| 325 |
|
| 326 |
def normalize_spectrogram(
|
|
|
|
| 321 |
|
| 322 |
return wavs
|
| 323 |
|
| 324 |
+
@property
|
| 325 |
+
def dtype(self):
|
| 326 |
+
for param in self.parameters():
|
| 327 |
+
return param.dtype
|
| 328 |
+
for buffer in self.buffers():
|
| 329 |
+
return buffer.dtype
|
| 330 |
+
return torch.float32
|
| 331 |
+
|
| 332 |
|
| 333 |
|
| 334 |
def normalize_spectrogram(
|