Skip to content

Commit 0a87139

Browse files
authored
Update main.py (#2353)
1 parent 8564f48 commit 0a87139

File tree

1 file changed

+1
-2
lines changed
  • examples/pytorch/diffusion_model/diffusers/flux

1 file changed

+1
-2
lines changed

examples/pytorch/diffusion_model/diffusers/flux/main.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ def tune():
122122
if args.inference:
123123
pipe = AutoPipelineForText2Image.from_pretrained(args.model, torch_dtype=torch.bfloat16)
124124

125-
if not os.path.exists(args.output_image_path):
126-
os.makedirs(args.output_image_path)
125+
os.makedirs(args.output_image_path, exist_ok=True)
127126

128127
if os.path.exists(args.output_dir) and os.path.exists(os.path.join(args.output_dir, "diffusion_pytorch_model.safetensors.index.json")):
129128
print(f"Loading quantized model from {args.output_dir}")

0 commit comments

Comments
 (0)