MCPcopy
hub / github.com/openai/guided-diffusion / convert_to_fp16

Method convert_to_fp16

guided_diffusion/unet.py:618–624  ·  view source on GitHub ↗

Convert the torso of the model to float16.

(self)

Source from the content-addressed store, hash-verified

616 )
617
618 def convert_to_fp16(self):
619 """
620 Convert the torso of the model to float16.
621 """
622 self.input_blocks.apply(convert_module_to_f16)
623 self.middle_block.apply(convert_module_to_f16)
624 self.output_blocks.apply(convert_module_to_f16)
625
626 def convert_to_fp32(self):
627 """

Callers 4

__init__Method · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected