Skip to content

Commit 5fe283b

Browse files
committed
fix sdxl_smooth_quant
Signed-off-by: xin3he <xin3.he@intel.com>
1 parent 3835cac commit 5fe283b

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

examples/3.x_api/pytorch/diffusion_model/diffusers/stable_diffusion/smooth_quant/main.py

+1
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,7 @@ def __call__(
400400
torch_dtype=dtype,
401401
use_safetensors=True,
402402
)
403+
pipe = pipe.to(dtype) # Ensure all modules are set as dtype
403404
pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
404405

405406
if args.refiner:

examples/3.x_api/pytorch/diffusion_model/diffusers/stable_diffusion/smooth_quant/sdxl_smooth_quant.py

+1
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,7 @@ def main():
361361
torch_dtype=dtype,
362362
use_safetensors=True,
363363
)
364+
pipeline = pipeline.to(dtype) # Ensure all modules are set as dtype
364365
pipeline.scheduler = EulerDiscreteScheduler.from_config(pipeline.scheduler.config)
365366

366367
# This is a list of prompts

neural_compressor/torch/quantization/config.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ def __new__(
20962096
else:
20972097
config_cls = self._model_mapping[STATIC_QUANT]
20982098
return config_cls(*args, **kwargs)
2099-
2099+
21002100
@classmethod
21012101
def get_config_set_for_tuning(cls, dtype="int8"):
21022102
"""Map to different config set for tuning."""

0 commit comments

Comments
 (0)