osanseviero HF staff commited on
Commit
ea74652
1 Parent(s): 5735fa4

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -0
pipeline.py CHANGED
@@ -32,6 +32,7 @@ class PreTrainedPipeline():
32
  with torch.no_grad():
33
  output = self.model(noise_vector, class_vector, self.truncation)
34
 
 
35
  img = transforms.ToPILImage()(output[0])
36
  buffer = io.BytesIO()
37
  img.save(buffer, format="JPEG")
 
32
  with torch.no_grad():
33
  output = self.model(noise_vector, class_vector, self.truncation)
34
 
35
+ # Ugly hack, I'm sure there's a better way of doing what I want.
36
  img = transforms.ToPILImage()(output[0])
37
  buffer = io.BytesIO()
38
  img.save(buffer, format="JPEG")