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
| from typing_extensions import override | |
| from comfy_api.latest import IO, ComfyExtension, Input | |
| from comfy_api_nodes.apis.bria import ( | |
| BriaEditImageRequest, | |
| BriaRemoveBackgroundRequest, | |
| BriaRemoveBackgroundResponse, | |
| BriaRemoveVideoBackgroundRequest, | |
| BriaRemoveVideoBackgroundResponse, | |
| BriaImageEditResponse, | |
| BriaStatusResponse, | |
| InputModerationSettings, | |
| ) | |
| from comfy_api_nodes.util import ( | |
| ApiEndpoint, | |
| convert_mask_to_image, | |
| download_url_to_image_tensor, | |
| download_url_to_video_output, | |
| poll_op, | |
| sync_op, | |
| upload_image_to_comfyapi, | |
| upload_video_to_comfyapi, | |
| validate_video_duration, | |
| ) | |
| class BriaImageEditNode(IO.ComfyNode): | |
| def define_schema(cls): | |
| return IO.Schema( | |
| node_id="BriaImageEditNode", | |
| display_name="Bria FIBO Image Edit", | |
| category="api node/image/Bria", | |
| description="Edit images using Bria latest model", | |
| inputs=[ | |
| IO.Combo.Input("model", options=["FIBO"]), | |
| IO.Image.Input("image"), | |
| IO.String.Input( | |
| "prompt", | |
| multiline=True, | |
| default="", | |
| tooltip="Instruction to edit image", | |
| ), | |
| IO.String.Input("negative_prompt", multiline=True, default=""), | |
| IO.String.Input( | |
| "structured_prompt", | |
| multiline=True, | |
| default="", | |
| tooltip="A string containing the structured edit prompt in JSON format. " | |
| "Use this instead of usual prompt for precise, programmatic control.", | |
| ), | |
| IO.Int.Input( | |
| "seed", | |
| default=1, | |
| min=1, | |
| max=2147483647, | |
| step=1, | |
| display_mode=IO.NumberDisplay.number, | |
| control_after_generate=True, | |
| ), | |
| IO.Float.Input( | |
| "guidance_scale", | |
| default=3, | |
| min=3, | |
| max=5, | |
| step=0.01, | |
| display_mode=IO.NumberDisplay.number, | |
| tooltip="Higher value makes the image follow the prompt more closely.", | |
| ), | |
| IO.Int.Input( | |
| "steps", | |
| default=50, | |
| min=20, | |
| max=50, | |
| step=1, | |
| display_mode=IO.NumberDisplay.number, | |
| ), | |
| IO.DynamicCombo.Input( | |
| "moderation", | |
| options=[ | |
| IO.DynamicCombo.Option("false", []), | |
| IO.DynamicCombo.Option( | |
| "true", | |
| [ | |
| IO.Boolean.Input("prompt_content_moderation", default=False), | |
| IO.Boolean.Input("visual_input_moderation", default=False), | |
| IO.Boolean.Input("visual_output_moderation", default=True), | |
| ], | |
| ), | |
| ], | |
| tooltip="Moderation settings", | |
| ), | |
| IO.Mask.Input( | |
| "mask", | |
| tooltip="If omitted, the edit applies to the entire image.", | |
| optional=True, | |
| ), | |
| ], | |
| outputs=[ | |
| IO.Image.Output(), | |
| IO.String.Output(display_name="structured_prompt"), | |
| ], | |
| hidden=[ | |
| IO.Hidden.auth_token_comfy_org, | |
| IO.Hidden.api_key_comfy_org, | |
| IO.Hidden.unique_id, | |
| ], | |
| is_api_node=True, | |
| price_badge=IO.PriceBadge( | |
| expr="""{"type":"usd","usd":0.04}""", | |
| ), | |
| ) | |
| async def execute( | |
| cls, | |
| model: str, | |
| image: Input.Image, | |
| prompt: str, | |
| negative_prompt: str, | |
| structured_prompt: str, | |
| seed: int, | |
| guidance_scale: float, | |
| steps: int, | |
| moderation: InputModerationSettings, | |
| mask: Input.Image | None = None, | |
| ) -> IO.NodeOutput: | |
| if not prompt and not structured_prompt: | |
| raise ValueError("One of prompt or structured_prompt is required to be non-empty.") | |
| mask_url = None | |
| if mask is not None: | |
| mask_url = await upload_image_to_comfyapi(cls, convert_mask_to_image(mask), wait_label="Uploading mask") | |
| response = await sync_op( | |
| cls, | |
| ApiEndpoint(path="proxy/bria/v2/image/edit", method="POST"), | |
| data=BriaEditImageRequest( | |
| instruction=prompt if prompt else None, | |
| structured_instruction=structured_prompt if structured_prompt else None, | |
| images=[await upload_image_to_comfyapi(cls, image, wait_label="Uploading image")], | |
| mask=mask_url, | |
| negative_prompt=negative_prompt if negative_prompt else None, | |
| guidance_scale=guidance_scale, | |
| seed=seed, | |
| model_version=model, | |
| steps_num=steps, | |
| prompt_content_moderation=moderation.get("prompt_content_moderation", False), | |
| visual_input_content_moderation=moderation.get("visual_input_moderation", False), | |
| visual_output_content_moderation=moderation.get("visual_output_moderation", False), | |
| ), | |
| response_model=BriaStatusResponse, | |
| ) | |
| response = await poll_op( | |
| cls, | |
| ApiEndpoint(path=f"/proxy/bria/v2/status/{response.request_id}"), | |
| status_extractor=lambda r: r.status, | |
| response_model=BriaImageEditResponse, | |
| ) | |
| return IO.NodeOutput( | |
| await download_url_to_image_tensor(response.result.image_url), | |
| response.result.structured_prompt, | |
| ) | |
| class BriaRemoveImageBackground(IO.ComfyNode): | |
| def define_schema(cls): | |
| return IO.Schema( | |
| node_id="BriaRemoveImageBackground", | |
| display_name="Bria Remove Image Background", | |
| category="api node/image/Bria", | |
| description="Remove the background from an image using Bria RMBG 2.0.", | |
| inputs=[ | |
| IO.Image.Input("image"), | |
| IO.DynamicCombo.Input( | |
| "moderation", | |
| options=[ | |
| IO.DynamicCombo.Option("false", []), | |
| IO.DynamicCombo.Option( | |
| "true", | |
| [ | |
| IO.Boolean.Input("visual_input_moderation", default=False), | |
| IO.Boolean.Input("visual_output_moderation", default=True), | |
| ], | |
| ), | |
| ], | |
| tooltip="Moderation settings", | |
| ), | |
| IO.Int.Input( | |
| "seed", | |
| default=0, | |
| min=0, | |
| max=2147483647, | |
| display_mode=IO.NumberDisplay.number, | |
| control_after_generate=True, | |
| tooltip="Seed controls whether the node should re-run; " | |
| "results are non-deterministic regardless of seed.", | |
| ), | |
| ], | |
| outputs=[IO.Image.Output()], | |
| hidden=[ | |
| IO.Hidden.auth_token_comfy_org, | |
| IO.Hidden.api_key_comfy_org, | |
| IO.Hidden.unique_id, | |
| ], | |
| is_api_node=True, | |
| price_badge=IO.PriceBadge( | |
| expr="""{"type":"usd","usd":0.018}""", | |
| ), | |
| ) | |
| async def execute( | |
| cls, | |
| image: Input.Image, | |
| moderation: dict, | |
| seed: int, | |
| ) -> IO.NodeOutput: | |
| response = await sync_op( | |
| cls, | |
| ApiEndpoint(path="/proxy/bria/v2/image/edit/remove_background", method="POST"), | |
| data=BriaRemoveBackgroundRequest( | |
| image=await upload_image_to_comfyapi(cls, image, wait_label="Uploading image"), | |
| sync=False, | |
| visual_input_content_moderation=moderation.get("visual_input_moderation", False), | |
| visual_output_content_moderation=moderation.get("visual_output_moderation", False), | |
| seed=seed, | |
| ), | |
| response_model=BriaStatusResponse, | |
| ) | |
| response = await poll_op( | |
| cls, | |
| ApiEndpoint(path=f"/proxy/bria/v2/status/{response.request_id}"), | |
| status_extractor=lambda r: r.status, | |
| response_model=BriaRemoveBackgroundResponse, | |
| ) | |
| return IO.NodeOutput(await download_url_to_image_tensor(response.result.image_url)) | |
| class BriaRemoveVideoBackground(IO.ComfyNode): | |
| def define_schema(cls): | |
| return IO.Schema( | |
| node_id="BriaRemoveVideoBackground", | |
| display_name="Bria Remove Video Background", | |
| category="api node/video/Bria", | |
| description="Remove the background from a video using Bria. ", | |
| inputs=[ | |
| IO.Video.Input("video"), | |
| IO.Combo.Input( | |
| "background_color", | |
| options=[ | |
| "Black", | |
| "White", | |
| "Gray", | |
| "Red", | |
| "Green", | |
| "Blue", | |
| "Yellow", | |
| "Cyan", | |
| "Magenta", | |
| "Orange", | |
| ], | |
| tooltip="Background color for the output video.", | |
| ), | |
| IO.Int.Input( | |
| "seed", | |
| default=0, | |
| min=0, | |
| max=2147483647, | |
| display_mode=IO.NumberDisplay.number, | |
| control_after_generate=True, | |
| tooltip="Seed controls whether the node should re-run; " | |
| "results are non-deterministic regardless of seed.", | |
| ), | |
| ], | |
| outputs=[IO.Video.Output()], | |
| hidden=[ | |
| IO.Hidden.auth_token_comfy_org, | |
| IO.Hidden.api_key_comfy_org, | |
| IO.Hidden.unique_id, | |
| ], | |
| is_api_node=True, | |
| price_badge=IO.PriceBadge( | |
| expr="""{"type":"usd","usd":0.14,"format":{"suffix":"/second"}}""", | |
| ), | |
| ) | |
| async def execute( | |
| cls, | |
| video: Input.Video, | |
| background_color: str, | |
| seed: int, | |
| ) -> IO.NodeOutput: | |
| validate_video_duration(video, max_duration=60.0) | |
| response = await sync_op( | |
| cls, | |
| ApiEndpoint(path="/proxy/bria/v2/video/edit/remove_background", method="POST"), | |
| data=BriaRemoveVideoBackgroundRequest( | |
| video=await upload_video_to_comfyapi(cls, video), | |
| background_color=background_color, | |
| output_container_and_codec="mp4_h264", | |
| seed=seed, | |
| ), | |
| response_model=BriaStatusResponse, | |
| ) | |
| response = await poll_op( | |
| cls, | |
| ApiEndpoint(path=f"/proxy/bria/v2/status/{response.request_id}"), | |
| status_extractor=lambda r: r.status, | |
| response_model=BriaRemoveVideoBackgroundResponse, | |
| ) | |
| return IO.NodeOutput(await download_url_to_video_output(response.result.video_url)) | |
| class BriaExtension(ComfyExtension): | |
| async def get_node_list(self) -> list[type[IO.ComfyNode]]: | |
| return [ | |
| BriaImageEditNode, | |
| BriaRemoveImageBackground, | |
| BriaRemoveVideoBackground, | |
| ] | |
| async def comfy_entrypoint() -> BriaExtension: | |
| return BriaExtension() | |