Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
#
|
62 |
|
63 |
-
|
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("
|
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)),
|