osanseviero
commited on
Commit
·
d6a700f
1
Parent(s):
b7d7804
Fixes
Browse files- pipeline.py +2 -2
pipeline.py
CHANGED
@@ -27,12 +27,12 @@ class PreTrainedPipeline():
|
|
27 |
raise ValueError("Input is not in ImageNet")
|
28 |
|
29 |
|
30 |
-
noise_vector = truncated_noise_sample(truncation=truncation, batch_size=1)
|
31 |
|
32 |
noise_vector = torch.from_numpy(noise_vector)
|
33 |
class_vector = torch.from_numpy(class_vector)
|
34 |
|
35 |
with torch.no_grad():
|
36 |
-
output = model(noise_vector, class_vector, truncation)
|
37 |
|
38 |
return transforms.ToPILImage()(output[0])
|
|
|
27 |
raise ValueError("Input is not in ImageNet")
|
28 |
|
29 |
|
30 |
+
noise_vector = truncated_noise_sample(truncation=self.truncation, batch_size=1)
|
31 |
|
32 |
noise_vector = torch.from_numpy(noise_vector)
|
33 |
class_vector = torch.from_numpy(class_vector)
|
34 |
|
35 |
with torch.no_grad():
|
36 |
+
output = self.model(noise_vector, class_vector, truncation)
|
37 |
|
38 |
return transforms.ToPILImage()(output[0])
|