Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2157,8 +2157,8 @@ def update_selection(evt: gr.SelectData, width, height):
|
|
| 2157 |
)
|
| 2158 |
|
| 2159 |
def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
|
| 2160 |
-
pipe.to("
|
| 2161 |
-
generator = torch.Generator(device="
|
| 2162 |
with calculateDuration("Generating image"):
|
| 2163 |
# Generate image
|
| 2164 |
for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
|
|
@@ -2175,8 +2175,8 @@ def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scal
|
|
| 2175 |
yield img
|
| 2176 |
|
| 2177 |
def generate_image_to_image(prompt_mash, image_input_path, image_strength, steps, cfg_scale, width, height, lora_scale, seed):
|
| 2178 |
-
generator = torch.Generator(device="
|
| 2179 |
-
pipe_i2i.to("
|
| 2180 |
image_input = load_image(image_input_path)
|
| 2181 |
final_image = pipe_i2i(
|
| 2182 |
prompt=prompt_mash,
|
|
|
|
| 2157 |
)
|
| 2158 |
|
| 2159 |
def generate_image(prompt_mash, steps, seed, cfg_scale, width, height, lora_scale, progress):
|
| 2160 |
+
pipe.to("cpu")
|
| 2161 |
+
generator = torch.Generator(device="cpu").manual_seed(seed)
|
| 2162 |
with calculateDuration("Generating image"):
|
| 2163 |
# Generate image
|
| 2164 |
for img in pipe.flux_pipe_call_that_returns_an_iterable_of_images(
|
|
|
|
| 2175 |
yield img
|
| 2176 |
|
| 2177 |
def generate_image_to_image(prompt_mash, image_input_path, image_strength, steps, cfg_scale, width, height, lora_scale, seed):
|
| 2178 |
+
generator = torch.Generator(device="cpu").manual_seed(seed)
|
| 2179 |
+
pipe_i2i.to("cpu")
|
| 2180 |
image_input = load_image(image_input_path)
|
| 2181 |
final_image = pipe_i2i(
|
| 2182 |
prompt=prompt_mash,
|