back to vanilla
Browse files
app.py
CHANGED
@@ -216,25 +216,25 @@ class AnimateController:
|
|
216 |
|
217 |
|
218 |
# Open the image
|
219 |
-
image = Image.open(init_image).convert("
|
220 |
|
221 |
|
222 |
# Resize the image
|
223 |
image.resize((512, 512))
|
224 |
|
225 |
# Save the resized image to the specified output path
|
226 |
-
|
227 |
|
228 |
|
229 |
|
230 |
# Convert the image to SD by Img2Img pipeline
|
231 |
|
232 |
-
sd_images = pipe(prompt=prompt_textbox, image=image, strength=0.75, guidance_scale=7.5).images
|
233 |
-
sd_images[0].save("sd_converted.png")
|
234 |
|
235 |
sample = pipeline(
|
236 |
prompt_textbox,
|
237 |
-
init_image = "
|
238 |
negative_prompt = negative_prompt_textbox,
|
239 |
num_inference_steps = 25,
|
240 |
guidance_scale = 8.,
|
|
|
216 |
|
217 |
|
218 |
# Open the image
|
219 |
+
image = Image.open(init_image).convert("RGB")
|
220 |
|
221 |
|
222 |
# Resize the image
|
223 |
image.resize((512, 512))
|
224 |
|
225 |
# Save the resized image to the specified output path
|
226 |
+
image.save("resized.jpg")
|
227 |
|
228 |
|
229 |
|
230 |
# Convert the image to SD by Img2Img pipeline
|
231 |
|
232 |
+
#sd_images = pipe(prompt=prompt_textbox, image=image, strength=0.75, guidance_scale=7.5).images
|
233 |
+
#sd_images[0].save("sd_converted.png")
|
234 |
|
235 |
sample = pipeline(
|
236 |
prompt_textbox,
|
237 |
+
init_image = "resized.jpg",
|
238 |
negative_prompt = negative_prompt_textbox,
|
239 |
num_inference_steps = 25,
|
240 |
guidance_scale = 8.,
|