GeniusVentures / GeniusVentures/SGProcessingManager
Fix pass/input indexing and remove model-only execution assumptions
Open
@itsafuu is already working on this.
Since Jul 28, 2026.
- Dominant language
- C++
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Problem
SGProcessingManager currently mixes input indexes with pass indexes and assumes every pass has a model.
Confirmed examples:
GetCidForProc()resolves an input index withGetInputIndex()and then uses that index to accessprocessing_.get_passes()[index].ParseBlockSize()callspass.get_model().value()for every pass, even thoughCOMPUTE,DATA_TRANSFORM, andRENDERpasses are allowed without a model.- Several optional fields are accessed through
.value()without pass-specific validation.
These assumptions can select the wrong pass, access an out-of-range pass, or fail on valid non-inference jobs.
Scope
- Give passes stable indexes or IDs independent of global input indexes.
- Resolve inputs through each pass's declared bindings.
- Remove unconditional model access from generic processing paths.
- Make block-size and subdivision logic depend on the active pass and its bound resources.
- Add bounds checks and useful errors for missing pass, input, output, model, shader, dimensions, and source fields.
- Preserve current MNN inference behavior while making non-model pass types safe.
Acceptance criteria
- Jobs with different numbers of passes and global inputs resolve the correct pass and resources.
COMPUTE,DATA_TRANSFORM, andRENDERdefinitions do not fail merely because they lack a model.- Invalid references return typed errors rather than throwing or reading the wrong array element.
- Tests cover one-to-many and many-to-one input/pass layouts, missing optionals, and out-of-range references.
Base implementation and review work on the branch consumed by SuperGenius/develop.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.