Image generation: add torchao quantization (supports torch.compile)

This commit is contained in:
oobabooga 2025-12-02 14:22:51 -08:00
parent 97281ff831
commit 9448bf1caa
12 changed files with 40 additions and 6 deletions

View file

@ -473,9 +473,9 @@ def create_ui():
with gr.Column():
shared.gradio['image_quant'] = gr.Dropdown(
label='Quantization',
choices=['none', 'bnb-8bit', 'bnb-4bit'],
choices=['none', 'bnb-8bit', 'bnb-4bit', 'torchao-int8wo', 'torchao-fp4', 'torchao-float8wo'],
value=shared.settings['image_quant'],
info='Quantization method for reduced VRAM usage. Quanto supports lower precisions (2-bit, 4-bit, 8-bit).'
info='BnB: bitsandbytes quantization. torchao: int8wo, fp4, float8wo.'
)
shared.gradio['image_dtype'] = gr.Dropdown(