Instructions to use elismasilva/ltx2.3_image_custom_blocks with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use elismasilva/ltx2.3_image_custom_blocks with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("elismasilva/ltx2.3_image_custom_blocks", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - LTX-2
How to use elismasilva/ltx2.3_image_custom_blocks with LTX-2:
# Install the LTX-2 pipelines git clone https://github.com/Lightricks/LTX-2.git cd LTX-2 uv sync --frozen
# Download the weights from this repo, plus the Gemma text encoder hf download elismasilva/ltx2.3_image_custom_blocks --local-dir models/ltx2.3_image_custom_blocks hf download google/gemma-3-12b-it-qat-q4_0-unquantized --local-dir models/gemma-3-12b
# Fast pipeline (distilled model, no distilled LoRA needed) uv run python -m ltx_pipelines.distilled \ --distilled-checkpoint-path models/ltx2.3_image_custom_blocks/<distilled-checkpoint>.safetensors \ --spatial-upsampler-path models/ltx2.3_image_custom_blocks/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8# HQ pipeline (two-stage, higher quality) uv run python -m ltx_pipelines.ti2vid_two_stages_hq \ --checkpoint-path models/ltx2.3_image_custom_blocks/<checkpoint>.safetensors \ --distilled-lora models/ltx2.3_image_custom_blocks/<distilled-lora>.safetensors 0.8 \ --spatial-upsampler-path models/ltx2.3_image_custom_blocks/<spatial-upsampler>.safetensors \ --gemma-root models/gemma-3-12b \ --prompt "A beautiful sunset over the ocean" \ --output-path output.mp4 # For image-to-video, add: --image path/to/image.jpg 0 0.8 - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
LTX 2 Image custom modular blocks
Custom Modular Diffusers blocks that
extend LTX 2 Image with image-to-image, plus a unified AutoBlocks that folds text-to-image and img2img into a
single pipeline. The workflow is chosen automatically from which inputs you pass.
prompt -> text2image
prompt + image -> image2image (optional strength)
Loading & running
import torch
from diffusers import ModularPipeline
pipe = ModularPipeline.from_pretrained(
"elismasilva/ltx2.3_image_custom_blocks",
trust_remote_code=True,
)
pipe.load_components(
names=["text_encoder", "tokenizer", "connectors", "transformer", "vae", "scheduler"],
pretrained_model_name_or_path="elismasilva/ltx2.3-image-base",
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
image = pipe(
prompt="a cinematic close-up portrait with crisp realistic detail",
height=704,
width=1280,
num_inference_steps=8,
output="images",
)[0]
image.save("ltx2_image_t2i.png")
image-to-image
Pass an image and optional strength to the same pipe:
import torch
from diffusers import ModularPipeline
from diffusers.utils import load_image
pipe = ModularPipeline.from_pretrained(
"elismasilva/ltx2.3_image_custom_blocks",
trust_remote_code=True,
)
pipe.load_components(
names=["text_encoder", "tokenizer", "connectors", "transformer", "vae", "scheduler"],
pretrained_model_name_or_path="elismasilva/ltx2.3-image-base",
torch_dtype=torch.bfloat16,
)
pipe.to("cuda")
init_image = load_image("input.png")
result = pipe(
prompt="preserve the scene while restoring crisp natural detail",
image=init_image,
height=704,
width=1280,
num_inference_steps=8,
strength=0.20,
output="images",
)[0]
result.save("ltx2_image_i2i.png")
Blocks
The unified pipeline is composed of six modular blocks:
LTX2ImageTextEncoderStepencodes prompts into packed per-layer Gemma hidden states.LTX2ImageConnectorStepadapts those hidden states with the image text connectors.LTX2ImageVaeEncoderStepoptionally encodes an input image for img2img.LTX2ImagePrepareLatentsStepprepares one-frame image latents and FlowMatch timesteps.LTX2ImageDenoiseStepruns the LTX 2 Image denoising loop.LTX2ImageDecodeStepdecodes latents into images or returns latent output.
Components
The blocks expect the following components from elismasilva/ltx2.3-image-base:
text_encodertokenizerconnectorstransformervaescheduler
Notes
The pipeline supports prompt embeds, custom sigmas or timesteps, guidance_scale, guidance_rescale, PAG inputs
(pag_scale and pag_applied_layers), and VAE decode controls (decode_timestep and decode_noise_scale). For img2img,
input_noise_sigma, input_sharpen, phase_cutoff, phase_transition_width, and phase_pad_factor can be used when
you need more control over how the input image is converted into latents.
- Downloads last month
- -