MCPcopy Create free account
hub / github.com/AlayaLab/Hive / pt_to_numpy

Method pt_to_numpy

models/flowsep/diffusers/image_processor.py:83–88  ·  view source on GitHub ↗

Convert a pytorch tensor to a numpy image

(images)

Source from the content-addressed store, hash-verified

81
82 @staticmethod
83 def pt_to_numpy(images):
84 """
85 Convert a pytorch tensor to a numpy image
86 """
87 images = images.cpu().permute(0, 2, 3, 1).float().numpy()
88 return images
89
90 @staticmethod
91 def normalize(images):

Callers 1

postprocessMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected