fix: correct LoRALinear dtype and remove unused import

- LoRALinear now creates lora_A/lora_B with dtype matching the base
  linear's weight, preventing a float32/bf16 mismatch at forward time
  when the generator is loaded in bf16 or fp16.
- Remove unused `import math` from train_lora.py.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 14:57:09 +02:00
parent 437c62b28f
commit cde280049b
2 changed files with 3 additions and 3 deletions
-1
View File
@@ -25,7 +25,6 @@ Usage:
import argparse
import os
import sys
import math
import random
import json
from pathlib import Path