Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Multi-LoRA overflow test: read the kernel source as UTF-8 (#16544)

Daniel Handadd36ed384d
diff --git a/tests/test_multi_lora_scale_overflow_cpu.py b/tests/test_multi_lora_scale_overflow_cpu.py
index e7f95c2e6cf..05fc6c1f638 100644
--- a/tests/test_multi_lora_scale_overflow_cpu.py
+++ b/tests/test_multi_lora_scale_overflow_cpu.py
@@ -17,7 +17,7 @@ from torch.nn import functional as F
def _load_experts():
path = Path(__file__).resolve().parents[1] / "unsloth/kernels/multi_lora.py"
- tree = ast.parse(path.read_text(), filename = str(path))
+ tree = ast.parse(path.read_text(encoding = "utf-8"), filename = str(path))
names = {"MultiLoraExpertParam", "MultiLoraExperts", "_expert_stack_shape"}
tree.body = [
n for n in tree.body if isinstance(n, (ast.ClassDef, ast.FunctionDef)) and n.name in names