Skip to content

Commit fea0615

Browse files
committed
dreambooth #1566: fixed formatting reported by 'black' build check
1 parent ae306ef commit fea0615

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/dreambooth/train_dreambooth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,10 @@ def main(args):
684684
# it, the models will be unwrapped, and when they are then used for further training,
685685
# we will crash. pass this, but only to newer versions of accelerate. fixes
686686
# https://github.com/huggingface/diffusers/issues/1566
687-
accepts_keep_fp32_wrapper = 'keep_fp32_wrapper' in set(inspect.signature(accelerator.unwrap_model).parameters.keys())
688-
extra_args = {'keep_fp32_wrapper': True} if accepts_keep_fp32_wrapper else {}
687+
accepts_keep_fp32_wrapper = "keep_fp32_wrapper" in set(
688+
inspect.signature(accelerator.unwrap_model).parameters.keys()
689+
)
690+
extra_args = {"keep_fp32_wrapper": True} if accepts_keep_fp32_wrapper else {}
689691
pipeline = DiffusionPipeline.from_pretrained(
690692
args.pretrained_model_name_or_path,
691693
unet=accelerator.unwrap_model(unet, **extra_args),

0 commit comments

Comments
 (0)