mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 09:38:23 +02:00
Fix quanto
This commit is contained in:
@@ -200,7 +200,7 @@ def optimum_quanto_model(model, op=None, sd_model=None, weights=None, activation
|
||||
if hasattr(model, "get_input_embeddings"):
|
||||
backup_embeddings = copy.deepcopy(model.get_input_embeddings())
|
||||
quanto.quantize(model, weights=weights, activations=activations)
|
||||
if activations is not None:
|
||||
if activations is None:
|
||||
quanto.freeze(model)
|
||||
if hasattr(model, "set_input_embeddings") and backup_embeddings is not None:
|
||||
model.set_input_embeddings(backup_embeddings)
|
||||
|
||||
Reference in New Issue
Block a user