fffiloni commited on
Commit
da28fcf
·
1 Parent(s): ab57416

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -73,8 +73,8 @@ def get_canny_filter(image):
73
  return canny_image
74
 
75
 
76
- def generate_images(image, prompt):
77
- canny_image = get_canny_filter(image)
78
  output = pipe(
79
  prompt,
80
  canny_image,
@@ -125,7 +125,8 @@ def infer():
125
  #print(f"FRAME BEFORE stack: {frames[100]}")
126
  prompt = "astronaut crew inside a spaceship, artwork by Claude Monet, beautiful details"
127
  pil2diff_img = Image.open("./frame1.jpg")
128
- diffused_img = generate_images(pil2diff_img, prompt)
 
129
  print(f"DIFFUSED IMG: {diffused_img[1]}")
130
 
131
  diffused_img[1].save("diffused_input1.jpg")
@@ -266,7 +267,8 @@ def infer():
266
  blend2.save("blended2.jpg")
267
 
268
  pil2diff_img = Image.open("blended2.jpg")
269
- diffused_img = generate_images(pil2diff_img, prompt)
 
270
  print(f"DIFFUSED IMG: {diffused_img[1]}")
271
 
272
  diffused_img[1].save("diffused_blended_2.jpg")
 
73
  return canny_image
74
 
75
 
76
+ def generate_images(prompt, canny_image):
77
+
78
  output = pipe(
79
  prompt,
80
  canny_image,
 
125
  #print(f"FRAME BEFORE stack: {frames[100]}")
126
  prompt = "astronaut crew inside a spaceship, artwork by Claude Monet, beautiful details"
127
  pil2diff_img = Image.open("./frame1.jpg")
128
+ canny_image = get_canny_filter(pil2diff_img)
129
+ diffused_img = generate_images(prompt, canny_image)
130
  print(f"DIFFUSED IMG: {diffused_img[1]}")
131
 
132
  diffused_img[1].save("diffused_input1.jpg")
 
267
  blend2.save("blended2.jpg")
268
 
269
  pil2diff_img = Image.open("blended2.jpg")
270
+ canny_image = get_canny_filter(pil2diff_img)
271
+ diffused_img = generate_images(prompt, canny_image)
272
  print(f"DIFFUSED IMG: {diffused_img[1]}")
273
 
274
  diffused_img[1].save("diffused_blended_2.jpg")