File tree 3 files changed +3
-1
lines changed
examples/3.x_api/pytorch/diffusion_model/diffusers/stable_diffusion/smooth_quant
neural_compressor/torch/quantization
3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ def __call__(
400
400
torch_dtype = dtype ,
401
401
use_safetensors = True ,
402
402
)
403
+ pipe = pipe .to (dtype ) # Ensure all modules are set as dtype
403
404
pipe .scheduler = EulerDiscreteScheduler .from_config (pipe .scheduler .config )
404
405
405
406
if args .refiner :
Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ def main():
361
361
torch_dtype = dtype ,
362
362
use_safetensors = True ,
363
363
)
364
+ pipeline = pipeline .to (dtype ) # Ensure all modules are set as dtype
364
365
pipeline .scheduler = EulerDiscreteScheduler .from_config (pipeline .scheduler .config )
365
366
366
367
# This is a list of prompts
Original file line number Diff line number Diff line change @@ -2096,7 +2096,7 @@ def __new__(
2096
2096
else :
2097
2097
config_cls = self ._model_mapping [STATIC_QUANT ]
2098
2098
return config_cls (* args , ** kwargs )
2099
-
2099
+
2100
2100
@classmethod
2101
2101
def get_config_set_for_tuning (cls , dtype = "int8" ):
2102
2102
"""Map to different config set for tuning."""
You can’t perform that action at this time.
0 commit comments