load_qwen3_text_encoder

Load a Qwen3 encoder from a transformers directory

Description

Streams the (possibly sharded) safetensors weights into qwen3_encoder. The LM head is tied to the embeddings and skipped.

Usage

load_qwen3_text_encoder(model_path, device = "cpu", dtype = "float32",
                        verbose = TRUE, ...)

Arguments

  • model_path: Directory with config.json and model*.safetensors (FLUX.2-klein’s text_encoder).
  • device: Character. Target device.
  • dtype: Character. “bfloat16” (GPU) or “float32” (CPU).
  • verbose: Logical.
  • ...: Overrides for qwen3_encoder arguments.

Value

The loaded qwen3_encoder in eval mode.