Browse Source

use slice instead of torch.select()

pull/483/head
missionfloyd 2 years ago committed by GitHub
parent
commit
e1d289c1ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      nodes.py

2
nodes.py

@ -1076,7 +1076,7 @@ class ImageToMask:
def image_to_mask(self, image, channel):
channels = ["red", "green", "blue"]
mask = torch.select(image[0], 2, channels.index(channel))
mask = image[0, :, :, channels.index(channel)]
return (mask,)
class MaskToImage:

Loading…
Cancel
Save