Skip to content
Commit 3fb6c9b9 authored by Stefy Lanza (nextime / spora )'s avatar Stefy Lanza (nextime / spora )
Browse files

fix: apply peft<->gptqmodel AWQ shim on the inference LoRA path too



Loading a trained LoRA at inference (e.g. a fighter LoRA on an image pipeline)
crashed with "cannot import name AwqGEMMQuantLinear" because peft dispatches AWQ
for any non-bnb target when gptqmodel is installed, and gptqmodel 7.1.0 renamed
that class to AwqGEMMLinear. The alias shim existed only in the training path.

Extract it to codai/models/peft_compat.ensure_peft_awq_compat() (cached) and call
it before load_lora_weights in codai/api/images._apply_loras and the acceleration
fuse path; the trainer now delegates to the shared shim.

Co-Authored-By: default avatarClaude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RdMufYvtTbtGDWsiZVoXce
parent 2b6942d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment