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
|
@@ -38,7 +38,7 @@ MAX_SEED = np.iinfo(np.int32).max
|
|
38 |
|
39 |
@spaces.GPU
|
40 |
def infer(prompt, seed=1, randomize_seed=False, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
|
41 |
-
prompt_template = f"A side by side 4 frame image showing consecutive stills from a looped gif moving from left to right. The stills are of {prompt}"
|
42 |
if randomize_seed:
|
43 |
seed = random.randint(0, MAX_SEED)
|
44 |
|
|
|
22 |
|
23 |
# Split the image into four 256x256 sections
|
24 |
for i in range(num_splits):
|
25 |
+
left = i * 288
|
26 |
+
right = (i + 1) * 288
|
27 |
+
box = (left, 0, right, 288)
|
28 |
output_images.append(input_image.crop(box))
|
29 |
|
30 |
return output_images
|
|
|
38 |
|
39 |
@spaces.GPU
|
40 |
def infer(prompt, seed=1, randomize_seed=False, num_inference_steps=4, progress=gr.Progress(track_tqdm=True)):
|
41 |
+
prompt_template = f"A side by side 4 frame image showing high quality consecutive stills from a looped gif animation moving from left to right. The stills are of {prompt}"
|
42 |
if randomize_seed:
|
43 |
seed = random.randint(0, MAX_SEED)
|
44 |
|