Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion guided_diffusion/image_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _list_image_files_recursively(data_dir):
for entry in sorted(bf.listdir(data_dir)):
full_path = bf.join(data_dir, entry)
ext = entry.split(".")[-1]
if "." in entry and ext.lower() in ["jpg", "jpeg", "png", "gif"]:
if "." in entry and ext.lower() in ["jpg", "jpeg", "png", "gif", "webp"]:
results.append(full_path)
elif bf.isdir(full_path):
results.extend(_list_image_files_recursively(full_path))
Expand Down
3 changes: 3 additions & 0 deletions guided_diffusion/script_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def model_and_diffusion_defaults():
resblock_updown=False,
use_fp16=False,
use_new_attention_order=False,
random_crop=False,
)
res.update(diffusion_defaults())
return res
Expand Down Expand Up @@ -95,6 +96,7 @@ def create_model_and_diffusion(
resblock_updown,
use_fp16,
use_new_attention_order,
**kwargs
):
model = create_model(
image_size,
Expand Down Expand Up @@ -300,6 +302,7 @@ def sr_create_model_and_diffusion(
use_scale_shift_norm,
resblock_updown,
use_fp16,
**kwargs
):
model = sr_create_model(
large_size,
Expand Down
2 changes: 2 additions & 0 deletions scripts/image_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def main():
batch_size=args.batch_size,
image_size=args.image_size,
class_cond=args.class_cond,
random_crop=args.random_crop,
)

logger.log("training...")
Expand Down Expand Up @@ -72,6 +73,7 @@ def create_argparser():
resume_checkpoint="",
use_fp16=False,
fp16_scale_growth=1e-3,
random_crop=False,
)
defaults.update(model_and_diffusion_defaults())
parser = argparse.ArgumentParser()
Expand Down