Change8

modular/v26.2.0

Breaking Changes
📦 mojo-languageView on GitHub →
2 breaking10 features1 deprecations🔧 4 symbols

Summary

Release 26.2 introduces image generation in MAX via FLUX diffusion models and brings significant DeepSeek improvements, alongside major language feature updates and keyword unification in Mojo.

⚠️ Breaking Changes

  • Mojo function declarations using the `fn` keyword are deprecated and must be changed to use `def`.
  • Mojo's `__moveinit__` and `__copyinit__` methods are merged into a unified `__init__()` method which now accepts `take` or `copy` arguments.

Migration Steps

  1. Replace all uses of the `fn` keyword with `def` for function declarations in Mojo code.
  2. Update Mojo class initializers to use the unified `__init__()` method, utilizing `take` or `copy` arguments instead of separate `__moveinit__` and `__copyinit__` methods.

✨ New Features

  • Image generation via FLUX diffusion models is now available in MAX, served through the new `/v1/responses` endpoint implementing the OpenResponses API.
  • Major improvements to DeepSeek models, including DeepSeekV3.2 with multi-latent attention.
  • NVFP4 quantization support added for DeepSeek-R1.
  • Simplified single-node expert parallelism for DeepSeek.
  • New model support added for Kimi vision-language models.
  • New model support added for Qwen3-MoE.
  • Mojo now supports conditional trait conformances via `where` clauses.
  • Mojo introduced t-strings for structured template processing.
  • Mojo added `comptime if` and `comptime for` syntax.
  • Mojo introduced a Python-style `assert` statement.

Affected Symbols

⚡ Deprecations

  • Mojo's `fn` keyword for function declarations is deprecated in favor of `def`.