mirror of
https://github.com/vladmandic/automatic
synced 2026-09-20 01:31:13 +02:00
Quanto freeze the model before calibration
This commit is contained in:
@@ -200,8 +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 None:
|
||||
quanto.freeze(model)
|
||||
quanto.freeze(model)
|
||||
if hasattr(model, "set_input_embeddings") and backup_embeddings is not None:
|
||||
model.set_input_embeddings(backup_embeddings)
|
||||
if op is not None and shared.opts.quant_shuffle_weights:
|
||||
|
||||
Reference in New Issue
Block a user