Skip to content

Loading a Lora on quantized model ? TorchaoLoraLinear.__init__() missing 1 required keyword-only argument: 'get_apply_tensor_subclass' #10621

@christopher5106

Description

@christopher5106
import time
import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-schnell", 
    torch_dtype=torch.bfloat16,
).to("cuda")

quantize_(pipe.transformer, float8_dynamic_activation_float8_weight(granularity=PerRow()))

pipe.load_lora_weights('Octree/flux-schnell-lora', weight_name='flux-schnell-lora.safetensors')

gives the following error:

  File "venv/lib/python3.11/site-packages/peft/tuners/lora/torchao.py", line 147, in dispatch_torchao
    new_module = TorchaoLoraLinear(target, adapter_name, **kwargs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    staleIssues that haven't received updates

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions