Summary
klearu-image's CLI feature does not enable the downstream diffusion image-I/O feature required by img_sample's Rust PNG path.
Evidence
img_sample calls klearu_diffusion::image_io::save_png.
- The working
save_png implementation is gated by klearu-diffusion/image-io; otherwise a runtime fallback always returns an unsupported-feature error.
klearu-image currently defines cli = ["dep:image"] but does not include klearu-diffusion/image-io.
The binary can compile while retaining a PNG path that always fails at runtime in a package-only build.
Proposed resolution
- Change the feature to propagate
klearu-diffusion/image-io.
- Add
required-features = ["cli"] to binaries that actually require image I/O.
- Remove a redundant direct
image dependency if it is not otherwise used.
Acceptance criteria
- A package-only
cargo run -p klearu-image --features cli --bin img_sample ... can write a PNG.
- A small feature-gated test exercises PNG encode/read behavior.
- Building without
cli either omits the binary or reports the requirement at build time rather than late runtime.
Summary
klearu-image's CLI feature does not enable the downstream diffusion image-I/O feature required byimg_sample's Rust PNG path.Evidence
img_samplecallsklearu_diffusion::image_io::save_png.save_pngimplementation is gated byklearu-diffusion/image-io; otherwise a runtime fallback always returns an unsupported-feature error.klearu-imagecurrently definescli = ["dep:image"]but does not includeklearu-diffusion/image-io.The binary can compile while retaining a PNG path that always fails at runtime in a package-only build.
Proposed resolution
klearu-diffusion/image-io.required-features = ["cli"]to binaries that actually require image I/O.imagedependency if it is not otherwise used.Acceptance criteria
cargo run -p klearu-image --features cli --bin img_sample ...can write a PNG.clieither omits the binary or reports the requirement at build time rather than late runtime.