MCPcopy Create free account

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

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

↓ 1 callersMethod_validate_data_dirs_exist
Verify that every directory declared by the training strategy exists under the data root.
packages/ltx-trainer/src/ltx_trainer/config.py:799
↓ 1 callersFunction_validate_dataset_file
Validate that the dataset file exists and has the correct format.
packages/ltx-trainer/scripts/process_dataset.py:257
↓ 1 callersMethod_validate_setup
Validate that the dataset setup is correct.
packages/ltx-trainer/src/ltx_trainer/datasets.py:246
↓ 1 callersFunction_write_audio
Write audio tensor to container as stereo AAC.
packages/ltx-trainer/src/ltx_trainer/video_utils.py:148
↓ 1 callersMethodadvance_step
Advance the denoising step by one.
packages/ltx-trainer/src/ltx_trainer/progress.py:42
↓ 1 callersFunctionalign_resolution
Compute aligned generation dimensions and crop-back size. Args: width: Source video width (need not be aligned). height: Source vi
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:153
↓ 1 callersFunctionalloc_buffer
Allocate one ``uint8`` buffer for :func:`allocate_layout_views`. For pinned host buffers, prefer ``cudaHostRegister`` to dodge the caching all
packages/ltx-core/src/ltx_core/block_streaming/utils.py:87
↓ 1 callersFunctionallocate_layout_views
Allocate a single ``uint8`` buffer and return per-key tensor views into it. All keys in *layout* live in one contiguous allocation; each returned
packages/ltx-core/src/ltx_core/block_streaming/utils.py:156
↓ 1 callersMethodany_in_batch
(self, perturbation_type: PerturbationType, block: int)
packages/ltx-core/src/ltx_core/guidance/perturbations.py:71
↓ 1 callersFunctionapply_color_range_
Scale Y and UV planes to the specified color range, in-place. Args: y: Luma plane in ``[0, 1]``. uv: Chroma planes centered at 0.
packages/ltx-pipelines/src/ltx_pipelines/utils/color_conversion.py:133
↓ 1 callersFunctionapply_cross_attention_adaln
Apply query/key AdaLN modulation then cross-attention. ``x_normed`` is already RMS-normalized by ``post_sa_function``; this only applies the a
packages/ltx-core/src/ltx_core/model/transformer/transformer.py:419
↓ 1 callersFunctionapply_hdr_decode_postprocess
Apply HDR decompress to VAE decode output for HDR recovery. Args: decoded_video: Tensor from VAE decode in [0, 1], shape [B, C, F, H, W].
packages/ltx-core/src/ltx_core/hdr.py:56
↓ 1 callersFunctionapply_interleaved_rotary_emb
( input_tensor: torch.Tensor, cos_freqs: torch.Tensor, sin_freqs: torch.Tensor )
packages/ltx-core/src/ltx_core/model/transformer/rope.py:30
↓ 1 callersFunctionapply_loras
Fuse LoRAs into ``model_sd`` and place the results in ``destination_sd``. When ``destination_sd`` is provided, the fused tensors are placed direct
packages/ltx-core/src/ltx_core/loader/fuse_loras.py:133
↓ 1 callersFunctionapply_split_rotary_emb
( input_tensor: torch.Tensor, cos_freqs: torch.Tensor, sin_freqs: torch.Tensor )
packages/ltx-core/src/ltx_core/model/transformer/rope.py:43
↓ 1 callersMethodas_state_dict_with_strength
Return a :class:`LoraStateDictWithStrength` view of the pinned A/B factors. Lets non-block fusion consume the already-loaded disk-streaming Lo
packages/ltx-core/src/ltx_core/block_streaming/disk.py:129
↓ 1 callersFunctionassign_tensor_to_module
Assign *tensor* to the parameter/buffer at *dotted_name* inside *root*. Unlike ``param.data = tensor``, this works even when the existing paramete
packages/ltx-core/src/ltx_core/block_streaming/utils.py:35
↓ 1 callersFunctionaudio_latent_from_file
Load audio from a file, and construct the audio latent conforming to video output shape. Args: audio_encoder: Model used to encode audio t
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:99
↓ 1 callersFunctionautomatic_attention
Cached AUTOMATIC pick for the unmasked path. Cached so every ``AttentionOps`` in the process shares one instance.
packages/ltx-core/src/ltx_core/model/transformer/attention.py:287
↓ 1 callersFunctionautomatic_masked_attention
Cached AUTOMATIC pick for the masked path. See :func:`automatic_attention`.
packages/ltx-core/src/ltx_core/model/transformer/attention.py:294
↓ 1 callersMethodblend
Blend-weight tile results and accumulate into the full token space. Premultiplied (blend-weighted) data is **added** to *output*, allo
packages/ltx-core/src/ltx_core/modality_tiling.py:133
↓ 1 callersMethodblock_layout
Per-block buffer layout (shape + dtype for each param).
packages/ltx-core/src/ltx_core/block_streaming/source.py:23
↓ 1 callersFunctionbuild_compile_transformer_op
Build a ``ModuleOps`` that compiles transformer blocks with the given settings.
packages/ltx-core/src/ltx_core/model/transformer/compiling.py:118
↓ 1 callersFunctionbuild_downsampling_path
Build the downsampling path with residual blocks, attention, and downsampling layers.
packages/ltx-core/src/ltx_core/model/audio_vae/downsample.py:60
↓ 1 callersFunctionbuild_upsampling_path
Build the upsampling path with residual blocks, attention, and upsampling layers.
packages/ltx-core/src/ltx_core/model/audio_vae/upsample.py:58
↓ 1 callersMethodcaption
Generate a caption for the given video or image. Args: path: Path to the video/image file to caption. fps: Frames per
packages/ltx-trainer/src/ltx_trainer/captioning.py:196
↓ 1 callersFunctioncaption_media
Caption videos and images using the provided captioning model. Args: input_path: Path to input video file or directory output_path
packages/ltx-trainer/scripts/caption_videos.py:77
↓ 1 callersFunctionclean_response
Clean a response from curly quotes and leading non-letter characters which Gemma tends to insert.
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:299
↓ 1 callersMethodcleanup
Hide sampling task when done.
packages/ltx-trainer/src/ltx_trainer/progress.py:50
↓ 1 callersMethodcleanup
(self)
packages/ltx-core/src/ltx_core/block_streaming/disk.py:164
↓ 1 callersMethodcleanup
Release all resources (buffers, readers, events).
packages/ltx-core/src/ltx_core/block_streaming/source.py:40
↓ 1 callersFunctioncompile_transformer
Compile each transformer block via ``torch.compile`` with the given settings. The patched forward emits ``torch.compiler.cudagraph_mark_step_begin
packages/ltx-core/src/ltx_core/model/transformer/compiling.py:90
↓ 1 callersMethodcompress_ldr
Compress LDR [0, 1] → [0, 1] (no log curve, just clamp).
packages/ltx-core/src/ltx_core/hdr.py:39
↓ 1 callersFunctioncompute_audio_latents
Encode audio files into latent representations. Supports standalone audio files (.wav, .mp3, etc.) and audio tracks extracted from video files
packages/ltx-trainer/scripts/process_videos.py:1063
↓ 1 callersFunctioncompute_audio_masks
Preprocess audio mask files to latent-space binary masks. For each sample, loads the mask (a 1D waveform-like signal or a simple tensor), resa
packages/ltx-trainer/scripts/process_videos.py:991
↓ 1 callersMethodcompute_loss
Compute masked MSE loss for video and audio predictions. Returns [B,].
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:278
↓ 1 callersFunctioncompute_reference
Compute Canny edge detection on a batch of images. Args: images: Batch of images tensor of shape [B, C, H, W] Returns: Binary
packages/ltx-trainer/scripts/compute_reference.py:45
↓ 1 callersFunctioncompute_scaled_resolution_buckets
Compute scaled resolution buckets and validate the results.
packages/ltx-trainer/scripts/process_videos.py:1288
↓ 1 callersFunctioncompute_video_masks
Preprocess video mask files to latent-space binary masks. For each sample, loads the mask video/image, applies the same spatial resize/crop as
packages/ltx-trainer/scripts/process_videos.py:905
↓ 1 callersMethodconstant
Build a factory with constant params (same guider for all sigma).
packages/ltx-core/src/ltx_core/components/guiders.py:306
↓ 1 callersMethodconv_post
(self)
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:536
↓ 1 callersMethodconv_pre
(self)
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:532
↓ 1 callersFunctionconvert_video_to_gif
Convert a video file to GIF format.
packages/ltx-trainer/src/ltx_trainer/hf_hub_utils.py:90
↓ 1 callersFunctioncpu_chunks
()
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:371
↓ 1 callersFunctioncreate_detector
Create a scene detector based on the specified type and parameters. Args: detector_type: Type of detector to create threshold: Det
packages/ltx-trainer/scripts/split_scenes.py:53
↓ 1 callersMethodcreate_initial_state
( self, device: DeviceLikeType, dtype: torch.dtype, initial_latent: torch.Tens
packages/ltx-core/src/ltx_core/tools.py:100
↓ 1 callersFunctioncreate_noised_state
Create a noised latent state from empty state, conditionings, and noiser. Creates an empty latent state, applies conditionings, and then adds nois
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:224
↓ 1 callersFunctioncreate_tiles_from_intervals_and_mappers
( intervals: LatentIntervals, mappers: list[MappingOperation], )
packages/ltx-core/src/ltx_core/tiling.py:359
↓ 1 callersMethoddecode_audio
Decode all audio latent files in the directory recursively. Args: latents_dir: Directory containing audio latent files (.pt)
packages/ltx-trainer/scripts/decode_latents.py:132
↓ 1 callersFunctiondecode_single_frame
(video_file: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:683
↓ 1 callersMethoddecode_video
Decode a video latent tensor, yielding float chunks ``[f, h, w, c]`` in ``[0, 1]``. Subclasses (e.g. ``DistributedVideoDecoder``) may override
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:904
↓ 1 callersFunctiondecode_video_from_file
Decodes video from a file using presentation timestamps for time-based trimming. If a frame with no pts is encountered, falls back to :func:`decod
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:614
↓ 1 callersMethoddecompress
Decompress LogC3 [0, 1] → linear HDR [0, ∞).
packages/ltx-core/src/ltx_core/hdr.py:43
↓ 1 callersMethoddefault
(cls)
packages/ltx-core/src/ltx_core/model/video_vae/tiling.py:65
↓ 1 callersFunctiondefault_1_stage_t2a_arg_parser
Argument parser for single-stage text-to-audio pipelines (audio-only).
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:653
↓ 1 callersFunctiondetect_and_split_scenes
Detect and split scenes in a video using the specified parameters. Args: video_path: Path to input video. output_dir: Directory to
packages/ltx-trainer/scripts/split_scenes.py:153
↓ 1 callersFunctiondetect_dataset_columns
Read column names from a dataset file without loading all data.
packages/ltx-trainer/scripts/process_videos.py:1250
↓ 1 callersFunctiondownsample_mask_video_to_latent
Downsample a pixel-space mask video to flattened latent token weights.
packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py:45
↓ 1 callersMethodenabled
(self)
packages/ltx-core/src/ltx_core/components/guiders.py:26
↓ 1 callersMethodenabled
(self)
packages/ltx-core/src/ltx_core/components/guiders.py:73
↓ 1 callersFunctionencode_audio
Save an audio waveform as a 16-bit PCM ``.wav`` file at the source sampling rate. Reuses :func:`_write_audio` (the same muxing path used by :func:
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:394
↓ 1 callersFunctionencode_audio
Encode audio waveform into latent representation. Args: audio: Audio container with waveform tensor of shape (batch, channels, samples) an
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:248
↓ 1 callersFunctionencode_exr_sequence_to_mp4
Convert a linear EXR frame sequence to sRGB and encode to H.264 .mp4 via PyAV. Exposure is fixed at EV=0 (no gain). Each EXR frame is clamped to [
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:746
↓ 1 callersFunctionencode_single_frame
(output_file: str, image_array: np.ndarray, crf: float)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:666
↓ 1 callersMethodenhance_i2v
Enhance a text prompt for I2V generation using a reference image.
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:108
↓ 1 callersMethodenhance_t2v
Enhance a text prompt for T2V generation.
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:91
↓ 1 callersFunctionexample
()
packages/ltx-trainer/src/ltx_trainer/timestep_samplers.py:143
↓ 1 callersFunctionflux_time_shift
(mu: float, sigma: float, t: float)
packages/ltx-core/src/ltx_core/components/schedulers.py:129
↓ 1 callersMethodforward
r""" Encode video frames into normalized latent representation. Args: sample: Input video (B, C, F, H, W). F should be 1 +
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:256
↓ 1 callersMethodforward
r""" Decode latent representation into video frames. Args: sample: Latent tensor (B, 128, F', H', W'). timeste
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:683
↓ 1 callersMethodforward_with_2d
(self, x: torch.Tensor, skip_time_conv: bool = False)
packages/ltx-core/src/ltx_core/model/video_vae/convolution.py:210
↓ 1 callersMethodforward_with_3d
(self, x: torch.Tensor, skip_time_conv: bool = False)
packages/ltx-core/src/ltx_core/model/video_vae/convolution.py:180
↓ 1 callersMethodfrom_config
(cls, config: dict)
packages/ltx-core/src/ltx_core/model/model_protocol.py:18
↓ 1 callersMethodfrom_save_dict
Construct from torch.load output with Pydantic validation.
packages/ltx-trainer/src/ltx_trainer/training_state.py:44
↓ 1 callersFunctionfuse_cast_fp8_weight
Return ``(delta_bf16 + dequantize(weight_fp8)).to(weight_fp8.dtype)``. CUDA with Triton uses stochastic rounding via the fused kernel; otherwise
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:204
↓ 1 callersFunctiongenerate_enhanced_prompt
Generate an enhanced prompt from a text encoder and a prompt.
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:310
↓ 1 callersFunctiongenerate_freqs
( indices: torch.Tensor, indices_grid: torch.Tensor, max_pos: list[int], use_middle_indices_grid: bool )
packages/ltx-core/src/ltx_core/model/transformer/rope.py:144
↓ 1 callersMethodget_ab
Return the :class:`LoraProduct` for *param_prefix*, or ``None``.
packages/ltx-core/src/ltx_core/block_streaming/disk.py:145
↓ 1 callersMethodget_checkpoint_metadata
Include reference scale factors in checkpoint metadata for inference pipelines.
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:308
↓ 1 callersFunctionget_fp8_swap_module_ops
Return the FP8 swap ``ModuleOps`` for layers whose ``.weight`` is ``F8_E4M3`` and which have a sibling ``.weight_scale`` tensor in the checkpoint.
packages/ltx-core/src/ltx_core/quantization/fp8_scaled_mm.py:150
↓ 1 callersFunctionget_fractional_positions
(indices_grid: torch.Tensor, max_pos: list[int])
packages/ltx-core/src/ltx_core/model/transformer/rope.py:132
↓ 1 callersMethodget_metrics
Return the mean loss for each bucket hit on the last update. Wandb handles smoothing in the UI.
packages/ltx-trainer/src/ltx_trainer/sigma_tracker.py:55
↓ 1 callersMethodget_patch_grid_bounds
Return the temporal bounds `[inclusive start, exclusive end)` for every patch emitted by `patchify`. For audio this corresponds to ti
packages/ltx-core/src/ltx_core/components/patchifiers.py:334
↓ 1 callersFunctionget_res2s_coefficients
Compute res_2s Runge-Kutta coefficients for a given step size. Args: h: Step size in log-space = log(sigma / sigma_next) phi_
packages/ltx-pipelines/src/ltx_pipelines/utils/res2s.py:25
↓ 1 callersMethodget_sde_coeff
Compute SDE coefficients (alpha_ratio, sigma_down, sigma_up) for the step. Given either ``sigma_down`` or ``sigma_up``, returns the m
packages/ltx-core/src/ltx_core/components/diffusion_steps.py:53
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: Create sinusoidal timestep embeddings. Args timesteps (t
packages/ltx-core/src/ltx_core/model/transformer/timestep_embedding.py:6
↓ 1 callersFunctionget_training_strategy
Factory function to create the appropriate training strategy. The strategy is determined by the `name` field in the configuration. Args:
packages/ltx-trainer/src/ltx_trainer/training_strategies/__init__.py:43
↓ 1 callersFunctionget_video_frame_count
Get the number of frames in a video file. Tries three approaches in order: stream metadata, duration*fps estimate, full decode. The estimate m
packages/ltx-trainer/src/ltx_trainer/video_utils.py:18
↓ 1 callersFunctionget_videostream_fps
Read video stream FPS.
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:488
↓ 1 callersFunctionhq_2_stage_arg_parser
(params: PipelineParams = LTX_2_3_HQ_PARAMS)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:751
↓ 1 callersFunctioninterleaved_freqs_cis
(freqs: torch.Tensor, pad_size: int)
packages/ltx-core/src/ltx_core/model/transformer/rope.py:185
↓ 1 callersFunctionlipdub_arg_parser
Argument parser for the lip-dub pipeline. Frame count and frame rate are derived from the reference video at runtime (the frame count is silen
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:469
↓ 1 callersMethodload
Load state dict from path or paths (for sharded model storage) and apply sd_ops
packages/ltx-core/src/ltx_core/loader/sft_loader.py:20
↓ 1 callersFunctionload_8bit_gemma
Load the Gemma text encoder in 8-bit precision using bitsandbytes. Only the Gemma LLM backbone is loaded here. The embeddings processor (feat
packages/ltx-trainer/src/ltx_trainer/gemma_8bit.py:26
↓ 1 callersFunctionload_video_conditioning_hdr
Load a video and yield preprocessed frames for HDR IC-LoRA conditioning. Decodes through the standard path and applies the LDR compression that
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:223
↓ 1 callersFunctionmain
()
packages/ltx-pipelines/src/ltx_pipelines/lipdub.py:292
↓ 1 callersFunctionmain
()
packages/ltx-pipelines/src/ltx_pipelines/ic_lora.py:345
↓ 1 callersFunctionmain
Batch HDR IC-LoRA inference: per-frame EXR + tonemapped ProRes .mov.
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:822
↓ 1 callersFunctionmain
()
packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages_hq.py:245
↓ 1 callersFunctionmain
()
packages/ltx-pipelines/src/ltx_pipelines/ti2vid_two_stages.py:226
← previousnext →501–600 of 1,165, ranked by callers