Manuscript Offprint
arXiv:2611.23151stable-envs-v1: Fast and Reproducible Environments with Controllable Variations
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Training World Models (WMs) relies on processing large amounts of high-dimensional data, which typically needs to be stored, read into memory, and moved from memory to compute units. In principle, GPU-native rendering avoids this movement of large image tensors from memory to compute cores, allowing for better GPU utilization, and training speed-ups. Rendering on-demand also allows to control perceptual appearance through the application of visual variations on-the-fly, allowing for higher diversity in training. To this end, we introduce stable-envs, an open-source library for fast, GPU-native rendering allowing to apply controllable variations on multiple simulation environments. By rendering image observations directly on GPU, stable-envs allows end-to-end training speed-ups of up to , with no loss of performance. Besides faster training runs, stable-envs also enables reproducible, large-scale evaluations through batched physics while maintaining full determinism. stable-envs currently supports 80 simulation environments across multiple CPU- and GPU-backends, and is openly available at: https://github.com/galilai-group/stable-envs.

Figure 1: stable-envs is an open-source library for batched, on-GPU rendering of simulation environments. It supports a growing number of environments, enables up to 8.5x speedups in rendering, and allows controlled visual variations given the same underlying physical state.
1 Introduction
Pixel-based World Models (WMs) learn environmental dynamics solely from visual observations. In practice, training WMs from image frames requires efficiently processing large amounts of high-dimensional image data, collected (1) online, interacting with an environment (Ha and Schmidhuber, 2018; Hafner et al., 2019; Hafner et al., 2025), (2) offline, via a behavior policy used to collect trajectories (Zhou et al., 2024; Sobal et al., 2026; Maes et al., 2026b), or (3) both. Regardless of its source, image data can be challenging to process: even compact WMs trained on medium-sized, task-specific datasets such as Maes et al. (2026b, LeWM), can require processing 200GB of image data.. Storing and processing such volumes for simple environments (e.g., maze navigation) can be challenging in practice, and potentially prohibitive for complex environments, e.g. high-fidelity robotics simulators, e.g. Mittal et al. (2025).
To mitigate these storage requirements, open-source libraries built for training models from pixel-space trajectories often store visual observations as compressed videos, which are then decoded into individual frames before or during training, e.g., Cadene et al. (2026). While effective for storage, video decoding introduces additional overhead: loading, decoding, and storing individual frames ahead of training can take several hours for large datasets. Streaming decoded frames concurrently with model updates can avoid this time-consuming pre-processing step, but requires carefully balancing frame production and consumption to prevent GPU under-utilization. Crucially, both approaches typically still require transferring decoded frames from CPU to GPU, introducing additional data-movement overhead.
For WMs trained in simulation, rendering observations (1) on-the-fly and (2) directly on the GPU avoids storing large image datasets and transferring image tensors between CPU and GPU. However, rendering can itself become a training bottleneck, making frame throughput critical for efficient training. Existing libraries typically achieve high throughput through CPU-based environment vectorization and parallelization (Raffin et al., 2021; Towers et al., 2026; Weng et al., 2022). While effective at scaling environment execution, these approaches do not necessarily accelerate individual environments and can incur substantial overhead when generating and transferring large image tensors to the GPU. Other frameworks, such as Isaac Lab (Mittal et al., 2025), ManiSkill3 (Tao et al., 2025), and MuJoCo Playground (Zakka et al., 2025), leverage GPU-accelerated simulation and rendering to achieve high throughput across many environments on the GPU. However, these frameworks often rely on specialized simulation backends and hardware requirements, limiting portability across research workflows—e.g., Isaac Lab’s GPU renderer is not supported by Hopper-class NVIDIA GPUs (e.g., H100) nor macOS.
To mitigate these scalability and accessibility issues, we introduce stable-envs, a lightweight, research-friendly library, designed for fast and reproducible GPU-native rendering across multiple simulation environments. For each supported environment, we port or re-implement the original physics simulation and expose its complete internal state, enabling (1) fast rendering (2) exact state saving and restoration for reproducibility and (3) controllable visual variations behind a single, shared API. In summary, our contributions are:
- Fast, reproducible, and controllable environment rendering. Through optimizations such as batched rendering and custom GPU kernels, stable-envs achieves up to 8.5x higher environment throughput than CPU-native baselines. By exposing the full simulator state, stable-envs also enables exact state restoration and independent sampling of visual factors of variation, allowing fully-reproducible experiments under controlled visual changes.
- A comprehensive, GPU-native simulation library. stable-envs currently supporting 80 simulation environments used for world-model research. All environments support batched physics stepping and rendering on the GPU, allowing for efficient training and evaluation of pixel-based WMs.
- Accelerated end-to-end world-model training. Thanks to on-the-fly and on-GPU rendering, stable-envs enables up to 1.33x faster training of WMs through stable-worldmodel (Maes et al., 2026a), with no degradation in downstream planning performance.
Listing 1: Step multiple batched environments.
⬇
import stable_envs as snv
env = snv.PushT(num_envs=256, device="cuda")
env.reset(seed=0)
Batched-physics, optional rendering
with_frames = env.step(actions, frames=slice(None))
no_frames = env.step(actions, frames=None) # 1.7x
Listing 2: Apply controlled visual variations.
⬇
import stable_envs as snv
env = snv.PushT(num_envs=256, device="cuda")
env.reset(seed=0)
before = env.render()[0]
Change the the T-block’s RGB color
env.set_variation(
{"block.color": [230, 80, 60]}
)
after = env.render()[0] # after != before
2 stable-envs: An Overview
We interface a total of 80 traditional (e.g., TwoRoom, PushT, etc.) and novel (e.g., RoadSter) simulation environments from multiple environment classes (Figure 4, Table 1). Each environment class owns its low-level logic, while stable-envs implements higher-level factor-of-variations and batched calls to stepping methods, each validated against source. Importantly, all environment instances step together through one shared simulation adapter. On CPU device, this single adapter runs vectorized code or distributes environments across worker processes, whereas on GPU it runs batched MuJoCo Warp, MJX or Pytorch kernels, depending on the environment. Thus, each environment in stable-envs can be used to simulate a batch of independent environments, each providing two main methods over an explicit environment state: dynamics stepping (Code ex. 1), and rendering (Code ex. 2). All environments currently supported in stable-envs are listed in Table 1. In practice, environments are first reset, returning a batched state, and then step through a (batched) action tensor, using either single actions () or action chunks (). Crucially, step exposes the intermediate states and the optionally-rendered frames, decoupling environment stepping from rendering. Similarly, the render routine can be used to render the environment’s internal state into RGB frames at an arbitrary resolution. Importantly, state payloads store the low-level deterministic and stochastic information about the environment, so that dynamics are fully reproducible given (1) the environment class and (2) prerecorded states. Effectively, stable-envs allows to store datasets using only implicit states that are then rendered on-the-fly, instead of storing explicit high-dimensional image frames, by exploiting the bijection between the environment’s state and its visual outlook.
Performance gains
stable-envs takes advantage of several techniques for rendering speedups. First, stable-envs can render static scenes once per each configuration across the batch, and only draw moving bodies on top for each frame. Second, stable-envs relies on custom kernels to draw frames per each environment, using vectorized kernels or process pools for CPU rendering, and MuJoCo Warp and nvdiffrast for native GPU rendering across compute platforms. On-GPU rendering is a particularly compelling approach as it allows to directly write tensors into the same device running training. Further, stable-envs’s is also inherently faster than its reference implementation (Figure 2(a)), with environment’s pure rendering from prerecorded state trajectories being 1.4x–24.1x faster on GPU when rendering multiple states in parallel, e.g., to form a training batch (Appendix C). We also assess stable-envs’s speedups separately for (1) pure physics stepping (env.step()) (2) pure frame rendering (env.render()), and (3) both (env.render(env.step())) on both CPU and GPU, and report our results in Table 3. We directly rely on these speed ups to accelerate the training run of LeWM (Maes et al., 2026b), a compact world model trained solely on image observations. Across four environments (TwoRoom, PushT, Reacher and Cube), training runs are (1) 1.16–1.33 faster (Figure 2(b)) and (2) exhibit higher GPU utilization (Table 5) than the reference implementation, notably with no changes to the training loop besides on-GPU rendering. Importantly, these optimized training runs lead to comparable downstream planning performance (Table 9).

(a) stable-envs speeds up combined physics and rendering (env.render(env.step())) compared to stable-worldmodel.

(b) Thanks to on-GPU rendering, stable-envs enables significant end-to-end speedups of training across multiple environments.
Figure 2: Simulator and training performance with stable-envs.
Environments correctness
To assess environment correctness, stable-envs tests next-state dynamics and rendering parity with source environments separately. To guarantee parity in the simulated dynamics, we run both the source implementation and stable-envs’s from the same state given a shared action sequence , comparing the resulting trajectories, and report the maximum error in Table 7. Further, we assess rendering’s semantic correctness by testing source and stable-envs’s rendering of the same underlying state , and report the pixel-space MSE against the source implementation in Table 8. On CPU, all four environments are near pixel-identical, and on GPU the MSE is lower still: TwoRoom, PushT and Cube are almost exact, and only Reacher exhibits a negligible difference of 2.2 (Table 8). Despite the significant speed ups due to stable-envs’s optimized implementation, we do not find significant discrepancies in either dynamics stepping nor visual appearance for rendered scenes, further underscoring stable-envs’s parity with respect to source (Figure 3).

Figure 3: stable-envs shows both (1) dynamics and (2) perceptual parity with source implementation despite being optimized for speed. Environments from left to right are: TwoRoom, PushT, Reacher and Cube.
3 Conclusion
We introduced stable-envs, an open-source library for efficient batch rendering of simulated environments designed to speed up research in world models and pixel-based agents. Currently, stable-envs supports over 80 environments, offering end-to-end training speedups of up to 1.33x, and standalone environment speedups of up to 24x for batches of simulation environments. stable-envs achieves this by avoiding moving large image tensors across the CPU/GPU boundary, together with batched rendering, custom rendering kernels, and re-use of pre-rendered static scenery. stable-envs also provides access to controlled visual variations from the same underlying physical state, allowing changes to the visual appearance of all supported environments at runtime. In addition, stable-envs allows datasets to be stored as low-dimensional simulator states and rendered on demand, at different resolutions and under controlled visual variations, during training. This allows to achieve better GPU utilization, and up to a 1.33x end-to-end training speedup. We hope stable-envs will help reduce the computational cost of training and evaluating pixel-based WMs and agents, making larger-scale and more reproducible studies in simulated environments accessible to a broader community.
References
R. Cadene, S. Alibert, F. Capuano, M. Aractingi, A. Zouitine, P. Kooijmans, J. Choghari, M. Russi, C. Pascal, S. Palma, et al. Lerobot: an open-source library for end-to-end robot learning. In International Conference on Learning Representations, Vol. 2026, pp. 122398–122417. Cited by: §1.
D. Ha and J. Schmidhuber World models. arXiv preprint arXiv:1803.10122 2 (3), pp. 440. Cited by: §1.
D. Hafner, T. Lillicrap, I. Fischer, R. Villegas, D. Ha, H. Lee, and J. Davidson Learning latent dynamics for planning from pixels. In International conference on machine learning, pp. 2555–2565. Cited by: §1.
D. Hafner, J. Pasukonis, J. Ba, and T. Lillicrap Mastering diverse control tasks through world models. Nature 640 (8059), pp. 647–653. Cited by: §1.
L. Maes, Q. L. Lidec, D. Haramati, N. Massaudi, D. Scieur, Y. LeCun, and R. Balestriero Stable-worldmodel-v1: reproducible world modeling research and evaluation. arXiv preprint arXiv:2602.08968. Cited by: 3rd item.
L. Maes, Q. L. Lidec, D. Scieur, Y. LeCun, and R. Balestriero Leworldmodel: stable end-to-end joint-embedding predictive architecture from pixels. arXiv preprint arXiv:2603.19312. Cited by: §1, §2.
M. Mittal, P. Roth, J. Tigue, A. Richard, O. Zhang, P. Du, A. Serrano-Munoz, X. Yao, R. Zurbrügg, N. Rudin, et al. Isaac lab: a gpu-accelerated simulation framework for multi-modal robot learning. arXiv preprint arXiv:2511.04831. Cited by: §1, §1.
A. Raffin, A. Hill, A. Gleave, A. Kanervisto, M. Ernestus, and N. Dormann Stable-baselines3: reliable reinforcement learning implementations. Journal of machine learning research 22 (268), pp. 1–8. Cited by: §1.
U. Sobal, W. Zhang, K. Cho, R. Balestriero, T. G. Rudner, and Y. LeCun Learning from reward-free offline data: a case for planning with latent dynamics models. Advances in Neural Information Processing Systems 38, pp. 43905–43941. Cited by: §1.
S. Tao, F. Xiang, A. Shukla, Y. Qin, X. Hinrichsen, X. Yuan, C. Bao, X. Lin, Y. Liu, T. Chan, et al. Demonstrating gpu parallelized robot simulation and rendering for generalizable embodied ai with maniskill3. Proceedings of Robotics: Science and Systems,(LosAngeles, CA, USA). Cited by: §1.
M. Towers, A. Kwiatkowski, J. Balis, G. De Cola, T. Deleu, M. Goulão, K. Andreas, M. Krimmel, A. Kg, R. Perez-Vicente, et al. Gymnasium: a standard interface for reinforcement learning environments. Advances in Neural Information Processing Systems 38. Cited by: §1.
J. Weng, M. Lin, S. Huang, B. Liu, D. Makoviichuk, V. Makoviychuk, Z. Liu, Y. Song, T. Luo, Y. Jiang, et al. Envpool: a highly parallel reinforcement learning environment execution engine. Advances in Neural Information Processing Systems 35, pp. 22409–22421. Cited by: §1.
K. Zakka, B. Tabanpour, Q. Liao, M. Haiderbhai, S. Holt, J. Y. Luo, A. Allshire, E. Frey, K. Sreenath, L. A. Kahrs, et al. Mujoco playground. arXiv preprint arXiv:2502.08844. Cited by: §1.
G. Zhou, H. Pan, Y. LeCun, and L. Pinto Dino-wm: world models on pre-trained visual features enable zero-shot planning. arXiv preprint arXiv:2411.04983. Cited by: §1.
Appendix A Environments available

Figure 4: All 80 environments currently supported by stable-envs.
Table 1: Environment families in stable-envs.
| Family | Source | Classes |
|---|---|---|
| Classic control | Gymnasium | 5 |
| DM Control | dm_control (MuJoCo) | 17 |
| Fetch | Gymnasium Robotics (MuJoCo) | 12 |
| OGBench | OGBench (MuJoCo) | 27 |
| Navigation | stable-worldmodel | 5 |
| PushT | gym-pusht (Pymunk) | 2 |
| Roadster | new in stable-envs (MuJoCo) | 5 |
| MiniWorld | MiniWorld | 1 |
| PyFlyt | PyFlyt (PyBullet) | 1 |
| MS-Human | MS-Human-700 (MuJoCo) | 1 |
| Craftax | Craftax (JAX) | 4 |
Appendix B Benchmark protocol
Table 2: Hardware and protocol for the speed and correctness measurements.
| GPU | NVIDIA L40S (driver 595.91) |
|---|---|
| CPU | AMD EPYC 9354, 8 pinned cores |
| Frame size | on both sides |
| Arguments | library defaults |
| Timing | warm-up, then 3 windows of at least 3 s (5 at ); median |
Appendix C Environments speedups
Table 3: Speedup of stable-envs over stable-worldmodel (ratio of steps/s or frames/s) at batch sizes = 1, 16, 128. "Both" denotes env.render(env.step()). GPU physics is compared with stable-worldmodel’s CPU stepping, which often has no GPU path. For GPU rendering, we benchmark against the faster render between stable-worldmodel’s CPU and EGL rendering. Maximum speedups per environment and operation, across all devices and batch sizes are highlighted.
env.step() env.render() Both Env Device 1 16 128 1 16 128 1 16 128 TwoRoom CPU 3.89 7.90 6.55 11.5 17.4 21.3 3.49 5.69 12.1 GPU 0.307 0.841 1.77 14.2 16.0 24.1 0.887 2.23 13.2 PushT CPU 1.36 0.96 2.01 2.94 4.02 4.13 3.74 3.44 11.7 GPU 0.342 0.522 1.58 3.92 4.23 5.29 1.35 2.59 14.4 Reacher CPU 2.27 3.24 3.13 18.0 18.1 19.0 8.24 8.31 13.7 GPU 0.275 0.762 1.33 2.85 2.87 3.08 1.38 3.03 3.19 Cube CPU 5.79 5.71 7.61 12.6 12.8 12.8 18.0 5.19 1.41 GPU 0.783 1.41 7.55 1.37 1.38 1.44 0.951 2.18 6.45
Appendix D Training speedups
Table 4: LeWM training (18M parameters, bf16, batch size 128) throughput () on one NVIDIA L40S, measured in optimizer steps/s after warmup (steps 201–1000). Inputs are frames rendered online by either stable-worldmodel or stable-envs. Model only denotes training on frames already on the GPU.
| Env | stable-worldmodel | stable-envs | Model only |
|---|---|---|---|
| TwoRoom | 5.29 | 6.15 | 6.78 |
| PushT | 4.58 | 6.09 | 6.77 |
| Reacher | 4.06 | 5.05 | 6.78 |
| Cube | 3.56 | 4.29 | 6.78 |
Table 5: GPU utilization (%) () during LeWM training, measured as the share of wall time the GPU spends on the training step. Rendering time is excluded.
| Env | stable-worldmodel | stable-envs |
|---|---|---|
| TwoRoom | 78.2 | 86.3 |
| PushT | 71.8 | 86.2 |
| Reacher | 57.9 | 72.3 |
| Cube | 52.3 | 62.2 |
Table 6: Time-to-1k-training-steps (s) (), measured from the start of the first optimizer step to the end of step 1000 for .
| Env | stable-worldmodel | stable-envs |
|---|---|---|
| TwoRoom | 234 | 211 |
| PushT | 252 | 221 |
| Reacher | 301 | 250 |
| Cube | 330 | 291 |
Appendix E Environment correctness
Table 7: Dynamics parity: maximum absolute error () over states executing 20 shared actions, from the same seeded reset.
| Env | Max error |
|---|---|
| TwoRoom | 0 |
| PushT | |
| Reacher | 0 |
| Cube | 0 |
Table 8: Rendering MSE () against stable-worldmodel (0–255 scale, ), mean and max over rendered states.
| CPU | GPU | |||
|---|---|---|---|---|
| Env | Mean | Max | Mean | Max |
| TwoRoom | ||||
| PushT | 0 | 0 | 0 | 0 |
| Reacher | 2.20 | 2.86 | 2.16 | 2.75 |
| Cube | 2.02 | 4.31 |
Appendix F Training correctness
Table 9: Downstream planning success rates (%) () for world models trained and evaluated using the original environments (Source) or stable-envs. Values report the average over three evaluation seeds.
| Environment | Source | stable-envs |
|---|---|---|
| TwoRoom | ||
| PushT | ||
| Reacher | ||
| Cube |