1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

enable 1 case on XPU (#11219)

enable case on XPU: 1. tests/quantization/bnb/test_mixed_int8.py::BnB8bitTrainingTests::test_training

Signed-off-by: YAO Matrix <matrix.yao@intel.com>
This commit is contained in:
Yao Matrix
2025-04-07 15:24:21 +08:00
committed by GitHub
parent 8ad68c1393
commit 506f39af3a

View File

@@ -379,7 +379,7 @@ class BnB8bitTrainingTests(Base8bitTests):
model_inputs.update({k: v for k, v in input_dict_for_transformer.items() if k not in model_inputs})
# Step 4: Check if the gradient is not None
with torch.amp.autocast("cuda", dtype=torch.float16):
with torch.amp.autocast(torch_device, dtype=torch.float16):
out = self.model_8bit(**model_inputs)[0]
out.norm().backward()