ComfyUI Node

Image Profile

The Empty Latent node with a preset drawer for your canvas sizes

By glonlas·Created 6 months ago·Updated 2 months ago· 1
Image Profile
  • image
  • Latent
  • Steps
profiles_json[]
selected_profile_id
selected_width1152
selected_height864
selected_steps8

You know the drill: you want a draft at small resolution to iterate fast, then a big render once the composition is locked. So you keep a stack of Empty Latent nodes with different width/height, and you type the step count into the KSampler every single time. Image Profile exists to kill that busywork. It's one node that holds a list of named resolution+steps presets and hands you a latent and the matching step count, so you flip between "draft" and "HD" by clicking one entry instead of editing three widgets by hand.

Think of it as a UI-friendly wrapper around EmptyLatentImage with a step counter bolted on. In fact, under the hood that's almost literally what it is: the node allocates a blank latent with torch.zeros([1, 4, height // 8, width // 8]) - the exact same 4-channel, 8x-downsampled shape the built-in Empty Latent node produces - and returns it alongside the profile's step count as an INT. Zero sampling happens here. It's a settings node that happens to speak latent.

The inputs that matter

  • profiles_json - the whole preset list, stored as a JSON string in a hidden widget. You don't type this by hand; the node's custom frontend writes it for you.
  • selected_profile_id - which preset is active. This is what changes when you click a profile in the picker.
  • selected_width / selected_height / selected_steps - the live values. If the selected profile id doesn't match anything, the node falls back to these three, so it degrades gracefully to a plain Empty-Latent-style node.
  • image (optional) - this is the interesting one. Connect an image and the node adopts its aspect ratio while keeping the profile's pixel budget and step count. Great for img2img: generate a draft, load it back, and get a latent at the same shape with the higher step count, no math required.

Dimensions are clamped to 8–16384 and snapped to a multiple of 8 (the latent grid demands it), steps run 1–150.

The outputs

  • Latent → wire into the latent input on your KSampler, same as any Empty Latent.
  • Steps → wire into the KSampler's steps input. Click a different profile and both outputs change together. That's the whole trick, and it's why this beats editing nodes by hand.

How the UI works

The node ships a JavaScript extension that replaces the raw widgets with a two-step picker: first orientation + aspect ratio (21:9 down to 9:21, square in the middle), then a resolution tier - Draft (~0.13 MP, 4 steps) up through Ultra (4 MP, 40 steps), each with a rough time hint so the cost is legible at a glance. Presets are drag-and-drop reorderable, and it starts with four defaults: landscape/portrait at 404x204 and 1152x864, 5 and 8 steps respectively. It's a small, clean idea, well executed.

Install

ComfyUI Manager is the easy route - search for ComfyUI-image-profile and hit install. Or do it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/glonlas/ComfyUI-image-profile

Then restart ComfyUI and add Image Profile from the Latent/Profile category. There's no requirements.txt and no model files - it depends only on torch and the ComfyUI API, so there's nothing to pip install and nothing to download. That's refreshingly rare in this ecosystem.

Where people get burned

The honest one: this node hardcodes 4 latent channels, so it's built for the SD 1.5/SDXL family (and anything else with a 4-channel VAE). It will not work for Flux or SD3-family models, which need the 16-channel latents that EmptySD3LatentImage produces - feed them a 4-channel latent and you get a mismatch, which in practice means black or garbage output. Check which model you're sampling before you blame the node.

Also worth knowing: the pack is young (v0.1.0) with essentially no community footprint yet, so there's no battle-tested troubleshooting lore. If the pretty picker doesn't render on some frontend version, the node still works - everything is just strings and ints under the hood, and the code is simple enough to read. And no, the "profile" doesn't touch your prompt or your sampler settings; it only sets canvas size and steps. If you expected more, that's not this node's job.

CategoryLatent/Profile

Inputs (6)

NameTypeDefaultDescription
profiles_jsonSTRING[]
selected_profile_idSTRING
selected_widthINT11528–16384
selected_heightINT8648–16384
selected_stepsINT81–150
imageoptIMAGE

Outputs (2)

NameTypeDescription
LatentLATENT
StepsINT