mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
include width and height in png dream prompt
This commit is contained in:
parent
b89aadb3c9
commit
5b692f4720
7
scripts/dream.py
Normal file → Executable file
7
scripts/dream.py
Normal file → Executable file
@ -100,6 +100,7 @@ def main_loop(gen, opt, infile):
|
|||||||
done = False
|
done = False
|
||||||
path_filter = re.compile(r'[<>:"/\\|?*]')
|
path_filter = re.compile(r'[<>:"/\\|?*]')
|
||||||
last_results = list()
|
last_results = list()
|
||||||
|
model_config = OmegaConf.load(opt.conf)[opt.model]
|
||||||
|
|
||||||
# os.pathconf is not available on Windows
|
# os.pathconf is not available on Windows
|
||||||
if hasattr(os, 'pathconf'):
|
if hasattr(os, 'pathconf'):
|
||||||
@ -138,6 +139,12 @@ def main_loop(gen, opt, infile):
|
|||||||
print('\nTry again with a prompt!')
|
print('\nTry again with a prompt!')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
# width and height are set by model if not specified
|
||||||
|
if not opt.width:
|
||||||
|
opt.width = model_config.width
|
||||||
|
if not opt.height:
|
||||||
|
opt.height = model_config.height
|
||||||
|
|
||||||
# retrieve previous value!
|
# retrieve previous value!
|
||||||
if opt.init_img is not None and re.match('^-\\d+$', opt.init_img):
|
if opt.init_img is not None and re.match('^-\\d+$', opt.init_img):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user