Revert "enable outcropping of random JPG/PNG images"

This reverts commit 48aa6416dc.
This commit is contained in:
Lincoln Stein
2022-11-11 10:30:44 -05:00
committed by GitHub
parent 1fb7b50be7
commit 78f7bef1a3
5 changed files with 12 additions and 17 deletions

View File

@ -566,13 +566,12 @@ class Generate:
args = metadata_from_png(image_path)
seed = args.seed
prompt = args.prompt or ''
if seed == 0:
seed = random.randrange(0, np.iinfo(np.uint32).max)
opt.seed = seed
print(f'>> generated new seed {seed} and prompt "{prompt}" for {image_path}')
else:
print(f'>> retrieved seed {seed} and prompt "{prompt}" from {image_path}')
prompt = args.prompt
print(f'>> retrieved seed {seed} and prompt "{prompt}" from {image_path}')
if not seed:
print('* Could not recover seed for image. Replacing with 42. This will not affect image quality')
seed = 42
# try to reuse the same filename prefix as the original file.
# we take everything up to the first period