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