Use enriched prompt suffix in generation functions

This commit is contained in:
2026-05-07 16:19:07 +02:00
parent e428c509d7
commit ac98a4de0f

View File

@@ -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,