Commit Graph

4 Commits

Author SHA1 Message Date
Michele Rossi
9c4474b93c docs: add optimization-decisions analysis, update README future plans
Detail the shared-encode and torch.compile tradeoffs with data-driven
estimates from the pipeline code. Shared encode saves ~1.2-2.3s per
variant (2-4% total) and is deferred; torch.compile needs a 30-minute
ROCm spike before deciding. Update Current State and Future Improvements
to reflect the analysis.
2026-07-08 16:10:46 +02:00
Michele Rossi
97ac841518 Add VnAssetsSession for persistent model lifecycle
- Extract model loading from generate()/edit() into VnAssetsSession class
- Session eagerly loads SDXL + Qwen Image Edit at construction (28s, once)
- Both models held in GPU memory across calls; generate()/edit() reuse them
- generate.py and edit.py become thin wrappers (backwards compatible CLI)
- Context manager (with VnAssetsSession(...) as vna:) for library use
- Metadata backwards-compatible: all fields preserved including lora_load_s
- load_time_s now reflects total session construction, amortized across calls

- Add performance stats for edit path (Qwen Image Edit + Lightning LoRA)
- Benchmark matmul fallback (86.8s) vs flash attention (53.3s, 1.63x speedup)
- Session vs cold start comparison: 2 ops save one 28s load, 5 edits save 112s
- Flash attention via TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 documented
2026-07-08 10:18:42 +02:00
Michele Rossi
e7cde842b3 Improve doc, cleanup 2026-07-08 09:13:46 +02:00
Michele Rossi
9564202e6d feat: add ComfyUI-style prompt weighting via compel
- Support (word:weight), [word], ((nested)) syntax
- Support BREAK for conditioning chunking (.and() translation)
- Use CompelForSDXL (modern API, avoids deprecation)
- Add --raw flag to bypass weighting and fall back to plain encoding
- Update README with Prompt Syntax section and examples
- Add docs/comfyui-prompt-style.md with design doc
2026-07-07 16:16:54 +02:00