Nodes/ComfyUI-KYNode/Video Object To String
ComfyUI Node

Video Object To String

Pull an HTTP URL out of a video object

By yorkane·Created 2 years ago·Updated 6 months ago· 10
Video Object To String
  • any1
  • any2
  • URL_1
  • URL_2

ComfyUI doesn't hand you a video as a URL by default - it hands you an object (a filename, a subfolder, a type) that the frontend knows how to turn into a preview link. Fine if you're staring at the UI. Useless if you need that link as a plain string, to log it, POST it somewhere, or drop it into a JSON response. KY_ToVideoUrl closes that gap: feed it basically anything video-shaped and it hands back the HTTP address pointing at the actual file.

It's part of ComfyUI-KYNode, a small utility pack from a dev going by "yorkane" that leans heavily toward exactly this kind of thing - wiring ComfyUI's internals up to external services. It's not a pack with community buzz behind it (searching for it barely turns up a mention anywhere), so there's no folklore to lean on here, just what the node does.

How it works

Under the hood, ComfyUI serves generated files through its /view endpoint using filename + subfolder + type (input/output/temp) - that's how the built-in video preview widget builds the link you see in the UI. This node does the same construction for you, except in Python instead of JavaScript, and it's deliberately loose about what you feed it: the input type is a wildcard (*), so you can plug in the output of Save Video, Load Video, or really anything with a video-like path attached, and it'll try to extract a URL rather than making you match an exact type.

Inputs and outputs that matter

There are exactly two inputs and they're both untyped:

  • any1 (required) - the video object to convert. This is the one you always wire up.
  • any2 (optional, defaults to nothing) - a second object, for when you want two URLs out in one pass instead of chaining two of these nodes.

Outputs are a plain pair of strings: URL_1 and URL_2, corresponding to any1 and any2. Wire URL_1 into whatever needs the link - a JSON-builder node, a webhook payload, KY_Uploads from the same pack, a Save Text node, or straight into an API response if you're building this for headless execution.

How to install it

Via ComfyUI Manager: search "ComfyUI-KYNode", install, restart. Manually, it's the standard drill:

cd ComfyUI/custom_nodes
git clone https://github.com/yorkane/ComfyUI-KYNode

Restart ComfyUI afterward. Nothing in the README points to extra Python packages or model downloads for this node - it's just talking to ComfyUI's own file-serving layer, so there's nothing heavy to install.

Common issues & troubleshooting

Empty or garbage output. Because the input is a true wildcard, the node has to guess how to pull a path out of whatever you handed it. Feed it something that isn't actually video-shaped - a raw string, an image tensor, an unrelated dict - and you'll get nothing useful back. If URL_1 comes out empty, check that any1 is genuinely wired from a video-producing node (Save Video, Load Video, etc.), not something upstream of it.

The URL doesn't resolve for whoever you send it to. This one matters a lot if you're running on a hosted service rather than your own machine: a /view URL is only meaningful relative to the server that generated the file. If your workflow executes on a remote GPU worker - which is exactly what happens on a service like this one - a URL built from a local host address won't be reachable by anyone outside that worker. Before you wire this into a webhook or an external upload, sanity-check that the URL it hands back is actually the public-facing address of wherever the file is being served, not an internal one.

"Missing node type" when loading someone else's workflow. The usual custom-node story: install the pack via Manager, restart, and the error goes away.

CategoryKYNode/video

Inputs (2)

NameTypeDefaultDescription
any1*
any2opt*

Outputs (2)

NameTypeDescription
URL_1STRING
URL_2STRING