osanseviero commited on
Commit
ea59a12
1 Parent(s): 7854755

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -7,7 +7,7 @@ pipeline = LatentDiffusionUncondPipeline.from_pretrained("CompVis/latent-diffusi
7
 
8
 
9
  def predict(seed):
10
- torch.manual_seed(seed)
11
  image = pipeline(generator=generator, num_inference_steps=1)["sample"]
12
  image_processed = image.cpu().permute(0, 2, 3, 1)
13
  image_processed = (image_processed + 1.0) * 127.5
 
7
 
8
 
9
  def predict(seed):
10
+ generator = torch.manual_seed(seed)
11
  image = pipeline(generator=generator, num_inference_steps=1)["sample"]
12
  image_processed = image.cpu().permute(0, 2, 3, 1)
13
  image_processed = (image_processed + 1.0) * 127.5