MCPcopy Create free account

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

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

↓ 240 callersMethodget
(self, paths: list[str], sd_ops: SDOps | None)
packages/ltx-core/src/ltx_core/loader/registry.py:26
↓ 226 callersMethodto
(self, **kwargs: object)
packages/ltx-core/src/ltx_core/types.py:181
↓ 57 callersFunctioncheck_config_value
(config: dict, key: str, expected: Any)
packages/ltx-core/src/ltx_core/utils.py:15
↓ 35 callersMethodempty
()
packages/ltx-core/src/ltx_core/guidance/perturbations.py:47
↓ 32 callersMethodwith_matching
Create a new SDOps instance with the specified prefix, suffix and contains matching added to the mapping.
packages/ltx-core/src/ltx_core/loader/sd_ops.py:76
↓ 27 callersMethodwith_replacement
Create a new SDOps instance with the specified replacement added to the mapping.
packages/ltx-core/src/ltx_core/loader/sd_ops.py:70
↓ 24 callersMethodclone
(self)
packages/ltx-core/src/ltx_core/types.py:204
↓ 22 callersMethodload
Load state dict from path or paths (for sharded model storage) and apply sd_ops
packages/ltx-core/src/ltx_core/loader/primitives.py:58
↓ 20 callersMethoddefault
(cls)
packages/ltx-core/src/ltx_core/types.py:32
↓ 19 callersMethodbuild
( self, device: torch.device | None = None, dtype: torch.dtype | None = None,
packages/ltx-core/src/ltx_core/loader/primitives.py:68
↓ 17 callersMethodencode
Run a single fused Gemma forward over a batch of prompts. Calls the inner model (self.model.model) to skip lm_head logits computation
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:31
↓ 17 callersMethodpop
(self, paths: list[str], sd_ops: SDOps | None)
packages/ltx-core/src/ltx_core/loader/registry.py:24
↓ 17 callersMethodto_torch_shape
(self)
packages/ltx-core/src/ltx_core/types.py:53
↓ 15 callersMethodclose
(self)
packages/ltx-core/src/ltx_core/block_streaming/disk.py:39
↓ 14 callersFunctionpost_process_latent
Blend denoised output with clean state based on mask.
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:257
↓ 13 callersMethodupdate
Record per-element losses into their sigma buckets. Args: sigmas: Per-element sigma values, one per batch element. los
packages/ltx-trainer/src/ltx_trainer/sigma_tracker.py:41
↓ 12 callersFunctioncombined_image_conditionings
Create a list of conditionings by replacing the latent at the first frame with the encoded image if present and using other encoded images as the
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:132
↓ 12 callersMethoddecode
Decode all latent files in the directory recursively. Args: latents_dir: Directory containing latent files (.pt) outpu
packages/ltx-trainer/scripts/decode_latents.py:87
↓ 12 callersFunctionget_device
()
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:30
↓ 12 callersFunctionmake_conv_nd
( # noqa: PLR0913 dims: Union[int, Tuple[int, int]], in_channels: int, out_channels: int, ker
packages/ltx-core/src/ltx_core/model/video_vae/convolution.py:11
↓ 12 callersMethodsplit
Split along the batch dimension into chunks of the given sizes.
packages/ltx-core/src/ltx_core/model/transformer/modality.py:57
↓ 11 callersFunctionfmt
Format any value for display.
packages/ltx-trainer/src/ltx_trainer/config_display.py:15
↓ 11 callersMethodparse_args
( # type: ignore[override] self, args: Sequence[str] | None = None, namespace: argpar
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:247
↓ 11 callersMethodpatchify
Patchify the latent state.
packages/ltx-core/src/ltx_core/tools.py:39
↓ 10 callersMethod__init__
( self, in_features: int, alpha: float = 1.0, alpha_trainable: bool = True,
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:166
↓ 10 callersFunctiongpu_model
Context manager that yields a model and releases its memory on exit. Moves all parameters and buffers to ``meta`` device on exit, which immedi
packages/ltx-pipelines/src/ltx_pipelines/utils/gpu_model.py:13
↓ 9 callersFunction_to_torch_device
Convert device specification to torch.device.
packages/ltx-trainer/src/ltx_trainer/model_loader.py:39
↓ 9 callersFunctionencode_video
( video: torch.Tensor | Iterator[torch.Tensor], fps: int, audio: Audio | None, output_path: st
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:327
↓ 9 callersFunctionmake_conv2d
Create a 2D convolution layer that can be either causal or non-causal. Args: in_channels: Number of input channels out_channe
packages/ltx-core/src/ltx_core/model/audio_vae/causal_conv_2d.py:67
↓ 8 callersFunctionassert_resolution
Assert that the resolution is divisible by the required divisor. For two-stage pipelines, the resolution must be divisible by 64. For one-stag
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:330
↓ 8 callersMethodclear
(self)
packages/ltx-core/src/ltx_core/loader/registry.py:28
↓ 8 callersFunctiondetect_params
Detect pipeline params from checkpoint metadata. Reads the ``model_version`` field from the safetensors config metadata. Returns ``LTX_2_3_PAR
packages/ltx-pipelines/src/ltx_pipelines/utils/constants.py:108
↓ 8 callersMethodexecute
( self, steps: int, latent: torch.Tensor | None = None, max_shift: float = 2.0
packages/ltx-core/src/ltx_core/components/schedulers.py:21
↓ 8 callersMethodget_patch_grid_bounds
( self, output_shape: AudioLatentShape | VideoLatentShape, device: torch.device | None
packages/ltx-core/src/ltx_core/components/protocols.py:48
↓ 8 callersFunctionget_video_chunks_number
Get the number of video chunks for a given number of frames and tiling configuration. Args: num_frames: Number of frames in the video
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:997
↓ 8 callersMethodstep
( self, sample: torch.Tensor, denoised_sample: torch.Tensor, sigmas: torch.Tensor, step_index: int, **
packages/ltx-core/src/ltx_core/components/protocols.py:99
↓ 8 callersFunctionto_latent
(v: int, scale: int, max_v: int)
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1175
↓ 8 callersMethodwith_kv_operation
Create a new SDOps instance with the specified value operation added to the mapping.
packages/ltx-core/src/ltx_core/loader/sd_ops.py:89
↓ 7 callersFunction_load_paths_from_dataset
Load file paths from a dataset column, resolving relative to the dataset file's directory.
packages/ltx-trainer/scripts/process_videos.py:1206
↓ 7 callersFunctioncreate_multimodal_guider_factory
Create or return a MultiModalGuiderFactory. Pass constant params for a single-params factory (uses MultiModalGuiderFactory.constant), or an e
packages/ltx-core/src/ltx_core/components/guiders.py:345
↓ 7 callersFunctiondetect_checkpoint_path
Pre-parse argv to extract the checkpoint path before building the full parser.
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:257
↓ 7 callersMethodget_ada_values
( self, scale_shift_table: torch.Tensor, batch_size: int, timestep: torch.Tensor, indices: slice )
packages/ltx-core/src/ltx_core/model/transformer/transformer.py:190
↓ 7 callersMethodget_tensor
(self, key: str)
packages/ltx-core/src/ltx_core/block_streaming/disk.py:36
↓ 7 callersMethodis_audio_enabled
(self)
packages/ltx-core/src/ltx_core/model/transformer/model.py:37
↓ 7 callersMethodis_video_enabled
(self)
packages/ltx-core/src/ltx_core/model/transformer/model.py:34
↓ 7 callersMethodpatchify
( self, latents: torch.Tensor, )
packages/ltx-core/src/ltx_core/components/protocols.py:13
↓ 7 callersFunctionread_video
Load frames from a video file using PyAV. Args: video_path: Path to the video file max_frames: Maximum number of frames to read. I
packages/ltx-trainer/src/ltx_trainer/video_utils.py:45
↓ 6 callersFunction_output_relative
Relative path used to name a sample's cached output, mirroring the input layout. Normally media lives under the dataset directory and this is just
packages/ltx-trainer/scripts/process_videos.py:1193
↓ 6 callersMethodapply_to
Apply the conditioning to the latent state. Args: latent_state: The latent state to apply the conditioning to. This is st
packages/ltx-core/src/ltx_core/conditioning/item.py:10
↓ 6 callersMethodfrom_pixel_shape
( shape: VideoPixelShape, latent_channels: int = 128, scale_factors: SpatioTemporalSca
packages/ltx-core/src/ltx_core/types.py:74
↓ 6 callersMethodfrom_torch_shape
(shape: torch.Size)
packages/ltx-core/src/ltx_core/types.py:57
↓ 6 callersFunctionget_padding
(kernel_size: int, dilation: int = 1)
packages/ltx-core/src/ltx_core/model/audio_vae/vocoder.py:12
↓ 6 callersFunctionlayout_nbytes
Byte size of one contiguous, 16-byte-aligned buffer holding *layout* (>= 1).
packages/ltx-core/src/ltx_core/block_streaming/utils.py:135
↓ 6 callersFunctionload_state_dict
Load a state dict from disk, using registry caching.
packages/ltx-core/src/ltx_core/loader/helpers.py:19
↓ 6 callersMethodprepare
( self, modality: Modality, cross_modality: Modality | None = None, # noqa: ARG002
packages/ltx-core/src/ltx_core/model/transformer/transformer_args.py:206
↓ 6 callersMethodresult_or_none
( cls, denoised: torch.Tensor | None, uncond: torch.Tensor | None = None, cond
packages/ltx-pipelines/src/ltx_pipelines/utils/types.py:60
↓ 6 callersMethodto_callable
Resolve to a concrete callable. Use this at module init time so that torch.compile can trace through the attention call without graph breaks.
packages/ltx-core/src/ltx_core/model/transformer/attention.py:337
↓ 5 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_videos.py:1332
↓ 5 callersMethod_get_video_positions
Generate video position embeddings using ltx_core's native implementation. Args: num_frames: Number of latent frames h
packages/ltx-trainer/src/ltx_trainer/training_strategies/base_strategy.py:129
↓ 5 callersFunction_memory_format_of
Pick the memory format for a workspace allocation. When ``prefer_channels_last_3d`` is True and ``t`` is 5D, return ``channels_last_3d`` regar
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:59
↓ 5 callersFunction_repeat
(t: torch.Tensor)
packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py:43
↓ 5 callersFunction_resolve_sdpa_variant
Build a single-backend ``PytorchAttention`` pin, raising if the backend can't actually serve the call on this machine. Used by both :meth:`Att
packages/ltx-core/src/ltx_core/model/transformer/attention.py:307
↓ 5 callersFunctionbuild_normalization_layer
Create a normalization layer based on the normalization type. Args: in_channels: Number of input channels num_groups: Number
packages/ltx-core/src/ltx_core/model/common/normalization.py:43
↓ 5 callersFunctionget_pixel_coords
Map latent-space `[start, end)` coordinates to their pixel-space equivalents by scaling each axis (frame/time, height, width) with the corres
packages/ltx-core/src/ltx_core/components/patchifiers.py:137
↓ 5 callersMethodget_token_count
(self, tgt_shape: AudioLatentShape)
packages/ltx-core/src/ltx_core/components/patchifiers.py:213
↓ 5 callersFunctionget_videostream_metadata
Read video stream metadata as a VideoPixelShape with batch=1. If frame count is missing in the container, decodes the stream to count frames.
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:498
↓ 5 callersMethodmetadata
Load metadata from path
packages/ltx-core/src/ltx_core/loader/primitives.py:52
↓ 5 callersFunctionmodality_from_latent_state
Create a Modality from a latent state. Constructs a Modality object with the latent state's data, timesteps derived from the denoise mask and
packages/ltx-pipelines/src/ltx_pipelines/utils/helpers.py:262
↓ 5 callersFunctionrms_norm
Root-mean-square (RMS) normalize `x` over its last dimension. Thin wrapper around `torch.nn.functional.rms_norm` that infers the normalized sh
packages/ltx-core/src/ltx_core/utils.py:7
↓ 5 callersFunctionto_denoised
Convert the sample and its denoising velocity to denoised sample. Returns: Denoised sample
packages/ltx-core/src/ltx_core/utils.py:39
↓ 5 callersFunctionto_mapping_operation
Create a mapping operation over a set of tiling intervals. The given mapping function is applied to each interval in the input dimension. The resu
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:1013
↓ 5 callersMethodtoken_count
Number of tokens after patchification with the default patch size of 1.
packages/ltx-core/src/ltx_core/types.py:66
↓ 4 callersFunction_ensure_guider
Return the guider as-is, or a positive-only guider for absent modalities.
packages/ltx-pipelines/src/ltx_pipelines/utils/denoisers.py:31
↓ 4 callersMethodapply_to_key_value
Apply the value operation to the given name and associated value.
packages/ltx-core/src/ltx_core/loader/sd_ops.py:124
↓ 4 callersFunctionbasic_arg_parser
( params: PipelineParams = LTX_2_3_PARAMS, distilled: bool = False, )
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:266
↓ 4 callersFunctioncarve_buffer
Carve per-key tensor views for *layout* into the front of *buffer*. *buffer* is a 1-D ``uint8`` tensor at least :func:`layout_nbytes` long. Each
packages/ltx-core/src/ltx_core/block_streaming/utils.py:140
↓ 4 callersFunctiondecode_video_by_frame
Decodes video from a file by sequential frame index, without relying on pts. Args: path: Path to the video file. device: Device to
packages/ltx-pipelines/src/ltx_pipelines/utils/media_io.py:583
↓ 4 callersFunctiondefault_2_stage_arg_parser
(params: PipelineParams = LTX_2_3_PARAMS)
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:709
↓ 4 callersFunctionfind_matching_file
Recursively search for files matching a glob pattern and return the first match.
packages/ltx-core/src/ltx_core/utils.py:55
↓ 4 callersMethodfrom_duration
( batch: int, duration: float, channels: int = 8, mel_bins: int = 16,
packages/ltx-core/src/ltx_core/types.py:131
↓ 4 callersMethodget_av_ca_ada_values
( self, scale_shift_table: torch.Tensor, batch_size: int, scale_shift_timestep
packages/ltx-core/src/ltx_core/model/transformer/transformer.py:201
↓ 4 callersFunctioninplace_conv3d_temporal_chunked
Run a 3x3x3 Conv3d in-place on a temporally-padded workspace. The workspace has shape ``[B, C, T+2, H, W]`` where positions ``[1:-1]`` hold th
packages/ltx-core/src/ltx_core/model/video_vae/memory_efficient_decode.py:109
↓ 4 callersMethodis_perturbed
(self, perturbation_type: PerturbationType, block: int)
packages/ltx-core/src/ltx_core/guidance/perturbations.py:24
↓ 4 callersFunctionopen_image_as_srgb
Opens an image file, applies rotation (if it's set in metadata) and converts it to the sRGB color space respecting the original image color s
packages/ltx-trainer/src/ltx_trainer/utils.py:10
↓ 4 callersMethodrelease
Signal that an async operation using these weights is guarded by *event*.
packages/ltx-core/src/ltx_core/block_streaming/source.py:36
↓ 4 callersFunctionresolve_existing_path
Resolve *path* and verify it exists.
packages/ltx-pipelines/src/ltx_pipelines/utils/args.py:218
↓ 4 callersMethodsize
(self)
packages/ltx-core/src/ltx_core/block_streaming/utils.py:111
↓ 4 callersFunctionsplit_by_count
Split a dimension into a given number of tiles with overlap. Computes the tile size as ``(dim_size + overlap * (num_tiles - 1)) // num_tiles``
packages/ltx-core/src/ltx_core/tiling.py:245
↓ 4 callersFunctionsplit_by_size
Split a dimension into overlapping tiles of a given size. Tiles are sized ``size`` with ``overlap`` shared elements between consecutive tiles.
packages/ltx-core/src/ltx_core/tiling.py:132
↓ 4 callersMethodtiled_encode
Encode video to latent using tiled processing of the given video tensor. Device Handling: - Input video can be on CPU or GPU
packages/ltx-core/src/ltx_core/model/video_vae/video_vae.py:328
↓ 4 callersMethodunpatchify
Unpatchify the latent state.
packages/ltx-core/src/ltx_core/tools.py:54
↓ 4 callersFunctionupdate_attention_mask
Build or update the self-attention mask for newly appended conditioning tokens. If *attention_mask* is ``None`` and no existing mask is present, r
packages/ltx-core/src/ltx_core/conditioning/mask_utils.py:76
↓ 3 callersFunction_build_caption_projections
Build caption projections for the transformer when projection is NOT in the text encoder. 19B models: projection is in the transformer (caption_pr
packages/ltx-core/src/ltx_core/model/transformer/model_configurator.py:178
↓ 3 callersFunction_cat_with_padding
Concatenate a tensor with a padding tensor of the given value.
packages/ltx-core/src/ltx_core/text_encoders/gemma/encoders/base_encoder.py:148
↓ 3 callersMethod_chat
Send one chat-completions request and return the raw response text.
packages/ltx-trainer/src/ltx_trainer/captioning.py:228
↓ 3 callersFunction_clamp_dim_tiling
Clamp a single dim's tile count and overlap to the latent's extent. ``split_by_count`` requires ``overlap < tile_size``; with ``tile_size = (d
packages/ltx-pipelines/src/ltx_pipelines/hdr_ic_lora.py:98
↓ 3 callersMethod_compute_temporal_mask
Compute float mask for temporal region (prefix or suffix). Returns [B, seq_len] in {0, 1}.
packages/ltx-trainer/src/ltx_trainer/training_strategies/flexible.py:522
↓ 3 callersMethod_embedding_output_path
Output `.pt` path relative to the dataset dir; mirrors `process_videos._output_relative` so caption keys match video/audio latent keys (and ab
packages/ltx-trainer/scripts/process_captions.py:157
↓ 3 callersMethod_encode_audio
Encode an audio file through the audio VAE encoder. Returns latent on CPU.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:910
↓ 3 callersMethod_encode_video
Encode a [B, C, F, H, W] video tensor through the VAE. Returns latent on CPU.
packages/ltx-trainer/src/ltx_trainer/validation_runner.py:1160
next →1–100 of 1,165, ranked by callers