mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 23:00:20 +08:00
Fix test.
This commit is contained in:
parent
9420c1bb2b
commit
d4a54ff96c
@ -153,7 +153,7 @@ class TestMixedPrecisionOps(unittest.TestCase):
|
|||||||
state_dict2 = model.state_dict()
|
state_dict2 = model.state_dict()
|
||||||
|
|
||||||
# Verify layer1.weight is a QuantizedTensor with scale preserved
|
# Verify layer1.weight is a QuantizedTensor with scale preserved
|
||||||
self.assertEqual(state_dict2["layer1.weight"], fp8_weight)
|
self.assertTrue(torch.equal(state_dict2["layer1.weight"], fp8_weight))
|
||||||
self.assertEqual(state_dict2["layer1.weight_scale"].item(), 3.0)
|
self.assertEqual(state_dict2["layer1.weight_scale"].item(), 3.0)
|
||||||
self.assertEqual(model.layer1.weight._layout_cls, "TensorCoreFP8E4M3Layout")
|
self.assertEqual(model.layer1.weight._layout_cls, "TensorCoreFP8E4M3Layout")
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user