MCPcopy Create free account

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

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

↓ 3 callersMethod_generate_id
(self, paths: list[str], sd_ops: SDOps)
packages/ltx-core/src/ltx_core/loader/registry.py:58
↓ 3 callersMethod_generated_token_indices
Flat token indices of *tile*'s generated tokens in the full sequence.
packages/ltx-core/src/ltx_core/modality_tiling.py:201
↓ 3 callersMethod_get_audio_positions
Generate audio position embeddings using ltx_core's native implementation. Args: num_time_steps: Number of audio time steps (T, no
packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py:172
↓ 3 callersFunction_get_media_path
(item: dict[str, Any])
packages/ltx-trainer/scripts/compute_reference.py:108
↓ 3 callersFunction_load_audio_from_file
Load audio from an audio or video file, optionally trimming to max_duration.
packages/ltx-trainer/scripts/process_videos.py:1234
↓ 3 callersFunction_norm_inplace
Apply *norm* in-place, using an optimised path for ``PixelNorm``.
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:249
↓ 3 callersFunction_parse_caption_response
Extract the caption text from a model response. Backend-agnostic: works for any model that follows the combined-caption prompt. Handles the fo
packages/ltx-trainer/src/ltx_trainer/captioning.py:389
↓ 3 callersMethod_resize_and_center_crop
Resize [N, C, H, W] tensor to cover target dims (preserving aspect ratio) and center-crop.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1096
↓ 3 callersFunction_vocoder_from_config
Instantiate a Vocoder from a flat config dict. Args: cfg: Vocoder config dict (keys match Vocoder constructor args). apply_final_a
packages/ltx-core/src/ltx_core/model/audio_vae/model_configurator.py:13
↓ 3 callersFunctionadaln_embedding_coefficient
Total number of AdaLN parameters per block.
packages/ltx-core/src/ltx_core/model/transformer/adaln.py:14
↓ 3 callersMethodapply_to_key
Apply the mapping to the given name.
packages/ltx-core/src/ltx_core/loader/sd_ops.py:101
↓ 3 callersMethodclear_conditioning
Clear the conditioning from the latent state. This method removes extra tokens from the end of the latent. Therefore, conditioning it
packages/ltx-core/src/ltx_core/tools.py:66
↓ 3 callersFunctioncompute_latents
Process videos and save latent representations. Under ``accelerate launch``, each process handles an interleaved shard of the dataset (ra
packages/ltx-trainer/scripts/process_videos.py:394
↓ 3 callersFunctioncompute_trapezoidal_mask_1d
Generate a 1D trapezoidal blending mask with linear ramps. Args: length: Output length of the mask. ramp_left: Fade-in length
packages/ltx-core/src/ltx_core/tiling.py:10
↓ 3 callersMethodcreate_initial_state
Create an initial latent state. If initial_latent is provided, it will be used to create the latent state.
packages/ltx-core/src/ltx_core/tools.py:28
↓ 3 callersFunctioncreate_meta_model
Create a model on the meta device and apply module operations.
packages/ltx-core/src/ltx_core/loader/helpers.py:50
↓ 3 callersFunctioncreate_tiles
( latent_shape: torch.Size, splitters: list[SplitOperation], mappers: list[MappingOperation], )
packages/ltx-core/src/ltx_core/tiling.py:391
↓ 3 callersFunctiondecode_audio_from_file
Decodes audio from a file, optionally seeking to a start time and limiting duration. Args: path: Path to the audio/video file containing a
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:520
↓ 3 callersFunctionfree_gpu_memory
Free GPU memory by running garbage collection and emptying CUDA cache. Args: log: If True, log memory stats after clearing
packages/ltx-trainer/src/ltx_trainer/gpu_utils.py:15
↓ 3 callersFunctionfuse_lora_weights
Yield ``(key, fused_tensor)`` for each weight modified by at least one LoRA. The fusion math is delegated to ``fuse_rule``. Output dtypes are
packages/ltx-core/src/ltx_core/loader/fuse_loras.py:100
↓ 3 callersMethodget
Return one contiguous CPU buffer for block *idx*.
packages/ltx-core/src/ltx_core/block_streaming/source.py:32
↓ 3 callersFunctionget_gpu_memory_gb
Get current GPU memory usage in GB using nvidia-smi. Args: device: torch.device to get memory usage for Returns: Current GPU m
packages/ltx-trainer/src/ltx_trainer/gpu_utils.py:67
↓ 3 callersFunctionget_phi
Get phi value with caching.
packages/ltx-pipelines/src/ltx_pipelines/utils/res2s.py:37
↓ 3 callersFunctionload_audio_vae_decoder
Load the audio VAE decoder. Args: checkpoint_path: Path to the safetensors checkpoint file device: Device to load model on
packages/ltx-trainer/src/ltx_trainer/model_loader.py:144
↓ 3 callersFunctionload_audio_vae_encoder
Load the audio VAE encoder (for preprocessing). Args: checkpoint_path: Path to the safetensors checkpoint file device: Device to l
packages/ltx-trainer/src/ltx_trainer/model_loader.py:121
↓ 3 callersFunctionload_embeddings_processor
Load the embeddings processor (feature extractor + video/audio connectors). Args: checkpoint_path: Path to the LTX-2 safetensors checkpoin
packages/ltx-trainer/src/ltx_trainer/model_loader.py:239
↓ 3 callersFunctionload_image_and_preprocess
Loads an image from a path and preprocesses it for conditioning. Note: The image is resized to the nearest multiple of 2 for compatibility wi
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:106
↓ 3 callersFunctionload_text_encoder
Load the Gemma text encoder. Args: gemma_model_path: Path to Gemma model directory device: Device to load model on dtype:
packages/ltx-trainer/src/ltx_trainer/model_loader.py:190
↓ 3 callersFunctionload_video_vae_decoder
Load the video VAE decoder (for inference/validation). Args: checkpoint_path: Path to the safetensors checkpoint file device: Devi
packages/ltx-trainer/src/ltx_trainer/model_loader.py:98
↓ 3 callersFunctionload_video_vae_encoder
Load the video VAE encoder (for preprocessing). Args: checkpoint_path: Path to the safetensors checkpoint file device: Device to l
packages/ltx-trainer/src/ltx_trainer/model_loader.py:75
↓ 3 callersFunctionload_vocoder
Load the vocoder (for audio waveform generation). Args: checkpoint_path: Path to the safetensors checkpoint file device: Device to
packages/ltx-trainer/src/ltx_trainer/model_loader.py:167
↓ 3 callersFunctionmake_attn
( in_channels: int, attn_type: AttentionType = AttentionType.VANILLA, norm_type: NormType = NormTy
packages/ltx-core/src/ltx_core/model/audio_vae/attention.py:58
↓ 3 callersFunctionmake_block_key
Return the state-dict key for *param_name* under block *block_idx*.
packages/ltx-core/src/ltx_core/block_streaming/utils.py:20
↓ 3 callersMethodmask
( self, perturbation_type: PerturbationType, block: int, device: DeviceLikeType, dtype: torch.dtype
packages/ltx-core/src/ltx_core/guidance/perturbations.py:57
↓ 3 callersMethodmask_shape
(self)
packages/ltx-core/src/ltx_core/types.py:70
↓ 3 callersFunctionmedia_path_to_reference_path
(media_file: Path)
packages/ltx-trainer/scripts/compute_reference.py:169
↓ 3 callersMethodprocess_hidden_states
Full pipeline: feature extraction -> connectors -> final embeddings. Args: hidden_states: Raw Gemma hidden states (tuple of tensor
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py:96
↓ 3 callersFunctionprojection_coef
(to_project: torch.Tensor, project_onto: torch.Tensor)
packages/ltx-core/src/ltx_core/components/guiders.py:363
↓ 3 callersFunctionread_model_config
Read metadata from the first shard of a checkpoint.
packages/ltx-core/src/ltx_core/loader/helpers.py:41
↓ 3 callersFunctionresize_and_center_crop
Resize tensor preserving aspect ratio (filling target), then center crop to exact dimensions. Args: latent: Input tensor with shape (
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:57
↓ 3 callersMethodrun
Generate validation samples, save outputs, and optionally log to W&B. Args: work_items: Optional list of ``(sample_index, save_out
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:156
↓ 3 callersMethodsample_for
Sample timesteps for a specific batch tensor. Args: batch: Input tensor of shape (batch_size, seq_length, ...) Returns:
packages/ltx-trainer/src/ltx_trainer/timestep_samplers.py:21
↓ 3 callersFunctionsave_video
Save a video tensor to a file using PyAV, optionally with audio. Args: video_tensor: Video tensor of shape [C, F, H, W] or [F, C, H, W] in
packages/ltx-trainer/src/ltx_trainer/video_utils.py:68
↓ 3 callersMethodsubmit
Enqueue a read of block *idx* into the caller-carved *buffer*, return its handle.
packages/ltx-core/src/ltx_core/block_streaming/block_fetcher.py:56
↓ 3 callersMethodtiled_decode
Decode a latent tensor into video frames using tiled processing. Splits the latent tensor into tiles, decodes each tile individually,
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:811
↓ 3 callersFunctiontimesteps_from_mask
Compute timesteps from a denoise mask and sigma value. Multiplies the denoise mask by sigma to produce timesteps for each position in the late
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:284
↓ 3 callersFunctionvideo_preprocess
Preprocesses a video frame generator for conditioning. Args: frames: Generator of video frames as tensors of shape (1, H, W, C), dtype uin
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:126
↓ 3 callersMethodwith_module_ops
Return a copy of this builder with the given module operations (e.g. quantization).
packages/ltx-core/src/ltx_core/loader/primitives.py:103
↓ 2 callersMethod__init__
(self, channels: int, kernel_size: int = 3, dilation: Tuple[int, int, int] = (1, 3, 5))
packages/ltx-core/src/ltx_core/model/audio_vae/resnet.py:13
↓ 2 callersMethod__init__
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, scale: int = 1)
packages/ltx-core/src/ltx_core/model/transformer/timestep_embedding.py:100
↓ 2 callersMethod__init__
(self, velocity_model: LTXModelProtocol)
packages/ltx-core/src/ltx_core/model/transformer/model.py:505
↓ 2 callersFunction_align_up
(offset: int, alignment: int)
packages/ltx-core/src/ltx_core/block_streaming/utils.py:63
↓ 2 callersFunction_amend_forward_with_upcast
Replace the forward method of the fp8-cast Linear layers (per :data:`_FP8_CAST_LINEAR_SUFFIXES`) to forward with upcast and optional stoc
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:146
↓ 2 callersMethod_apply_2d
(self, x2d: torch.Tensor)
packages/ltx-core/src/ltx_core/model/upsampler/blur_downsample.py:49
↓ 2 callersFunction_apply_compile_ops
Rewrite sd_ops/module_ops/LoRAs for compiled blocks (params land under ``_orig_mod``).
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:114
↓ 2 callersFunction_apply_right_pad_order
Apply a precomputed right-pad permutation (from ``_compute_right_pad_order``) to features.
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py:40
↓ 2 callersMethod_apply_text_cross_attention
Apply text cross-attention, with optional AdaLN modulation. ``x_normed`` is the RMS-normalized self-attention output produced by ``pos
packages/ltx-core/src/ltx_core/model/transformer/transformer.py:222
↓ 2 callersFunction_batched_sigma
Expand scalar sigma to (n * B,) matching the repeated state.
packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py:143
↓ 2 callersFunction_block_state
Streamed-eligible tensors of a block: parameters then buffers. Block streaming swaps both params and checkpoint-backed buffers (e.g. Gemma4's
packages/ltx-core/src/ltx_core/block_streaming/builder.py:418
↓ 2 callersFunction_build_state
Create a noised latent state from a modality spec and tools.
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:158
↓ 2 callersFunction_causal_pad
Build a causal-padded buffer of shape ``[B, C, T+pad_size, H, W]``. Copies ``x`` into ``padded[:, :, pad_size:]`` and replicates the first rea
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:199
↓ 2 callersFunction_chain_quantization
( sd_ops: SDOps, module_ops: tuple[ModuleOps, ...], quantization: QuantizationPolicy, )
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:100
↓ 2 callersFunction_chunk
(t_start: int, t_end: int)
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:164
↓ 2 callersMethod_compute_modality_loss
Compute per-element MSE loss for a single modality. Returns [B,].
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:673
↓ 2 callersFunction_conform_latent_length
(latent: torch.Tensor, expected_frames_count: int)
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:47
↓ 2 callersMethod_create_conditionings
Create conditioning items for video generation.
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:579
↓ 2 callersMethod_create_first_frame_conditioning_mask
Create conditioning mask for first frame conditioning. Args: batch_size: Batch size sequence_length: Total sequence le
packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py:219
↓ 2 callersMethod_create_per_token_timesteps
Create per-token timesteps based on conditioning mask. Args: conditioning_mask: Boolean mask of shape (batch_size, sequence_length
packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py:203
↓ 2 callersFunction_encode_audio
Encode audio waveform into latent representation. Args: audio_vae_encoder: Audio VAE encoder model from ltx-core audio_processor:
packages/ltx-trainer/scripts/process_videos.py:822
↓ 2 callersMethod_enhance
( self, messages: list[dict[str, str]], image: torch.Tensor | None = None, max
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:61
↓ 2 callersMethod_feed_spatial_noise
( self, hidden_states: torch.Tensor, per_channel_scale: torch.Tensor, generato
packages/ltx-core/src/ltx_core/model/video_vae/resnet.py:104
↓ 2 callersMethod_filtered_sd_ops
``model_sd_ops`` restricted to *allowed_model_keys* (post-rename keys). The loader skips keys filtered to None before reading them, so a restr
packages/ltx-core/src/ltx_core/block_streaming/builder.py:270
↓ 2 callersMethod_finalize_modality
Clear conditioning tokens, unpatchify, and decode a modality (generated or frozen).
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:851
↓ 2 callersMethod_find_condition_media
Look up the cached media for the first condition matching the given type.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:711
↓ 2 callersFunction_find_gemma_subpath
Find a file matching a glob pattern and return its parent directory.
packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py:87
↓ 2 callersMethod_get_audio_latent_time_in_sec
Converts latent indices into real-time seconds while honoring causal offsets and the configured hop length. Args:
packages/ltx-core/src/ltx_core/components/patchifiers.py:216
↓ 2 callersMethod_get_expected_file_path
Get the expected file path for a given data source.
packages/ltx-trainer/src/ltx_trainer/datasets.py:230
↓ 2 callersMethod_get_resolution_bucket_for_item
Get the nearest resolution bucket for the given media tensor.
packages/ltx-trainer/scripts/process_videos.py:306
↓ 2 callersFunction_guided_denoise
Core guided denoising — batches all guidance passes into one transformer call. Collects per-pass contexts first, then builds a single batched Moda
packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py:57
↓ 2 callersMethod_is_image_file
(path: str | Path)
packages/ltx-trainer/src/ltx_trainer/captioning.py:140
↓ 2 callersFunction_layout_slices
Compute the byte offset of each key in *layout* and the total aligned size. The size is at least one byte so empty layouts still produce a valid b
packages/ltx-core/src/ltx_core/block_streaming/utils.py:122
↓ 2 callersFunction_load_system_prompt
(prompt_name: str)
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:143
↓ 2 callersMethod_load_video_paths
Load video paths from the specified data source, validating existence.
packages/ltx-trainer/scripts/process_videos.py:213
↓ 2 callersFunction_local_rank_device
Per-rank CUDA device for early init (before Accelerator exists). DDP-safe: ``LOCAL_RANK`` is set by accelerate before trainer init; loading on bar
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:74
↓ 2 callersMethod_log_metrics
Log metrics to Weights & Biases.
packages/ltx-trainer/src/ltx_trainer/trainer.py:1114
↓ 2 callersFunction_merge_tensors
Concatenate tensors along batch dim, or return None if all are None.
packages/ltx-core/src/ltx_core/batch_split.py:32
↓ 2 callersMethod_modality_from_latent_state
Build a Modality object from a LatentState, text context, and sigma.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1061
↓ 2 callersMethod_offloaded_optimizer_state
Context manager that offloads optimizer state to CPU during validation. Opt-in via `acceleration.offload_optimizer_during_validation`. Frees V
packages/ltx-trainer/src/ltx_trainer/trainer.py:806
↓ 2 callersMethod_patchify_latent_data
Patchify latent data and extract metadata.
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:572
↓ 2 callersMethod_post_process_latent
Blend denoised output with clean latent according to the denoise mask.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1056
↓ 2 callersMethod_prepare_positional_embeddings
Prepare positional embeddings.
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:182
↓ 2 callersMethod_prepare_timestep
Prepare timestep embeddings.
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:116
↓ 2 callersMethod_process_modality
Process a single modality: load latents, add noise, apply conditions, build Modality.
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:350
↓ 2 callersMethod_process_output
Process output for LTXV.
packages/ltx-core/src/ltx_core/model/transformer/model.py:406
↓ 2 callersFunction_repeat_state
Repeat a ``LatentState`` *n* times along the batch dimension. ``(B, ...) → (n*B, ...)`` by tiling the whole tensor n times, so the ordering is
packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py:36
↓ 2 callersFunction_rescale_norm
Rescale normalization: x * sqrt(target_dim / source_dim).
packages/ltx-core/src/ltx_core/text_encoders/gemma/feature_extractor.py:67
↓ 2 callersMethod_resize_and_crop
Resize and crop tensor to target size.
packages/ltx-trainer/scripts/process_videos.py:332
↓ 2 callersMethod_resolve_instruction
Return the custom instruction, or the image/video default for this input.
packages/ltx-trainer/src/ltx_trainer/captioning.py:133
↓ 2 callersFunction_run_ffmpeg
Run the ffmpeg binary bundled with ``imageio-ffmpeg`` (a dependency).
packages/ltx-trainer/src/ltx_trainer/captioning.py:437
↓ 2 callersMethod_run_validation
Run distributed validation by delegating to the ValidationRunner. Each rank generates its assigned subset of validation samples (round-robin b
packages/ltx-trainer/src/ltx_trainer/trainer.py:840
← previousnext →101–200 of 1,165, ranked by callers