Conversation
OverviewAnalysis of 49,755 functions across two binaries reveals mixed performance impacts from adding ANIMA model support. Modified: 122 functions, new: 1,454, removed: 4, unchanged: 48,175. Binaries analyzed:
The single commit "add anima" introduces a new diffusion model architecture through additive changes (774-line anima.hpp, model detection logic). Performance changes stem primarily from compiler optimization artifacts rather than algorithmic modifications. Function AnalysisSTL Vector Accessors - Improvements:
These improvements benefit model loading and backend initialization through better compiler code generation for simple template types. STL Vector Accessors - Regressions:
Complex nested template types suffer from optimization challenges, affecting AnimaConditioner initialization. Model Detection Logic:
Functionally justified regression from adding ANIMA classification check, enabling DiT optimizations for the new model. Memory Management:
Construction shows throughput regressions confined to function prologues; destruction improves significantly. Other analyzed functions (std::swap, thread::joinable, file I/O operations) showed minor regressions (8-59% throughput increases, 9-76ns absolute) attributable to compiler optimization variations rather than source changes. Additional FindingsPerformance changes are isolated to initialization and utility code; inference hot paths remain unaffected. The analyzed functions do not involve GPU kernel execution—impacts are limited to model loading, backend registration, and object lifecycle management. The 1.5% power consumption increase is negligible compared to actual inference costs. ANIMA integration successfully leverages existing DiT optimization infrastructure (EasyCache, CacheDIT) with minimal overhead. 🔎 Full breakdown: Loci Inspector |
Note
Source pull request: leejet/stable-diffusion.cpp#1296
For leejet/stable-diffusion.cpp#1245
./build/bin/sd-cli --diffusion-model models/anima-preview.safetensors --llm models/qwen_3_06b_base.safetensors --vae models/qwen_image_vae.safetensors -p "a cute cat" --fa -v -H 1024 -W 1024 --cfg-scale 4Download model: https://huggingface.co/circlestone-labs/Anima/tree/main/split_files
Output eg: