Update app.py
Browse files
app.py
CHANGED
|
@@ -208,18 +208,19 @@ class AnimateController:
|
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
-
#
|
| 212 |
-
|
| 213 |
|
| 214 |
-
# Resize the image to (64, 64)
|
| 215 |
-
img = cv2.resize(img, (64, 64))
|
| 216 |
|
| 217 |
-
|
| 218 |
-
|
|
|
|
|
|
|
|
|
|
| 219 |
|
| 220 |
sample = pipeline(
|
| 221 |
prompt_textbox,
|
| 222 |
-
init_image = "
|
| 223 |
negative_prompt = negative_prompt_textbox,
|
| 224 |
num_inference_steps = 25,
|
| 225 |
guidance_scale = 8.,
|
|
|
|
| 208 |
|
| 209 |
|
| 210 |
|
| 211 |
+
# Open the image
|
| 212 |
+
image = Image.open(init_image).convert("RGBA")
|
| 213 |
|
|
|
|
|
|
|
| 214 |
|
| 215 |
+
# Resize the image
|
| 216 |
+
image.resize((512, 512))
|
| 217 |
+
|
| 218 |
+
# Save the resized image to the specified output path
|
| 219 |
+
image.save("resized.jpg")
|
| 220 |
|
| 221 |
sample = pipeline(
|
| 222 |
prompt_textbox,
|
| 223 |
+
init_image = "resized.jpg",
|
| 224 |
negative_prompt = negative_prompt_textbox,
|
| 225 |
num_inference_steps = 25,
|
| 226 |
guidance_scale = 8.,
|