Use enriched prompt suffix in generation functions
This commit is contained in:
@@ -545,6 +545,7 @@ def generate(
|
|||||||
height: int = 512,
|
height: int = 512,
|
||||||
seam_inpaint: bool = False,
|
seam_inpaint: bool = False,
|
||||||
) -> str:
|
) -> str:
|
||||||
|
prompt = enrich_prompt(prompt)
|
||||||
model_path = resolve_generation_model_path(model_path, work_dir)
|
model_path = resolve_generation_model_path(model_path, work_dir)
|
||||||
|
|
||||||
device = select_device()
|
device = select_device()
|
||||||
@@ -868,13 +869,14 @@ def main():
|
|||||||
print(f"Generation failed: {e}")
|
print(f"Generation failed: {e}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
base = sanitize_name(args.prompt)
|
prompt = enrich_prompt(args.prompt)
|
||||||
|
base = sanitize_name(prompt)
|
||||||
target = args.output or next_filename(args.output_dir, base, args.width, args.height)
|
target = args.output or next_filename(args.output_dir, base, args.width, args.height)
|
||||||
output_abs = os.path.abspath(target)
|
output_abs = os.path.abspath(target)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
result_path = generate(
|
result_path = generate(
|
||||||
args.prompt,
|
prompt,
|
||||||
output_abs,
|
output_abs,
|
||||||
args.work_dir,
|
args.work_dir,
|
||||||
upscale=args.upscale,
|
upscale=args.upscale,
|
||||||
|
|||||||
Reference in New Issue
Block a user