File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
examples/advanced_diffusion_training Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1057,7 +1057,7 @@ def __init__(
1057
1057
if interpolation is None :
1058
1058
raise ValueError (f"Unsupported interpolation mode { interpolation = } ." )
1059
1059
train_resize = transforms .Resize (size , interpolation = interpolation )
1060
- train_crop = transforms .CenterCrop (size ) if center_crop else transforms .RandomCrop (size )
1060
+ train_crop = transforms .CenterCrop (size ) if args . center_crop else transforms .RandomCrop (size )
1061
1061
train_flip = transforms .RandomHorizontalFlip (p = 1.0 )
1062
1062
train_transforms = transforms .Compose (
1063
1063
[
@@ -1101,7 +1101,7 @@ def __init__(
1101
1101
self .image_transforms = transforms .Compose (
1102
1102
[
1103
1103
transforms .Resize (size , interpolation = interpolation ),
1104
- transforms .CenterCrop (size ) if center_crop else transforms .RandomCrop (size ),
1104
+ transforms .CenterCrop (size ) if args . center_crop else transforms .RandomCrop (size ),
1105
1105
transforms .ToTensor (),
1106
1106
transforms .Normalize ([0.5 ], [0.5 ]),
1107
1107
]
You can’t perform that action at this time.
0 commit comments