bdunderscore / modular-avatar

Other
476 stars 61 forks source link

RenameParametersHook runs a parameter cost validation too early #643

Open hai-vr opened 7 months ago

hai-vr commented 7 months ago

I am experimenting with a NDMF optimization plugin that could turn rarely-updated synced parameters into local parameters, and sync them using a multiplexer, in order to let the avatar build with synced parameters above the current hard limit of 256 bits.

In RenameParametersHook.cs:199, there is a validation checking that the total bits used by synced parameters is within legal bounds.

However, this validation phase runs before the NDMF BuildPhase.Optimizing phase, which can potentially reduce the number of synced parameters within legal bounds.

This prematurely marks the avatar as not being successful.

Would it be possible to defer, mute, or address this validation phase?

bdunderscore commented 7 months ago

I’ll move this to NDMF and execute it at int.MaxValue I think.