ovi054 commited on
Commit
d4b782a
·
verified ·
1 Parent(s): 6cceb3d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -42,6 +42,7 @@ MAX_IMAGE_SIZE = 2048
42
  # Inference function with GPU access
43
  @spaces.GPU()
44
  def infer(prompt, negative_prompt="", seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=16, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
 
45
  try:
46
  if randomize_seed:
47
  seed = random.randint(0, MAX_SEED)
 
42
  # Inference function with GPU access
43
  @spaces.GPU()
44
  def infer(prompt, negative_prompt="", seed=42, randomize_seed=False, width=1024, height=1024, num_inference_steps=16, guidance_scale=3.5, progress=gr.Progress(track_tqdm=True)):
45
+ pipe.to("cuda")
46
  try:
47
  if randomize_seed:
48
  seed = random.randint(0, MAX_SEED)