Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ import diffusers
|
|
28 |
|
29 |
# init
|
30 |
dtype = torch.bfloat16
|
31 |
-
device = "cuda"
|
32 |
base_model = "black-forest-labs/FLUX.1-dev"
|
33 |
|
34 |
# load pipe
|
@@ -71,11 +71,7 @@ def generate_image(orginal_image, prompt, adapter_names, steps, seed, image_str
|
|
71 |
|
72 |
gr.Info("Start to generate images ...")
|
73 |
with calculateDuration(f"Make a new generator: {seed}"):
|
74 |
-
|
75 |
-
# img2img_pipe.to(device)
|
76 |
-
# else:
|
77 |
-
# txt2img_pipe.to(device)
|
78 |
-
|
79 |
generator = torch.Generator(device=device).manual_seed(seed)
|
80 |
|
81 |
with calculateDuration("Generating image"):
|
|
|
28 |
|
29 |
# init
|
30 |
dtype = torch.bfloat16
|
31 |
+
device = "cuda"
|
32 |
base_model = "black-forest-labs/FLUX.1-dev"
|
33 |
|
34 |
# load pipe
|
|
|
71 |
|
72 |
gr.Info("Start to generate images ...")
|
73 |
with calculateDuration(f"Make a new generator: {seed}"):
|
74 |
+
txt2img_pipe.to(device)
|
|
|
|
|
|
|
|
|
75 |
generator = torch.Generator(device=device).manual_seed(seed)
|
76 |
|
77 |
with calculateDuration("Generating image"):
|