JoPmt commited on
Commit
02ae6f2
·
1 Parent(s): c46158b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -121,16 +121,15 @@ def plex(mput, prompt, neg_prompt, stips, modal_id, dula, blip, blop):
121
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
122
  generator = torch.Generator("cpu").manual_seed(random.randint(0, MAX_SEED))
123
 
124
- tilage = pope(prompt,num_inference_steps=5).images[0]
125
- cannmage = tilage
126
- cannyimage = np.array(cannmage)
127
  low_threshold = 100
128
  high_threshold = 200
129
  cannyimage = cv2.Canny(cannyimage, low_threshold, high_threshold)
130
  cannyimage = cannyimage[:, :, None]
131
  cannyimage = np.concatenate([cannyimage, cannyimage, cannyimage], axis=2)
132
  canny_image = Image.fromarray(cannyimage)
133
- pose_image = load_image(mput)
134
  openpose_image = openpose(pose_image)
135
  images = [openpose_image, canny_image]
136
 
 
121
  pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
122
  generator = torch.Generator("cpu").manual_seed(random.randint(0, MAX_SEED))
123
 
124
+ tilage = pope(prompt,num_inference_steps=5,height=512,width=512,generator=generator).images[0]
125
+ cannyimage = np.array(tilage)
 
126
  low_threshold = 100
127
  high_threshold = 200
128
  cannyimage = cv2.Canny(cannyimage, low_threshold, high_threshold)
129
  cannyimage = cannyimage[:, :, None]
130
  cannyimage = np.concatenate([cannyimage, cannyimage, cannyimage], axis=2)
131
  canny_image = Image.fromarray(cannyimage)
132
+ pose_image = load_image(mput).resize((512, 512))
133
  openpose_image = openpose(pose_image)
134
  images = [openpose_image, canny_image]
135