Skip to content

cua_s1: preprocess RGB images for native vision on CPU - #63

Draft
Levius-Fubuki wants to merge 2 commits into
ThinkFlowLab:mainfrom
Levius-Fubuki:codex/cua-image-preprocess
Draft

Levius-Fubuki wants to merge 2 commits into
ThinkFlowLab:mainfrom
Levius-Fubuki:codex/cua-image-preprocess

Conversation

@Levius-Fubuki

@Levius-Fubuki Levius-Fubuki commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Purpose

Add image_preprocess::preprocess_rgb8(width, height, rgb) to produce float32 pixel values, image grids, resized dimensions and image-token counts. Implement smart resize, antialiased uint8 bicubic resampling, normalization, merge ordering and temporal patch repetition with validated geometry and buffer lengths.

The diff contains the implementation, its public module export and required upstream copyright/license notices. No runtime dependency is added.

Validation

After cleanup: workspace formatting, strict all-target Clippy, workspace tests and the locked release build passed. 25 tests passed; 3 existing GPU tests and 2 external-checkpoint tests skipped. Runtime source was compared against the previous head: only new trailing test modules were removed; production code is unchanged. Existing baseline tests remain.

Feature-specific tests, examples, documentation and validation assets were removed from this PR diff to keep it focused on core implementation. They remain in the pre-cleanup commit and a local archive.

Before cleanup, 14 reference cases and 24 held-out cases matched every float32 output byte from the pinned CPU processor; seven preprocessing integration tests passed. Those historical checks used the pre-cleanup test harness.

Self-review

Cleanup reviewed for unchanged runtime code, retained licensing and valid build targets. Draft status is retained for contributor/maintainer review.

  • I have reviewed the full diff and addressed the issues I found.
  • I have checked that the change follows the project's architecture and stays focused on the stated purpose.
  • I have run the checks appropriate to this change and reported commands, results, and anything I could not verify above.
  • I have checked that the PR description, documentation, and any accuracy or performance claims match the implementation and available evidence.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant