Instructions to use vidfom/Ltx-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use vidfom/Ltx-3 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="vidfom/Ltx-3", filename="ComfyUI/models/text_encoders/gemma-3-12b-it-qat-UD-Q4_K_XL.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use vidfom/Ltx-3 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf vidfom/Ltx-3:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf vidfom/Ltx-3:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf vidfom/Ltx-3:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf vidfom/Ltx-3:UD-Q4_K_XL
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf vidfom/Ltx-3:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf vidfom/Ltx-3:UD-Q4_K_XL
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf vidfom/Ltx-3:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf vidfom/Ltx-3:UD-Q4_K_XL
Use Docker
docker model run hf.co/vidfom/Ltx-3:UD-Q4_K_XL
- LM Studio
- Jan
- Ollama
How to use vidfom/Ltx-3 with Ollama:
ollama run hf.co/vidfom/Ltx-3:UD-Q4_K_XL
- Unsloth Studio new
How to use vidfom/Ltx-3 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for vidfom/Ltx-3 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for vidfom/Ltx-3 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for vidfom/Ltx-3 to start chatting
- Docker Model Runner
How to use vidfom/Ltx-3 with Docker Model Runner:
docker model run hf.co/vidfom/Ltx-3:UD-Q4_K_XL
- Lemonade
How to use vidfom/Ltx-3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull vidfom/Ltx-3:UD-Q4_K_XL
Run and chat with the model
lemonade run user.Ltx-3-UD-Q4_K_XL
List all available models
lemonade list
| import folder_paths | |
| import comfy.controlnet | |
| import comfy.model_management | |
| from nodes import NODE_CLASS_MAPPINGS | |
| union_controlnet_types = {"auto": -1, "openpose": 0, "depth": 1, "hed/pidi/scribble/ted": 2, "canny/lineart/anime_lineart/mlsd": 3, "normal": 4, "segment": 5, "tile": 6, "repaint": 7} | |
| class easyControlnet: | |
| def __init__(self): | |
| pass | |
| def apply(self, control_net_name, image, positive, negative, strength, start_percent=0, end_percent=1, control_net=None, scale_soft_weights=1, mask=None, union_type=None, easyCache=None, use_cache=True, model=None, vae=None): | |
| if strength == 0: | |
| return (positive, negative) | |
| # kolors controlnet patch | |
| from ..modules.kolors.loader import is_kolors_model, applyKolorsUnet | |
| if is_kolors_model(model): | |
| from ..modules.kolors.model_patch import patch_controlnet | |
| if control_net is None: | |
| with applyKolorsUnet(): | |
| control_net = easyCache.load_controlnet(control_net_name, scale_soft_weights, use_cache) | |
| control_net = patch_controlnet(model, control_net) | |
| else: | |
| if control_net is None: | |
| if easyCache is not None: | |
| control_net = easyCache.load_controlnet(control_net_name, scale_soft_weights, use_cache) | |
| else: | |
| controlnet_path = folder_paths.get_full_path("controlnet", control_net_name) | |
| control_net = comfy.controlnet.load_controlnet(controlnet_path) | |
| # union controlnet | |
| if union_type is not None: | |
| control_net = control_net.copy() | |
| type_number = union_controlnet_types[union_type] | |
| if type_number >= 0: | |
| control_net.set_extra_arg("control_type", [type_number]) | |
| else: | |
| control_net.set_extra_arg("control_type", []) | |
| if mask is not None: | |
| mask = mask.to(self.device) | |
| if mask is not None and len(mask.shape) < 3: | |
| mask = mask.unsqueeze(0) | |
| control_hint = image.movedim(-1, 1) | |
| is_cond = True | |
| if negative is None: | |
| p = [] | |
| for t in positive: | |
| n = [t[0], t[1].copy()] | |
| c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent)) | |
| if 'control' in t[1]: | |
| c_net.set_previous_controlnet(t[1]['control']) | |
| n[1]['control'] = c_net | |
| n[1]['control_apply_to_uncond'] = True | |
| if mask is not None: | |
| n[1]['mask'] = mask | |
| n[1]['set_area_to_bounds'] = False | |
| p.append(n) | |
| positive = p | |
| else: | |
| cnets = {} | |
| out = [] | |
| for conditioning in [positive, negative]: | |
| c = [] | |
| for t in conditioning: | |
| d = t[1].copy() | |
| prev_cnet = d.get('control', None) | |
| if prev_cnet in cnets: | |
| c_net = cnets[prev_cnet] | |
| else: | |
| c_net = control_net.copy().set_cond_hint(control_hint, strength, (start_percent, end_percent), vae) | |
| c_net.set_previous_controlnet(prev_cnet) | |
| cnets[prev_cnet] = c_net | |
| d['control'] = c_net | |
| d['control_apply_to_uncond'] = False | |
| if mask is not None: | |
| d['mask'] = mask | |
| d['set_area_to_bounds'] = False | |
| n = [t[0], d] | |
| c.append(n) | |
| out.append(c) | |
| positive = out[0] | |
| negative = out[1] | |
| return (positive, negative) |