MCPcopy Index your code
hub / github.com/huggingface/diffusers / half

Method half

src/diffusers/models/modeling_utils.py:1531–1539  ·  view source on GitHub ↗
(self, *args)

Source from the content-addressed store, hash-verified

1529
1530 # Taken from `transformers`.
1531 def half(self, *args):
1532 # Checks if the model is quantized
1533 if getattr(self, "is_quantized", False):
1534 raise ValueError(
1535 "`.half()` is not supported for quantized model. Please use the model as it is, since the"
1536 " model has already been cast to the correct `dtype`."
1537 )
1538 else:
1539 return super().half(*args)
1540
1541 # Taken from `transformers`.
1542 def float(self, *args):

Calls

no outgoing calls