Skip to content

Commit 2612a51

Browse files
committed
fix remaining issues with transparencies when generating and training DALL-E
1 parent a6776c8 commit 2612a51

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def exists(val):
135135
outputs_dir.mkdir(parents = True, exist_ok = True)
136136

137137
for i, image in tqdm(enumerate(outputs), desc = 'saving images'):
138-
save_image(image, outputs_dir / f'{i}.jpg', normalize=True)
138+
save_image(image, outputs_dir / f'{i}.png', normalize=True)
139139
with open(outputs_dir / 'caption.txt', 'w') as f:
140140
f.write(file_name)
141141

train_dalle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,7 @@ def cp_path_to_dir(cp_path, tag):
318318

319319
IMAGE_SIZE = vae.image_size
320320
CHANNELS = vae.channels
321+
TRANSPARENT = CHANNELS == 4
321322
IMAGE_MODE = 'RGBA' if CHANNELS == 4 else 'RGB'
322323

323324
# configure OpenAI VAE for float16s

0 commit comments

Comments
 (0)