Update vtoonify_model.py
Browse files- vtoonify_model.py +2 -0
vtoonify_model.py
CHANGED
@@ -211,6 +211,8 @@ class Model():
|
|
211 |
y_tilde = self.vtoonify(inputs, s_w.repeat(inputs.size(0), 1, 1), d_s=style_degree)
|
212 |
y_tilde = torch.clamp(y_tilde, -1, 1)
|
213 |
logging.info(f"Output from VToonify shape: {y_tilde.shape}")
|
|
|
|
|
214 |
return ((y_tilde[0].cpu().numpy().transpose(1, 2, 0) + 1.0) * 127.5).astype(np.uint8), 'Successfully toonify the image with style of %s' % (self.style_name)
|
215 |
|
216 |
def tensor2cv2(self, img):
|
|
|
211 |
y_tilde = self.vtoonify(inputs, s_w.repeat(inputs.size(0), 1, 1), d_s=style_degree)
|
212 |
y_tilde = torch.clamp(y_tilde, -1, 1)
|
213 |
logging.info(f"Output from VToonify shape: {y_tilde.shape}")
|
214 |
+
print('*** Toonify %dx%d image with style of %s'%(y_tilde.shape[2], y_tilde.shape[3], style_type))
|
215 |
+
|
216 |
return ((y_tilde[0].cpu().numpy().transpose(1, 2, 0) + 1.0) * 127.5).astype(np.uint8), 'Successfully toonify the image with style of %s' % (self.style_name)
|
217 |
|
218 |
def tensor2cv2(self, img):
|