Remove Object from Video - LTX 2.3 Obscura Remova LoRA
Upload an input video and prompt for the object to get removed from the video's foreground.
下载工作流在 Cloud 中试用 API 文档
00:00
查看工作流内部
源模板的只读预览。在 Cloud 中打开,即可查看节点并进行修改。
Loading the graph
Open full-size workflow preview- 输出
- 视频
- 作者
- Rob
从代码中调用该模型
以下请求使用与体验区相同的预设图和设置。每次提交都可能开始一次付费运行;如果提交结果未知,请勿自动重试。
1 获取 API 密钥 ↗
What you need
- Runs on
- Comfy Cloud
- 密钥
- COMFY_API_KEY
- 你的文件
- 由代码根据链接上传
需要付费的 Cloud 方案和额度。
下载 API JSONAPI 文档 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"39": {
"class_type": "LoadVideo",
"inputs": {
"file": "UPLOADED_video_FILENAME"
},
"_meta": {
"title": "Load Video"
}
},
"52": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "compare_video",
"format": "auto",
"format.codec": "auto",
"video": [
"54:31",
0
]
},
"_meta": {
"title": "Save Video Compared"
}
},
"53": {
"class_type": "SaveVideo",
"inputs": {
"filename_prefix": "video",
"format": "auto",
"format.codec": "auto",
"video": [
"54:36",
0
]
},
"_meta": {
"title": "Save Video"
}
},
"54:1": {
"class_type": "VAELoaderKJ",
"inputs": {
"device": "main_device",
"vae_name": "LTX23_video_vae_bf16.safetensors",
"weight_dtype": "bf16"
},
"_meta": {
"title": "VAELoader KJ"
}
},
"54:10": {
"class_type": "EmptyLTXVLatentVideo",
"inputs": {
"batch_size": 1,
"height": [
"54:6",
1
],
"length": [
"54:45",
1
],
"width": [
"54:6",
0
]
},
"_meta": {
"title": "Empty LTXV Latent Video"
}
},
"54:11": {
"class_type": "LTXVConditioning",
"inputs": {
"frame_rate": [
"54:49",
0
],
"negative": [
"54:22",
0
],
"positive": [
"54:9",
0
]
},
"_meta": {
"title": "LTXVConditioning"
}
},
"54:12": {
"class_type": "LTXAddVideoICLoRAGuide",
"inputs": {
"crop": "disabled",
"frame_idx": 0,
"image": [
"54:41",
0
],
"latent": [
"54:10",
0
],
"latent_downscale_factor": 1,
"negative": [
"54:11",
1
],
"positive": [
"54:11",
0
],
"strength": 1,
"tile_frames": 97,
"tile_overlap": 64,
"tile_size": 256,
"use_streaming": False,
"use_tiled_encode": False,
"vae": [
"54:1",
0
]
},
"_meta": {
"title": "🅛🅣🅧 Add Video IC-LoRA Guide"
}
},
"54:13": {
"class_type": "LTXVAudioVAEDecode",
"inputs": {
"audio_vae": [
"54:2",
0
],
"samples": [
"54:18",
1
]
},
"_meta": {
"title": "LTXV Audio VAE Decode"
}
},
"54:14": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ltx-2.3-22b-distilled-lora-384-1.1.safetensors",
"model": [
"54:15",
0
],
"strength_model": 0.4
},
"_meta": {
"title": "Load LoRA"
}
},
"54:15": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ltx23-obscura_remova.safetensors",
"model": [
"54:5",
0
],
"strength_model": 2
},
"_meta": {
"title": "Load LoRA"
}
},
"54:16": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"54:17",
2
],
"vae": [
"54:1",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"54:17": {
"class_type": "LTXVCropGuides",
"inputs": {
"latent": [
"54:18",
0
],
"negative": [
"54:12",
1
],
"positive": [
"54:12",
0
]
},
"_meta": {
"title": "LTXVCropGuides"
}
},
"54:18": {
"class_type": "LTXVSeparateAVLatent",
"inputs": {
"av_latent": [
"54:19",
0
]
},
"_meta": {
"title": "Separate AV Latent"
}
},
"54:19": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"54:20",
0
],
"model": [
"54:14",
0
],
"negative": [
"54:12",
1
],
"positive": [
"54:12",
0
],
"sampler_name": "euler_ancestral_cfg_pp",
"scheduler": "linear_quadratic",
"seed": 1086065193067454,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"54:2": {
"class_type": "VAELoaderKJ",
"inputs": {
"device": "main_device",
"vae_name": "LTX23_audio_vae_bf16.safetensors",
"weight_dtype": "bf16"
},
"_meta": {
"title": "VAELoader KJ"
}
},
"54:20": {
"class_type": "LTXVConcatAVLatent",
"inputs": {
"audio_latent": [
"54:21",
0
],
"video_latent": [
"54:12",
2
]
},
"_meta": {
"title": "Concat AV Latent"
}
},
"54:21": {
"class_type": "LTXVEmptyLatentAudio",
"inputs": {
"audio_vae": [
"54:2",
0
],
"batch_size": 1,
"frame_rate": [
"54:50",
0
],
"frames_number": [
"54:45",
1
]
},
"_meta": {
"title": "Empty LTXV Latent Audio"
}
},
"54:22": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"54:4",
0
],
"text": "blurry, low resolution, ugly, garbled mess, compression artifacts, glitch, stop motion, still image, pixelated, robotic voice, oversaturated"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"54:25": {
"class_type": "ImageFromBatch",
"inputs": {
"batch_index": 0,
"image": [
"54:41",
0
],
"length": 1
},
"_meta": {
"title": "Get Image from Batch"
}
},
"54:26": {
"class_type": "ImageStitch",
"inputs": {
"direction": "down",
"image1": [
"54:41",
0
],
"image2": [
"54:16",
0
],
"match_image_size": True,
"spacing_color": "white",
"spacing_width": 0
},
"_meta": {
"title": "Stitch Images"
}
},
"54:3": {
"class_type": "VHS_GetImageCount",
"inputs": {
"images": [
"54:38",
0
]
},
"_meta": {
"title": "Get Image Count 🎥🅥🅗🅢"
}
},
"54:31": {
"class_type": "CreateVideo",
"inputs": {
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"54:49",
0
],
"images": [
"54:26",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"54:36": {
"class_type": "CreateVideo",
"inputs": {
"audio": [
"54:38",
1
],
"bit_depth": "auto",
"codec": "none",
"color_space": "sRGB",
"fps": [
"54:49",
0
],
"images": [
"54:16",
0
]
},
"_meta": {
"title": "Create Video"
}
},
"54:38": {
"class_type": "GetVideoComponents",
"inputs": {
"video": [
"39",
0
]
},
"_meta": {
"title": "Get Video Components"
}
},
"54:4": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "gemma_3_12B_it_fp4_mixed.safetensors",
"clip_name2": "ltx-2.3_text_projection_bf16.safetensors",
"device": "default",
"type": "ltxv"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"54:41": {
"class_type": "ResizeImageMaskNode",
"inputs": {
"input": [
"54:38",
0
],
"resize_type": "scale dimensions",
"resize_type.crop": "disabled",
"resize_type.height": 704,
"resize_type.width": 1280,
"scale_method": "area"
},
"_meta": {
"title": "Resize Image/Mask (s1 size)"
}
},
"54:43": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"54:45",
1
]
},
"_meta": {
"title": "Preview as Text"
}
},
"54:45": {
"class_type": "ComfyMathExpression",
"inputs": {
"expression": "(int((a - 1) / 8)) * 8 + 1",
"values.a": [
"54:3",
0
]
},
"_meta": {
"title": "Math Expression"
}
},
"54:49": {
"class_type": "ComfyNumberConvert",
"inputs": {
"value": [
"54:50",
0
]
},
"_meta": {
"title": "Convert Number"
}
},
"54:5": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "ltx-2.3-22b-dev_transformer_only_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"54:50": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 25
},
"_meta": {
"title": "fps"
}
},
"54:6": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"54:25",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"54:9": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"54:4",
0
],
"text": "Remove the concrete and bronze monolith from the foreground."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
}
})
workflow.set_input("39", "file", client.assets.from_url("https://comfy.org/catalog-media/f18c4368-4309-48e8-af8a-3366360b4db5/825ae072-4c9c-4e94-835c-7d79c7b71a5a"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("53"):
output.to_file(output.name)
for output in job.get_outputs("52"):
output.to_file(output.name)