anima_closeout v19: the bed's NaN was AUTOCAST_DTYPE. utils/common.py defines it as None and train.py sets it at :287 (common.AUTOCAST_DTYPE = config['model']['dtype']) BEFORE importing any model module — models/*.py do `from utils.common import AUTOCAST_DTYPE` and bake the value into their
@torch .autocast decorators at class-definition time. The bed never set it, so every layer ran under autocast(dtype=None), which resolves to FP16 on cuda (verified: fast_dtype == float16), and the bf16-trained 2B DiT overflowed to NaN — the 'DETERMINISM FAILED' assert was just nan != nan. Bed now sets bf16 immediately after importing utils.common with an assert that no model module is loaded yet, and eval_arm raises a real numerics error on any non-finite loss instead of misreporting determinism.