huggingface / huggingface/diffusers
Loading a Lora on quantized model ? TorchaoLoraLinear.__init__() missing 1 required keyword-only argument: 'get_apply_tensor_subclass'
Open
stale
- Dominant language
- Python
- Stars
- 34.5k
- Forks
- 7.3k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 91
Description
```
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)
```
Contributor guide
Assessment
This issue has not been assessed yet.