Update app.py
Browse files
app.py
CHANGED
@@ -22,9 +22,9 @@ def split_image(input_image, num_splits=4):
|
|
22 |
|
23 |
# Split the image into four 256x256 sections
|
24 |
for i in range(num_splits):
|
25 |
-
left = i *
|
26 |
-
right = (i + 1) *
|
27 |
-
box = (left, 0, right,
|
28 |
output_images.append(input_image.crop(box))
|
29 |
|
30 |
return output_images
|
@@ -49,8 +49,8 @@ def infer(prompt, seed=1, randomize_seed=False, num_inference_steps=4, progress=
|
|
49 |
num_inference_steps=num_inference_steps,
|
50 |
num_images_per_prompt=1,
|
51 |
generator=torch.Generator(device).manual_seed(seed),
|
52 |
-
height=
|
53 |
-
width=
|
54 |
).images[0]
|
55 |
gif_name = f"{uuid.uuid4().hex}-flux.gif"
|
56 |
export_to_gif(split_image(image, 4), gif_name, fps=4)
|
|
|
22 |
|
23 |
# Split the image into four 256x256 sections
|
24 |
for i in range(num_splits):
|
25 |
+
left = i * 320
|
26 |
+
right = (i + 1) * 320
|
27 |
+
box = (left, 0, right, 320)
|
28 |
output_images.append(input_image.crop(box))
|
29 |
|
30 |
return output_images
|
|
|
49 |
num_inference_steps=num_inference_steps,
|
50 |
num_images_per_prompt=1,
|
51 |
generator=torch.Generator(device).manual_seed(seed),
|
52 |
+
height=320,
|
53 |
+
width=1280
|
54 |
).images[0]
|
55 |
gif_name = f"{uuid.uuid4().hex}-flux.gif"
|
56 |
export_to_gif(split_image(image, 4), gif_name, fps=4)
|