MCPcopy Create free account

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

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

↓ 2 callersFunction_save_captions
Save captions to a file in the specified format. Args: captions: Dictionary mapping media paths to captions output_path: Path to s
packages/ltx-trainer/scripts/caption_videos.py:222
↓ 2 callersMethod_save_checkpoint
Save the model weights.
packages/ltx-trainer/src/ltx_trainer/trainer.py:918
↓ 2 callersMethod_schedule
Acquire a raw slot, carve it to block *idx*, enqueue a read, return the handle. The raw slot and its fetch status are returned together so the
packages/ltx-core/src/ltx_core/block_streaming/source.py:130
↓ 2 callersFunction_sdpa_full_priority
Hand SDPA the full backend priority order; let torch's dispatcher pick at call time. ``sdpa_kernel(_SDPA_FULL_PRIORITY, set_priority=True)`` enabl
packages/ltx-core/src/ltx_core/model/transformer/attention.py:239
↓ 2 callersFunction_snap_frames_to_8k1
Round ``frames`` down to the nearest ``8k+1`` (the model's required frame count).
packages/ltx-pipelines/src/ltx_pipelines/lipdub.py:45
↓ 2 callersFunction_step_state
Advance one diffusion step for a single modality, or return ``None`` if absent.
packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py:20
↓ 2 callersFunction_streaming_model
Build a streaming wrapper, yield it, then tear down and free memory.
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:137
↓ 2 callersMethod_tile_generated_token_count
Number of generated tokens in *tile*.
packages/ltx-core/src/ltx_core/modality_tiling.py:189
↓ 2 callersMethod_transformer_ctx
(self, **kwargs: object)
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:314
↓ 2 callersFunction_upcast_and_round
Upcast the weight to the given dtype and optionally apply stochastic rounding. Input weight needs to have float8_e4m3fn or float8_e5m2 dtype.
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:62
↓ 2 callersFunction_write_audio
(container: av.container.Container, audio_stream: av.audio.AudioStream, audio: Audio)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:261
↓ 2 callersMethodacquire
Take a free raw slot, waiting any pending event before returning. Raises :class:`RuntimeError` if every slot is currently in use.
packages/ltx-core/src/ltx_core/block_streaming/pool.py:50
↓ 2 callersMethodadd
(self, paths: list[str], sd_ops: SDOps | None, state_dict: StateDict)
packages/ltx-core/src/ltx_core/loader/registry.py:22
↓ 2 callersFunctionaggregate_lora_products
Accumulate ``sum((B * strength) @ A)`` across :class:`LoraProduct` items. The first product materializes a freshly-allocated aggregator via ``
packages/ltx-core/src/ltx_core/loader/fuse_loras.py:80
↓ 2 callersMethodall_in_batch
(self, perturbation_type: PerturbationType, block: int)
packages/ltx-core/src/ltx_core/guidance/perturbations.py:74
↓ 2 callersFunctionappend_ic_lora_reference_video_conditionings
Append :class:`VideoConditionByReferenceLatent` items for each reference path.
packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py:86
↓ 2 callersFunctionapply_rotary_emb
( input_tensor: torch.Tensor, freqs_cis: Tuple[torch.Tensor, torch.Tensor], rope_type: LTXRopeType
packages/ltx-core/src/ltx_core/model/transformer/rope.py:16
↓ 2 callersFunctionattention_label
Best-effort human-readable backend name. Built-in callables expose ``.label`` (encoding the SDPA priority list for the Pytorch backends); fall
packages/ltx-core/src/ltx_core/model/transformer/attention.py:299
↓ 2 callersFunctionbuild_attention_mask
Expand the attention mask to include newly appended conditioning tokens. Each conditioning item appends M new reference tokens to the sequenc
packages/ltx-core/src/ltx_core/conditioning/mask_utils.py:136
↓ 2 callersMethodbuild_from_sigma
Return a MultiModalGuider with params effective for the given sigma.
packages/ltx-core/src/ltx_core/components/guiders.py:337
↓ 2 callersFunctionbuild_mid_block
Build the middle block with two ResNet blocks and optional attention.
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:21
↓ 2 callersMethodcalculate
The guider calculates the guidance delta as (scale - 1) * (cond - uncond) for cfg and modality cfg, and as scale * (cond - uncond) fo
packages/ltx-core/src/ltx_core/components/guiders.py:244
↓ 2 callersFunctioncleanup_memory
()
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:36
↓ 2 callersFunctioncompute_captions_embeddings
Process captions and save text embeddings. Under ``accelerate launch``, each process handles an interleaved shard of the dataset (rank/wo
packages/ltx-trainer/scripts/process_captions.py:233
↓ 2 callersFunctioncompute_rectangular_mask_1d
Generate a 1D rectangular (pulse) mask. Args: length: Output length of the mask. left_ramp: Number of elements at the start o
packages/ltx-core/src/ltx_core/tiling.py:49
↓ 2 callersFunctionconvert
(chunk: torch.Tensor)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:341
↓ 2 callersFunctionconvert_to_additive_mask
Convert binary attention mask to additive form for transformer masking.
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py:15
↓ 2 callersFunctioncreate_caption_projection
Create a caption projection for the transformer (V1/19B only).
packages/ltx-core/src/ltx_core/model/transformer/text_projection.py:31
↓ 2 callersFunctioncreate_captioner
Factory function to create a media captioner.
packages/ltx-trainer/src/ltx_trainer/captioning.py:113
↓ 2 callersMethodcreate_embeddings
( self, video_features: torch.Tensor, audio_features: torch.Tensor | None, add
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_processor.py:69
↓ 2 callersMethodcreate_initial_state
( self, device: DeviceLikeType, dtype: torch.dtype, initial_latent: torch.Tens
packages/ltx-core/src/ltx_core/tools.py:156
↓ 2 callersFunctiondecode_image
(image_path: str)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:255
↓ 2 callersFunctiondefault_1_stage_arg_parser
(params: PipelineParams = LTX_2_3_PARAMS)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:516
↓ 2 callersFunctiondefault_2_stage_distilled_arg_parser
(params: PipelineParams = LTX_2_3_PARAMS)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:768
↓ 2 callersMethoddelta
(self, cond: torch.Tensor, uncond: torch.Tensor)
packages/ltx-core/src/ltx_core/components/guiders.py:23
↓ 2 callersMethoddelta
(self, pos_denoised: torch.Tensor, perturbed_denoised: torch.Tensor)
packages/ltx-core/src/ltx_core/components/guiders.py:70
↓ 2 callersFunctionderive_layout
Derive a layout from a ``{name: tensor}`` dict. If ``dtype`` is given, non-FP8 dtypes are coerced to it (FP8 preserved). If ``None``, the sour
packages/ltx-core/src/ltx_core/block_streaming/utils.py:53
↓ 2 callersMethoddo_isolated_modality_generation
Returns True if the guider is doing isolated modality generation.
packages/ltx-core/src/ltx_core/components/guiders.py:283
↓ 2 callersMethoddo_perturbed_generation
Returns True if the guider is doing perturbed generation.
packages/ltx-core/src/ltx_core/components/guiders.py:279
↓ 2 callersMethoddo_unconditional_generation
Returns True if the guider is doing unconditional generation.
packages/ltx-core/src/ltx_core/components/guiders.py:275
↓ 2 callersMethodfrom_config
(cls, config: dict)
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/encoder_configurator.py:28
↓ 2 callersMethodfrom_dict
Build a factory from a dict of sigma_value -> MultiModalGuiderParams. Keys are sorted descending and used for bin lookup in params(si
packages/ltx-core/src/ltx_core/components/guiders.py:318
↓ 2 callersMethodfrom_video_pixel_shape
( shape: VideoPixelShape, channels: int = 8, mel_bins: int = 16, sample_rate:
packages/ltx-core/src/ltx_core/types.py:150
↓ 2 callersFunctionfused_add_round_launch
(target_weight: torch.Tensor, original_weight: torch.Tensor, seed: int)
packages/ltx-core/src/ltx_core/quantization/fp8_cast.py:17
↓ 2 callersMethodget_data_sources
Text-to-video training requires latents and text conditions. When ``with_audio`` is True, also requires audio latents.
packages/ltx-trainer/src/ltx_trainer/training_strategies/text_to_video.py:48
↓ 2 callersFunctionimage_conditionings_by_adding_guiding_latent
( images: list[ImageConditioningInput], height: int, width: int, video_encoder: VideoEncoder,
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:199
↓ 2 callersFunctionkaiser_sinc_filter1d
(cutoff: float, half_width: float, kernel_size: int)
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:30
↓ 2 callersFunctionload_transformer
Load the LTX transformer model. Args: checkpoint_path: Path to the safetensors checkpoint file device: Device to load model on
packages/ltx-trainer/src/ltx_trainer/model_loader.py:49
↓ 2 callersMethodlog_to_wandb
Log validation outputs (images, videos, or audio) to Weights & Biases.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1042
↓ 2 callersMethodmodel_config
Return the model configuration dictionary extracted from the checkpoint metadata.
packages/ltx-core/src/ltx_core/loader/primitives.py:135
↓ 2 callersFunctionmodify_sd_ops_for_compilation
(original_sd_ops: SDOps, number_of_blocks: int = 48)
packages/ltx-core/src/ltx_core/model/transformer/compiling.py:127
↓ 2 callersFunctionmodule_ops_from_gemma_root
(gemma_root: str)
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:187
↓ 2 callersFunctionnew_video_gen_arg_parser
( params: PipelineParams = LTX_2_3_PARAMS, distilled: bool = False, )
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:405
↓ 2 callersMethodnormalize
(self, x: torch.Tensor)
packages/ltx-core/src/ltx_core/model/audio_vae/ops.py:72
↓ 2 callersFunctionnormalize_images
(images: torch.Tensor, device: torch.device, dtype: torch.dtype)
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:92
↓ 2 callersFunctionparse_resolution_buckets
Parse resolution buckets from string format to list of tuples (frames, height, width)
packages/ltx-trainer/scripts/process_videos.py:1266
↓ 2 callersFunctionparse_timecode
Parse a timecode string into a FrameTimecode object. Supports formats: - Frames: '123' - Seconds: '123s' or '123.45s' - Timecode: '00:
packages/ltx-trainer/scripts/split_scenes.py:120
↓ 2 callersFunctionprecompute_freqs_cis
( indices_grid: torch.Tensor, dim: int, out_dtype: torch.dtype, theta: float = 10000.0, ma
packages/ltx-core/src/ltx_core/model/transformer/rope.py:196
↓ 2 callersFunctionread_lora_reference_downscale_factor
Read ``reference_downscale_factor`` from LoRA safetensors metadata (default 1).
packages/ltx-pipelines/src/ltx_pipelines/iclora_utils.py:23
↓ 2 callersMethodrelease
Attach a compute-done event -- waited before this buffer is recycled.
packages/ltx-core/src/ltx_core/block_streaming/provider.py:113
↓ 2 callersMethodrun
Run denoising with a pre-built transformer. Same semantics as ``__call__`` but accepts a pre-built transformer so the model can be sha
packages/ltx-pipelines/src/ltx_pipelines/utils/blocks.py:326
↓ 2 callersFunctionrun_mid_block
Run features through the middle block.
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:52
↓ 2 callersMethodsample
Sample timesteps for a batch from a stretched shifted logit-normal distribution. Args: batch_size: Number of timesteps to sample
packages/ltx-trainer/src/ltx_trainer/timestep_samplers.py:67
↓ 2 callersMethodshould_skip_step
Returns True if the guider should skip the step.
packages/ltx-core/src/ltx_core/components/guiders.py:287
↓ 2 callersMethodstep
( self, sample: torch.Tensor, denoised_sample: torch.Tensor, sigmas: torch.Tensor, step_index: int, **
packages/ltx-core/src/ltx_core/components/diffusion_steps.py:32
↓ 2 callersMethodto_policy
Build the :class:`QuantizationPolicy` for this kind. ``checkpoint_path`` is required for both backends: ``FP8_SCALED_MM`` uses it to d
packages/ltx-pipelines/src/ltx_pipelines/utils/quantization_factory.py:21
↓ 2 callersMethodto_rgb
(frames: torch.Tensor)
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:915
↓ 2 callersFunctionto_velocity
Convert the sample and its denoised version to velocity. Returns: Velocity
packages/ltx-core/src/ltx_core/utils.py:21
↓ 2 callersMethodun_normalize
(self, x: torch.Tensor)
packages/ltx-core/src/ltx_core/model/audio_vae/ops.py:69
↓ 2 callersMethodun_normalize
(self, x: torch.Tensor)
packages/ltx-core/src/ltx_core/model/video_vae/ops.py:74
↓ 2 callersFunctionunpatchify
Rearrange channels back into spatial dimensions. Inverse of patchify - moves pixels from channels back into patch_size x patch_size blocks (d
packages/ltx-core/src/ltx_core/model/video_vae/ops.py:35
↓ 2 callersMethodunpatchify
Converts latent tensors between spatio-temporal formats and flattened sequence representations. Args: latents: Patch toke
packages/ltx-core/src/ltx_core/components/protocols.py:26
↓ 2 callersFunctionupdate_velocity_and_sample
( noisy_sample: torch.Tensor, denoised_sample: torch.Tensor, sigma: float, previous_velocity: torch.Te
packages/ltx-pipelines/src/ltx_pipelines/utils/samplers.py:104
↓ 2 callersMethodwait
Block until the read finishes; return its error, or ``None`` on success.
packages/ltx-core/src/ltx_core/block_streaming/block_fetcher.py:29
↓ 2 callersMethodwaveform_to_mel
Convert waveform to log-mel spectrogram [batch, channels, time, n_mels].
packages/ltx-core/src/ltx_core/model/audio_vae/ops.py:44
↓ 1 callersMethod__init__
( self, width: int = 1024, height: int = 1024, num_frames: int = 25, f
packages/ltx-trainer/src/ltx_trainer/datasets.py:18
↓ 1 callersMethod__init__
( self, attention_head_dim: int = 128, num_attention_heads: int = 30, num_laye
packages/ltx-core/src/ltx_core/text_encoders/gemma/embeddings_connector.py:93
↓ 1 callersMethod__init__
(self, aggregate_embed: nn.Module, is_av: bool = False)
packages/ltx-core/src/ltx_core/text_encoders/gemma/feature_extractor.py:80
↓ 1 callersMethod__init__
( self, target_sample_rate: int, mel_bins: int, mel_hop_length: int, n
packages/ltx-core/src/ltx_core/model/audio_vae/ops.py:11
↓ 1 callersMethod__init__
Initialize the Encoder. Args: Arguments are configuration parameters, loaded from the audio VAE checkpoint config
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:66
↓ 1 callersMethod__init__
( self, convolution_dimensions: int = 3, in_channels: int = 3, out_channels: i
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:176
↓ 1 callersMethod__init__
( self, in_channels: int, out_channels: int, kernel_size: int, stride:
packages/ltx-core/src/ltx_core/model/video_vae/convolution.py:91
↓ 1 callersMethod__init__
( self, dims: int | Tuple[int, int], in_channels: int, stride: Tuple[int, int,
packages/ltx-core/src/ltx_core/model/video_vae/sampling.py:69
↓ 1 callersMethod__init__
( self, dims: Union[int, Tuple[int, int]], in_channels: int, out_channels: Opt
packages/ltx-core/src/ltx_core/model/video_vae/resnet.py:24
↓ 1 callersMethod_accumulate_temporal_group_into_buffer
Decode and accumulate all tiles of a temporal group into a local buffer. The buffer is local to the group and always starts at time 0
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:950
↓ 1 callersMethod_adjust_output_shape
Adjust output shape to match target dimensions for variable-length audio. This function handles the common case where decoded audio s
packages/ltx-core/src/ltx_core/model/audio_vae/audio_vae.py:426
↓ 1 callersFunction_affected_weight_keys
Return the set of ``.weight`` keys touched by at least one LoRA in the list.
packages/ltx-core/src/ltx_core/loader/fuse_loras.py:157
↓ 1 callersMethod_all_tiles_cond_keep
Vectorized (num_tiles, num_cond) bool: which tiles keep each conditioning token. A conditioning token is kept by a tile when its ``[start, end
packages/ltx-core/src/ltx_core/modality_tiling.py:213
↓ 1 callersFunction_alloc_pinned_exact
Allocate exactly ``nbytes`` of pinned host memory via ``cudaHostRegister``. Bypasses PyTorch's ``CachingHostAllocator``, which rounds every ``
packages/ltx-core/src/ltx_core/block_streaming/utils.py:67
↓ 1 callersMethod_apply_audio_conditionings
Apply all audio-targeting conditionings from the sample's conditions list.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:633
↓ 1 callersMethod_apply_intrinsic_condition
Apply intrinsic conditioning using a binary mask. For each token, the mask value determines conditioning strength: - mask=1: condition
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:464
↓ 1 callersMethod_apply_reference_condition
Concatenate reference latents to target sequence for reference conditioning (IC-LoRA style). The apply/skip decision is batch-wide (reference
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:594
↓ 1 callersMethod_apply_reference_side_by_side
Concatenate reference video pixels side-by-side with generated output if requested.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:721
↓ 1 callersMethod_apply_video_conditionings
Apply all video-targeting conditionings from the sample's conditions list.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:588
↓ 1 callersFunction_atomic_save
Save to ``out`` atomically via per-PID temp file + replace. Crash mid-write leaves an orphan ``.tmp.<pid>`` file that the skip logic ignores.
packages/ltx-trainer/scripts/process_captions.py:364
↓ 1 callersFunction_audio_frame_to_float
Convert an audio frame to a float32 ndarray with values in [-1, 1] and shape (channels, samples).
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:475
↓ 1 callersFunction_block_layouts
Per-block layout of the streamed tensors, taken from the meta model. Blocks may differ in shape and even in which tensors they have (e.g. Gemma4's
packages/ltx-core/src/ltx_core/block_streaming/builder.py:428
↓ 1 callersFunction_build_arg_parser
Build the argument parser for HDR IC-LoRA batch inference.
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:742
↓ 1 callersMethod_build_checkpoint_metadata
Build metadata dictionary for safetensors checkpoint. Delegates to the training strategy to get strategy-specific metadata that downst
packages/ltx-trainer/src/ltx_trainer/trainer.py:1068
↓ 1 callersMethod_build_disk_source
Create a DiskWeightSource backed by a DiskBlockReader. Pool slots are sized to the largest block and carved per block on read, so hete
packages/ltx-core/src/ltx_core/block_streaming/builder.py:342
← previousnext →201–300 of 1,165, ranked by callers