Skip to content

Commit 55aa6c3

Browse files
Fixed API change caused issue in stable diffusion distillation for quantization example. (intel#1080)
Signed-off-by: Ye, Xinyu <xinyu.ye@intel.com>
1 parent adc2ba8 commit 55aa6c3

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

examples/huggingface/pytorch/textual-inversion/distillation_for_quantization/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pip install -r requirements.txt
1414

1515
## Get a FP32 Textual Inversion model
1616

17-
Please refer to this [Textual Inversion example](../README.md) in Intel® Neural Compressor for more details.
17+
Please refer to this [Textual Inversion example](https://github.com/intel/neural-compressor/blob/master/examples/pytorch/diffusion_model/diffusers/textual_inversion/README.md) in Intel® Neural Compressor for more details.
1818

1919
## Do distillation for quantization
2020

examples/huggingface/pytorch/textual-inversion/distillation_for_quantization/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diffusers==0.4.1
2-
accelerate
2+
accelerate<=0.19.0
33
torchvision
44
transformers~=4.21.0
55
ftfy

examples/huggingface/pytorch/textual-inversion/distillation_for_quantization/textual_inversion.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,6 @@ def train_func(model):
857857
f"Optimized model saved to: {args.output_dir}."
858858
)
859859

860-
# change to framework model for further use
861-
model = model.model
862-
863860
# Create the pipeline using using the trained modules and save it.
864861
templates = imagenet_style_templates_small if args.learnable_property == "style" else imagenet_templates_small
865862
prompt = templates[0].format(args.placeholder_token)

0 commit comments

Comments
 (0)