multimodalart HF staff commited on
Commit
aa27e70
1 Parent(s): fc3e4a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ import subprocess
11
  ldm_pipeline = LDMTextToImagePipeline.from_pretrained("CompVis/ldm-text2im-large-256")
12
 
13
  def predict(prompt, steps=100, seed=42, guidance_scale=6.0):
14
- torch.cuda.empty_cache()
15
  print(subprocess.check_output(["nvidia-smi"], stderr=subprocess.STDOUT).decode("utf8"))
16
  generator = torch.manual_seed(seed)
17
  images = ldm_pipeline([prompt], generator=generator, num_inference_steps=steps, eta=0.3, guidance_scale=guidance_scale)["sample"]
 
11
  ldm_pipeline = LDMTextToImagePipeline.from_pretrained("CompVis/ldm-text2im-large-256")
12
 
13
  def predict(prompt, steps=100, seed=42, guidance_scale=6.0):
14
+ #torch.cuda.empty_cache()
15
  print(subprocess.check_output(["nvidia-smi"], stderr=subprocess.STDOUT).decode("utf8"))
16
  generator = torch.manual_seed(seed)
17
  images = ldm_pipeline([prompt], generator=generator, num_inference_steps=steps, eta=0.3, guidance_scale=guidance_scale)["sample"]