K00B404 commited on
Commit
6709f9a
·
verified ·
1 Parent(s): 3faf629

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -58,9 +58,9 @@ image = pipe(prompt, generator=torch.manual_seed(0)).images[0]
58
  image.save("flux-gguf.png")
59
 
60
 
61
- #hf_hub_download(repo_id="city96/FLUX.1-schnell-gguf", filename="flux1-schnell-Q3_K_S.gguf")
62
 
63
- pipe.to(device="cpu", dtype=torch.bfloat16)
64
 
65
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
66
  gr.Markdown(
@@ -115,7 +115,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
115
  @spaces.GPU
116
  def process_image(height, width, steps, scales, prompt, seed):
117
  global pipe
118
- with torch.inference_mode(), torch.autocast("cuda", dtype=torch.bfloat16), timer("inference"):
119
  return pipe(
120
  prompt=[prompt],
121
  generator=torch.Generator().manual_seed(int(seed)),
 
58
  image.save("flux-gguf.png")
59
 
60
 
61
+ #pipe.to(device="cpu", dtype=torch.bfloat16)
62
 
63
+ #hf_hub_download(repo_id="city96/FLUX.1-schnell-gguf", filename="flux1-schnell-Q3_K_S.gguf")
64
 
65
  with gr.Blocks(theme=gr.themes.Soft()) as demo:
66
  gr.Markdown(
 
115
  @spaces.GPU
116
  def process_image(height, width, steps, scales, prompt, seed):
117
  global pipe
118
+ with torch.inference_mode(), torch.autocast("cpu", dtype=torch.bfloat16), timer("inference"):
119
  return pipe(
120
  prompt=[prompt],
121
  generator=torch.Generator().manual_seed(int(seed)),