MCPcopy Create free account
hub / github.com/CompVis/diff2flow / convert_to_fp16

Method convert_to_fp16

diff2flow/models/unet/openaimodel.py:805–811  ·  view source on GitHub ↗

Convert the torso of the model to float16.

(self)

Source from the content-addressed store, hash-verified

803
804
805 def convert_to_fp16(self):
806 """
807 Convert the torso of the model to float16.
808 """
809 self.input_blocks.apply(convert_module_to_f16)
810 self.middle_block.apply(convert_module_to_f16)
811 self.output_blocks.apply(convert_module_to_f16)
812
813 def convert_to_fp32(self):
814 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected