Pi0.5 JAX RTX frontend fails to load on RTX 5090
Problem
The Pi0.5 JAX RTX frontend cannot load on RTX 5090. Affected route:
config="pi05" framework="jax" hardware="rtx_sm120"
With default FP8 settings, load_model() fails because _decoder_kernel is missing
With use_fp8=False, model construction succeeds, but set_prompt() fails because _lifecycle_lock is missing
I reproduced both errors 3 times in fresh containers
Environment
- FlashRT commit: 66b18eb766e73e2fcad406bc622bd3bfd70664c1
- GPU: one NVIDIA GeForce RTX 5090
- Compute capability: SM 12.0
- OS: Ubuntu 22.04
- NVIDIA driver: 580.126.09
- CUDA: 13.0
- PyTorch: 2.9.0a0+145a3a7bda.nv25.10
- JAX: 0.5.3
- Orbax: 0.11.24
- Build target: SM120 with GPU_ARCH=120
- Checkpoint: official OpenPI Pi0.5 LIBERO Orbax checkpoint
- btw. No local changes to the related Python files
Reproduce
I execuated belowing code in terminal:
CUDA_VISIBLE_DEVICES=0 JAX_PLATFORMS=cpu python - <<'PY'
import flash_rt
print("Loading Pi0.5 JAX checkpoint")
model = flash_rt.load_model(
checkpoint="/models/pi05_libero",
config="pi05",
framework="jax",
hardware="rtx_sm120",
num_views=2,
)
print("Model loaded")
PY
JAX_PLATFORMS=cpu is only used for Orbax checkpoint loading. The frontend still converts the weights to Torch CUDA tensors and runs the FP8 path on RTX 5090. The same error also happens without this setting.
Error output
Loading Pi0.5 JAX checkpoint
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
File "/workspace/FlashRT/flash_rt/api.py", line 1209, in load_model
pipe = pipe_cls(checkpoint, **kwargs)
File "/workspace/FlashRT/flash_rt/frontends/jax/pi05_rtx.py", line 538, in __init__
self._quantize_all_fp8()
File "/workspace/FlashRT/flash_rt/frontends/torch/pi05_rtx.py", line 996, in _quantize_all_fp8
if self.fp8_layout == "kn" and self._skinny_weights_wanted():
File "/workspace/FlashRT/flash_rt/frontends/torch/pi05_rtx.py", line 1221, in _skinny_weights_wanted
if not self.use_fp8 or self._decoder_kernel == "cublaslt":
AttributeError: 'Pi05JaxFrontendRtx' object has no attribute '_decoder_kernel'
The process exits with code 1
Possible cause
Pi05JaxFrontendRtx inherits runtime methods from Pi05TorchFrontendRtx.
It has its own __init__() because JAX uses an Orbax checkpoint while Torch uses safetensors
The JAX constructor copies part of the Torch initialization logic, but some newer fields were not added to it. At least these required fields are missing:
_decoder_kernel_lifecycle_lock_reload_failed
The current constructor parity test only checks an older set of fields, so it does not catch this problem. This issue is for the Pi0.5 JAX RTX frontend only
Expected result
load_model() should return the Pi0.5 JAX RTX frontend successfully.
btw. No latency or precision result is available because the model fails before inference starts
Hi @LiangSu8899 , thanks for taking this issue and separating the Docker/JAX environment work into #226 . I opened #227 with the focused fix discussed above
I tested a focused fix on RTX 5090. It keeps the Orbax loader unchanged and merely syncs the missing constructor arguments and runtime state from Pi05TorchFrontendRtx to Pi05JaxFrontendRtx. With this patch:
- default FP8
load_model()succeeds use_fp8=Falsewithset_prompt()succeeds- the public predict() API completed two inference runs with finite (10, 7) action
For this issue, I prefer to keep the fix small and avoid changing the stable Torch loading path 🤔. Later, I think we can refactor the shared initialization, so JAX only needs to provide the Orbax loading part. This should prevent the two constructors from drifting again, although I have not worked out exactly how to implement it yet 😳
Thanks for the fix and testing! Really appreciate it!
I've also been thinking about the long-term JAX integration and maintenance in FlashRT. Agree that sharing the initialization logic rather than duplicating it across frontends makes much more sense.
Let's keep this PR focused on the fix for now. And I'll also look into a cleaner shared structure as part of the upcoming Docker packaging updates. Thanks again!