Commit Graph

4 Commits

Author SHA1 Message Date
7749d5ec35 Fix image detection and LoRA loading to match training notebook
app.py: check the known save path directly instead of parsing stdout
(broken after PR #21 removed the print statement).

card_generator_adapter.py: two mismatches with the training notebook:
1. LoRA loading used pipe.load_lora_weights() (diffusers format) but the
   adapter was saved with PEFT's save_pretrained() — keys didn't match.
   Now uses PeftModel.from_pretrained() + merge_and_unload().
2. Conditioning built a natural language prompt, but the LoRA was trained
   on json.dumps(meta). Now uses JSON serialization to match.
2026-03-20 00:24:25 +01:00
577308af17 fix: extract image path from prefixed stdout line
_extract_image_from_stdout() failed to find the generated image because
the pipeline prints "Card generated and saved to: generated_card.png"
but the function only tried the full line as a path. Now also tries the
part after the last colon.
2026-03-19 19:12:29 +01:00
94b927c06b fix: broken subprocess command and tuple unpacking in app.py
Fix two critical bugs that made the Streamlit app completely non-functional:

1. Split subprocess command into properly separated list elements and use
   sys.executable instead of hardcoded "python" (#1)
2. Unpack all 3 return values from run_prompt_pipeline() (#2)

Closes #1, closes #2
2026-03-19 18:42:25 +01:00
584b2e07b4 first commit 2026-03-19 18:16:20 +01:00