mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
simplify logic around negative seeds
This commit is contained in:
parent
8a0a90d0f3
commit
67e25624b9
@ -564,17 +564,11 @@ class Generate:
|
|||||||
prompt = None
|
prompt = None
|
||||||
|
|
||||||
args = metadata_from_png(image_path)
|
args = metadata_from_png(image_path)
|
||||||
if opt.seed is not None:
|
seed = opt.seed or args.seed
|
||||||
seed = opt.seed
|
if seed is None or seed < 0:
|
||||||
elif args.seed >= 0:
|
|
||||||
seed = args.seed
|
|
||||||
else:
|
|
||||||
seed = random.randrange(0, np.iinfo(np.uint32).max)
|
seed = random.randrange(0, np.iinfo(np.uint32).max)
|
||||||
|
|
||||||
if opt.prompt is not None:
|
prompt = opt.prompt or args.prompt or ''
|
||||||
prompt = opt.prompt
|
|
||||||
else:
|
|
||||||
prompt = args.prompt
|
|
||||||
|
|
||||||
print(f'>> using seed {seed} and prompt "{prompt}" for {image_path}')
|
print(f'>> using seed {seed} and prompt "{prompt}" for {image_path}')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user