Skip to content

klearu-image CLI does not propagate diffusion image-io feature #8

Description

@blacks1ne

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions