Archived
ops+minimaxh3+driver: the condition-noise augmentation the reference adds to visual cond rows
The reference's _cond_video_rows runs every visual conditioning latent through x = aug x + (1 - aug) z at VISUAL_COND_TIMESTEP 0.999, its generator restarted per item, while audio conditioning is untouched (its aug is 1.0, a no-op). We staged the clean latent instead, so every image-, keyframe- and reference- conditioned render started from un-augmented conditioning. New op cond_aug: x = f32(f32(a x) + f32(oma z)), a the aug parameter and oma the f32 of the double 1 - aug -- the reference subtracts in double and rounds once -- with z the (seed, stream) normal stream at element k n + c on stream 2, the reference's noise never sharing the generator that fills x. Seed words 0-1 of the video's seed, per-item restart by per-row offset. Issued once at the end of step_venc over the conditioning rows: staging once at encode-build time is equivalent to the reference's per-call restart because each item's rows are exactly its own, and the driver's build_encode now re-stages the seed, where a stale lane's words used to ride through. Reference RNG is MT19937 and ours Philox, so the noise is distributionally faithful, not bit-exact. ABI unchanged at 28. Device: r4d_selftest 0 failures, cond_aug rows 1.13e-9/4.42e-8 rel_l2 against libref. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1 parent
8c547fe240
commit
47b7aae7a3
16 files changed
+320
-4
No files matched your search
@@ -3143,6 +3143,17 @@ int ref_flow_renoise_shape(const RadParam* p, int n_p, int operand, RadOpdDesc*
|
||||
return o.finish("flow_renoise", operand, out);
|
||||
}
|
||||
|
||||
/* aug in [0, 1); the condition rows f32. */
|
||||
int ref_cond_aug_shape(const RadParam* p, int n_p, int operand, RadOpdDesc* out) {
|
||||
const int64_t M = gi(p, n_p, "M", 0), n = gi(p, n_p, "n", 0);
|
||||
const double aug = rad_param_getf(p, n_p, "aug", -1.0);
|
||||
if (M <= 0 || n <= 0 || !(aug >= 0.0 && aug < 1.0)) return RAD_E_UNSUPPORTED;
|
||||
Opd o;
|
||||
o.t_idx({ 2 }, (int64_t)1 << 30, -1, 0); /* seed: two words */
|
||||
o.t((uint32_t)RAD_F32, { M, n }); /* x, INOUT */
|
||||
return o.finish("cond_aug", operand, out);
|
||||
}
|
||||
|
||||
/* ================================================================== video sparse attention
|
||||
*
|
||||
* The tiles come from the values of `segs` and `geom`, which a description draws only as
|
||||
|
||||
Reference in new issue
Block a user