MCPcopy Create free account

hub / github.com/Lightricks/LTX-2 / functions

Functions1,165 in github.com/Lightricks/LTX-2

↓ 1 callersFunction_load_existing_captions
Load existing captions from a file. Args: output_path: Path to the captions file format_type: Format of the captions file Retu
packages/ltx-trainer/scripts/caption_videos.py:284
↓ 1 callersMethod_load_first_frame
Load the first frame from an image or video file as [C, H, W] in [0, 1].
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1086
↓ 1 callersMethod_load_full_checkpoint
Load full model checkpoint.
packages/ltx-trainer/src/ltx_trainer/trainer.py:487
↓ 1 callersMethod_load_lora_checkpoint
Load LoRA checkpoint with DDP/FSDP compatibility.
packages/ltx-trainer/src/ltx_trainer/trainer.py:494
↓ 1 callersMethod_load_lora_sds
Load each configured LoRA into a state dict for fusion (pinned path).
packages/ltx-core/src/ltx_core/block_streaming/builder.py:260
↓ 1 callersFunction_load_mask_video
Load a mask video and return a pixel-space tensor of shape (1, 1, F, H, W). The mask video is loaded, resized to (height, width), converted to
packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py:431
↓ 1 callersMethod_load_model
Initialize and load the VAE model(s).
packages/ltx-trainer/scripts/decode_latents.py:74
↓ 1 callersFunction_load_model_weights
Load base weights and fuse LoRAs into *meta_model* in-place.
packages/ltx-core/src/ltx_core/loader/single_gpu_model_builder.py:44
↓ 1 callersMethod_load_models
Load the transformer and embeddings processor for training.
packages/ltx-trainer/src/ltx_trainer/trainer.py:395
↓ 1 callersMethod_load_non_block_weights
Load the non-block weights onto *device* and fuse LoRAs -- both paths. Reads through the loader with ``model_sd_ops`` restricted to the
packages/ltx-core/src/ltx_core/block_streaming/builder.py:388
↓ 1 callersMethod_load_training_state
Load training state file that corresponds to a checkpoint weights file.
packages/ltx-trainer/src/ltx_trainer/trainer.py:550
↓ 1 callersMethod_log_training_stats
Log training statistics.
packages/ltx-trainer/src/ltx_trainer/trainer.py:904
↓ 1 callersMethod_make_client
(self, api_key: str | None)
packages/ltx-trainer/src/ltx_trainer/captioning.py:363
↓ 1 callersFunction_make_decoder_block
( block_name: str, block_config: dict[str, Any], in_channels: int, convolution_dimensions: int
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:475
↓ 1 callersFunction_make_encoder_block
( block_name: str, block_config: dict[str, Any], in_channels: int, convolution_dimensions: int
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:38
↓ 1 callersFunction_make_tiling_config
Build a TilingConfig from explicit sizes. The defaults (1280 px spatial tile, 256 px overlap; 32 temporal frames, 16 overlap) are suitable for
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:644
↓ 1 callersFunction_memory_efficient_forward
Full memory-efficient ``VideoDecoder.forward`` replacement. Orchestrates the entire decode through workspace-based operations: ``UNetMidBlock3
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:528
↓ 1 callersFunction_midblock_forward_efficient
Memory-efficient ``UNetMidBlock3D`` forward. Allocates a single workspace buffer that is reused across all ``ResnetBlock3D`` iterations. For
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:343
↓ 1 callersMethod_mime_type
(cls, path: Path)
packages/ltx-trainer/src/ltx_trainer/captioning.py:357
↓ 1 callersFunction_norm_and_concat_padded_batch
Normalize and flatten multi-layer hidden states, respecting padding. Performs per-batch, per-layer normalization using masked mean and range,
packages/ltx-core/src/ltx_core/text_encoders/gemma/feature_extractor.py:12
↓ 1 callersMethod_normalize_data_sources
Normalize data_sources input to a consistent dict format.
packages/ltx-trainer/src/ltx_trainer/datasets.py:131
↓ 1 callersMethod_normalize_latents
Normalize encoder latents using per-channel statistics. When the encoder is configured with ``double_z=True``, the final conv
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:222
↓ 1 callersMethod_normalize_video_latents
Normalize video latents to non-patchified format [C, F, H, W]. Used for keeping backward compatibility with legacy datasets.
packages/ltx-trainer/src/ltx_trainer/datasets.py:288
↓ 1 callersFunction_pad_inputs_for_attention_alignment
Pad sequence length to multiple of alignment for Flash Attention compatibility.
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:168
↓ 1 callersFunction_pad_workspace_temporal
Apply non-causal replicate padding to temporal boundaries. Sets ``workspace[:, :, 0]`` to a copy of ``workspace[:, :, 1]`` and ``workspace[:,
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:95
↓ 1 callersFunction_params_for_sigma_from_sorted_dict
Return params for the given sigma from a sorted (sigma_upper_bound -> params) structure. Keys are sorted descending (bin upper bounds). Bin i
packages/ltx-core/src/ltx_core/components/guiders.py:214
↓ 1 callersMethod_parse_bool
(self, key: str, raw: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:173
↓ 1 callersMethod_parse_dynamic
(self, raw: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:181
↓ 1 callersMethod_parse_json_dict
(self, key: str, raw: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:191
↓ 1 callersMethod_parse_mode
(self, raw: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:159
↓ 1 callersMethod_parse_non_empty
(self, key: str, raw: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:167
↓ 1 callersFunction_pixel_norm_inplace
In-place RMS (pixel) normalization along the channel dimension.
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:243
↓ 1 callersFunction_populate_rotary_v4
transformers <5 layout: separate ``rotary_emb_local`` + ``rotary_emb``.
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py:208
↓ 1 callersFunction_populate_rotary_v5
transformers >=5 layout: single ``rotary_emb`` with per-layer-type buffers. Mirrors ``Gemma3PreTrainedModel._init_weights`` for ``Gemma3RotaryEmbe
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py:218
↓ 1 callersMethod_post_hook
Record a compute-done event and release the block weights.
packages/ltx-core/src/ltx_core/block_streaming/wrapper.py:57
↓ 1 callersMethod_pre_hook
Load GPU weights for a block and inject them into its parameters.
packages/ltx-core/src/ltx_core/block_streaming/wrapper.py:49
↓ 1 callersFunction_precalculate_model_sampling_sigmas
(shift: float, timesteps_length: int)
packages/ltx-core/src/ltx_core/components/schedulers.py:124
↓ 1 callersMethod_prepare_attention_mask
Prepare attention mask.
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:142
↓ 1 callersMethod_prepare_audio_inputs
Prepare audio inputs for joint audio-video training. Args: batch: Raw batch data containing audio_latents sigmas: Samp
packages/ltx-trainer/src/ltx_trainer/training_strategies/text_to_video.py:191
↓ 1 callersFunction_prepare_audio_stream
Prepare the audio stream for writing.
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:287
↓ 1 callersMethod_prepare_context
Prepare context for transformer blocks.
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:131
↓ 1 callersMethod_prepare_cross_attention_timestep
Prepare A-V cross-attention AdaLN inputs.
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:328
↓ 1 callersMethod_prepare_models_for_training
Prepare models for training with Accelerate.
packages/ltx-trainer/src/ltx_trainer/trainer.py:600
↓ 1 callersMethod_prepare_self_attention_mask
Prepare self-attention mask by converting [0,1] values to additive log-space bias. Input shape: 3D ``(B, T_q, T_k)`` with values in [0, 1]. Th
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:151
↓ 1 callersMethod_prepare_tiles
( self, latent: torch.Tensor, tiling_config: TilingConfig | None = None, )
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:779
↓ 1 callersFunction_prepare_video_array
Convert video tensor to [F, H, W, C] uint8 numpy array. If ``video_format`` is provided, it is trusted. Otherwise, the layout is auto-detected
packages/ltx-trainer/src/ltx_trainer/video_utils.py:124
↓ 1 callersMethod_preprocess_image
Preprocess a single image by resizing and applying transforms.
packages/ltx-trainer/scripts/process_videos.py:258
↓ 1 callersMethod_preprocess_reference
Preprocess reference video. Returns (preprocessed [-1,1], pixels [0,1]).
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1129
↓ 1 callersMethod_preprocess_video
Preprocess a video by loading, resizing, and applying transforms. Returns: Tuple of (video tensor in [C, F, H, W] format, fps)
packages/ltx-trainer/scripts/process_videos.py:277
↓ 1 callersMethod_process_audio_file
Process a single audio latent file.
packages/ltx-trainer/scripts/decode_latents.py:261
↓ 1 callersMethod_process_file
Process a single latent file.
packages/ltx-trainer/scripts/decode_latents.py:180
↓ 1 callersFunction_process_single_video
Run inference on a single video: generate EXR frames + optional H.264 .mp4 preview.
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:679
↓ 1 callersMethod_process_transformer_blocks
Process transformer blocks for LTXAV. Per-block perturbation masks are precomputed here and attached to each modality's ``TransformerA
packages/ltx-core/src/ltx_core/model/transformer/model.py:361
↓ 1 callersFunction_products_for_sd_key
Yield :class:`LoraProduct` items matching *key* across state-dict-backed LoRAs.
packages/ltx-core/src/ltx_core/loader/fuse_loras.py:163
↓ 1 callersFunction_quantize
( weight_fp32: torch.Tensor, scale: torch.Tensor, fp8_min: torch.Tensor, fp8_max: torch.Tensor )
packages/ltx-core/src/ltx_core/quantization/fp8_scaled_mm.py:104
↓ 1 callersFunction_quantize_blockwise
Quantize a model block-by-block using optimum-quanto. This approach: 1. Moves each transformer block to GPU 2. Quantizes on GPU (fast!)
packages/ltx-trainer/src/ltx_trainer/quantization.py:110
↓ 1 callersFunction_query_disk_free_gib
(path: Path)
packages/ltx-trainer/scripts/serve_captioner.py:52
↓ 1 callersFunction_rational_for_scale
(scale: float)
packages/ltx-core/src/ltx_core/model/upsampler/spatial_rational_resampler.py:10
↓ 1 callersFunction_read_safetensors_dtypes
Return ``{tensor_name: dtype_string}`` from the safetensors header.
packages/ltx-core/src/ltx_core/quantization/fp8_scaled_mm.py:16
↓ 1 callersFunction_read_scales
Return ``{post_rename_param_key: scale_tensor}`` for every prequant ``*_scale`` sibling in *checkpoint_path*. Keys are returned in the post-re
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:249
↓ 1 callersMethod_register_hooks
(self)
packages/ltx-core/src/ltx_core/block_streaming/wrapper.py:63
↓ 1 callersFunction_replace_fwd_with_upcast
Intended to be applied via __class__ reassignment to existing nn.Linear instances. Forward remains defined at the class level, which is requi
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:97
↓ 1 callersMethod_replace_padded_with_learnable_registers
( self, hidden_states: torch.Tensor, additive_attention_mask: torch.Tensor )
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py:135
↓ 1 callersFunction_resample_audio
( container: av.container.Container, audio_stream: av.audio.AudioStream, frame_in: av.AudioFrame )
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:298
↓ 1 callersFunction_resnet_block_forward_inplace
Run a ``ResnetBlock3D`` in-place on a workspace buffer. The workspace has shape ``[B, C, T+2, H, W]`` with real data in ``[1:-1]``. After thi
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:265
↓ 1 callersFunction_resolve_columns
Map canonical role names to actual dataset column names. Returns a dict of role → column_name for recognized roles found in the dataset.
packages/ltx-trainer/scripts/process_dataset.py:268
↓ 1 callersFunction_resolve_full_rope_type
(config: object)
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py:190
↓ 1 callersFunction_resolve_local_base_freq
(config: object)
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py:177
↓ 1 callersFunction_resolve_quantization
(namespace: argparse.Namespace)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:229
↓ 1 callersMethod_resolve_resume_state
Determine resume state by looking for a training state file next to the loaded checkpoint. Returns (initial_step, TrainingState or None).
packages/ltx-trainer/src/ltx_trainer/trainer.py:508
↓ 1 callersMethod_restore_training_state
Restore optimizer, scheduler, and RNG states from a loaded TrainingState. Must be called after _init_optimizer() (which calls accelerator.prep
packages/ltx-trainer/src/ltx_trainer/trainer.py:571
↓ 1 callersMethod_run_denoising
Run the Euler denoising loop with CFG/STG, handling frozen modalities.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:751
↓ 1 callersMethod_run_downsampling_path
(self, h: torch.Tensor)
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:204
↓ 1 callersMethod_run_stage2_phase
Run one stage-2 denoising phase with optional IC-LoRA conditioning. Each tile calls ``stage_2.run()`` with a tile-sized ``ModalitySpec`` for
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:471
↓ 1 callersMethod_run_upsampling_path
(self, h: torch.Tensor)
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:473
↓ 1 callersMethod_sample_noise
(self, latent_state: LatentState)
packages/ltx-core/src/ltx_core/components/noisers.py:22
↓ 1 callersMethod_save_audio
Save an audio waveform tensor to a .wav file using stdlib wave.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:896
↓ 1 callersMethod_save_config
Save the training configuration as a YAML file in the output directory.
packages/ltx-trainer/src/ltx_trainer/trainer.py:1083
↓ 1 callersFunction_save_dataset_json
Save dataset json with reference video paths. Args: reference_paths: Dictionary mapping media paths to reference video paths outpu
packages/ltx-trainer/scripts/compute_reference.py:115
↓ 1 callersMethod_save_training_state
Save training state alongside checkpoint for resume. Respects checkpoints.save_training_state config: - "full": optimizer + scheduler
packages/ltx-trainer/src/ltx_trainer/trainer.py:988
↓ 1 callersFunction_scan_checkpoint_keys
Partition checkpoint keys into per-block and non-block lists. Opens the safetensors files for header-only key enumeration; no tensor data is r
packages/ltx-core/src/ltx_core/block_streaming/builder.py:447
↓ 1 callersFunction_sdpa_can_use
Ask torch whether *backend* can run with the given mask shape. ``MATH`` is the universal SDPA fallback (pure PyTorch ops, no kernel requiremen
packages/ltx-core/src/ltx_core/model/transformer/attention.py:204
↓ 1 callersFunction_select_masked_attention
Pick a mask-aware attention. Prefers xFormers when installed; else SDPA with the full priority list (the dispatcher rejects FLASH automatically wh
packages/ltx-core/src/ltx_core/model/transformer/attention.py:277
↓ 1 callersFunction_select_primary_attention
Pick the fastest unmasked attention based on installed extras and GPU arch. Priority by arch: - Hopper (sm_90, H100): FA3 / xFormers (mutually
packages/ltx-core/src/ltx_core/model/transformer/attention.py:253
↓ 1 callersMethod_setup_accelerator
Initialize the Accelerator with the appropriate settings.
packages/ltx-trainer/src/ltx_trainer/trainer.py:758
↓ 1 callersMethod_setup_data_root
Setup and validate the data root directory.
packages/ltx-trainer/src/ltx_trainer/datasets.py:117
↓ 1 callersMethod_setup_lora
Configure LoRA adapters for the transformer. Only called in LoRA training mode.
packages/ltx-trainer/src/ltx_trainer/trainer.py:451
↓ 1 callersMethod_setup_source_paths
Map data source names to their actual directory paths.
packages/ltx-trainer/src/ltx_trainer/datasets.py:144
↓ 1 callersFunction_sinc
(x: torch.Tensor)
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:22
↓ 1 callersFunction_split_perturbations
Split a ``BatchedPerturbationConfig`` along the batch dimension.
packages/ltx-core/src/ltx_core/batch_split.py:26
↓ 1 callersMethod_streaming_transformer_ctx
(self)
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:308
↓ 1 callersFunction_suppress_accelerate_memory_warnings
Temporarily suppress INFO warnings from accelerate about memory allocation.
packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py:96
↓ 1 callersFunction_swap_linears_to_fp8
Replace nn.Linear layers with FP8Linear where ``should_swap(name)`` returns True.
packages/ltx-core/src/ltx_core/quantization/fp8_scaled_mm.py:125
↓ 1 callersMethod_text_encoder_ctx
(self)
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:520
↓ 1 callersFunction_tiled_encode_video
Encode video using spatial tiling for memory efficiency. Splits the video into overlapping spatial tiles, encodes each tile separately, and bl
packages/ltx-trainer/scripts/process_videos.py:667
↓ 1 callersFunction_to_binary_mask
Convert connector output mask to a binary (0/1) mask shaped ``(B, S, 1)`` for broadcasting.
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py:45
↓ 1 callersFunction_torch_default_sdpa_priority
Fetch torch's current default SDPA priority order at runtime. Used as the default for ``PytorchAttention`` so the wrapper-always code path mat
packages/ltx-core/src/ltx_core/model/transformer/attention.py:18
↓ 1 callersMethod_training_step
Perform a single training step using the configured strategy.
packages/ltx-trainer/src/ltx_trainer/trainer.py:350
↓ 1 callersFunction_transcode_cfr
Re-encode the video to a constant frame rate so the server's frame sampler can read every requested index (raw / variable-frame-rate videos over-r
packages/ltx-trainer/src/ltx_trainer/captioning.py:452
↓ 1 callersFunction_upsample_forward_efficient
Memory-efficient ``DepthToSpaceUpsample`` forward. For non-causal mode the input is copied into a workspace and the convolution runs in-place.
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:388
← previousnext →401–500 of 1,165, ranked by callers