multimodalart HF staff commited on
Commit
fb43031
1 Parent(s): b5aa4b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -35,6 +35,7 @@ MAX_IMAGE_SIZE = 2048
35
 
36
  @spaces.GPU()
37
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
 
38
  if randomize_seed:
39
  seed = random.randint(0, MAX_SEED)
40
  generator = torch.Generator().manual_seed(seed)
 
35
 
36
  @spaces.GPU()
37
  def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
38
+ pipe.to("cuda")
39
  if randomize_seed:
40
  seed = random.randint(0, MAX_SEED)
41
  generator = torch.Generator().manual_seed(seed)