Skip to content

Commit 1a1857c

Browse files
committed
fix style
1 parent b5bf4cf commit 1a1857c

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

src/diffusers/loaders/single_file_model.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -258,16 +258,12 @@ def from_single_file(cls, pretrained_model_link_or_path_or_dict: Optional[str] =
258258
from nunchaku import NunchakuFluxTransformer2dModel
259259

260260
kwargs.pop("quantization_config", None)
261-
return NunchakuFluxTransformer2dModel.from_pretrained(
262-
pretrained_model_link_or_path_or_dict, **kwargs
263-
)
261+
return NunchakuFluxTransformer2dModel.from_pretrained(pretrained_model_link_or_path_or_dict, **kwargs)
264262
elif "SanaTransformer2DModel" in cls.__name__:
265263
from nunchaku import NunchakuSanaTransformer2DModel
266264

267265
kwargs.pop("quantization_config", None)
268-
return NunchakuSanaTransformer2DModel.from_pretrained(
269-
pretrained_model_link_or_path_or_dict, **kwargs
270-
)
266+
return NunchakuSanaTransformer2DModel.from_pretrained(pretrained_model_link_or_path_or_dict, **kwargs)
271267
else:
272268
raise NotImplementedError(f"SVDQuant loading is not implemented for {cls.__name__}")
273269

src/diffusers/quantizers/quantization_config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,7 @@ def post_init(self):
726726
if self.weights_dtype not in accepted_weights:
727727
raise ValueError(f"Only support weights in {accepted_weights} but found {self.weights_dtype}")
728728

729+
729730
@dataclass
730731
class SVDQuantConfig(QuantizationConfigMixin):
731732
"""Config for SVDQuant models. This is a placeholder for loading pre-quantized nunchaku models."""
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from .svdquant_quantizer import SVDQuantizer
1+
from .svdquant_quantizer import SVDQuantizer

src/diffusers/quantizers/svdquant/svdquant_quantizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ def is_serializable(self):
4040

4141
@property
4242
def is_trainable(self):
43-
return False
43+
return False

src/diffusers/utils/import_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ def is_nunchaku_available():
562562
"""
563563

564564
NUNCHAKU_IMPORT_ERROR = """
565-
{0} requires the nunchaku library but it was not found in your environment. You can install it with pip: `pip install nunchaku`
565+
{0} requires the nunchaku library but it was not found in your environment. You can install it with pip: `pip install
566+
nunchaku`
566567
"""
567568

568569

0 commit comments

Comments
 (0)