osanseviero HF staff commited on
Commit
af0640a
1 Parent(s): 6ef6b1d

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +1 -1
pipeline.py CHANGED
@@ -37,7 +37,7 @@ class PreTrainedPipeline():
37
  with torch.no_grad():
38
  output = self.model(noise_vector, class_vector, self.truncation)
39
 
40
- img = transforms.ToPILImage(output[0])
41
  buf = io.BytesIO()
42
  img.save(buf, format="JPEG")
43
 
 
37
  with torch.no_grad():
38
  output = self.model(noise_vector, class_vector, self.truncation)
39
 
40
+ img = transforms.ToPILImage()(output[0])
41
  buf = io.BytesIO()
42
  img.save(buf, format="JPEG")
43