You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@TomatoBoy90 I guess its because in line imcoarser,imrefine,imwatermark = imoutput[1]immask + im(1-immask),imoutput[0]immask + im(1-immask),imwatermark*immask here you are using im instead of ih.cuda()
code as follow:
from PIL import Image
img=Image.open('XX.jpg').resize((256,256))
image=np.array(img)
ih=torch.tensor(np.transpose(image,(2,0,1)))/255.0
ih=ih.unsqueeze(0)
imoutput,immask,imwatermark= model(ih.cuda())
imcoarser,imrefine,imwatermark = imoutput[1]immask + im(1-immask),imoutput[0]immask + im(1-immask),imwatermark*immask
torchvision.utils.save_image(imcoarser,'imrefine.jpg')
The text was updated successfully, but these errors were encountered: