Nodes/ComfyUI_sm4ll-Wrapper/sm4ll Wrapper Sampler - Demo Version
ComfyUI Node

sm4ll Wrapper Sampler - Demo Version

Free virtual try-on that borrows someone else's GPU (and queue)

By risunobushi·Created about a year ago·Updated 11 months ago· 20
sm4ll Wrapper Sampler - Demo Version
  • base_person_image
  • product_image
  • base_person_mask
  • IMAGE
model_choiceeyewear

The name is a lie, but the free part isn't. sm4ll Wrapper Sampler - Demo Version (class VTONAPINode) doesn't sample anything locally - it takes a photo of a person, a photo of a garment, and forwards both to the free sm4ll-VTON demo running on HuggingFace Spaces. The actual try-on inference happens on sm4ll's servers, and you get the result back as an image tensor. No model weights, no GPU requirement, no API key, no setup beyond installing the pack.

Why reach for it? If you want to see what virtual try-on looks like without paying for it, this is the door-in. You're not evaluating a sampler here - you're evaluating whether a hosted VTON service is good enough to justify handing over money for the paid nodes in the same pack. It's also a perfectly fine way to do one-off "what would I look like in these glasses" checks.

How it works

Under the hood it's a web client wearing a node costume. Both images get resized to 1.62 megapixels with Lanczos interpolation, forced to RGB, and uploaded to the Gradio space's temp storage over a requests.Session. Then the node calls the demo API, downloads the finished image, and converts it back to a ComfyUI tensor. About the only "sampling" happening is the waiting.

Two quirks worth knowing:

  • It can't be cached. The class sets NOT_IDEMPOTENT = True and even injects a cache-buster, so ComfyUI re-runs it on every queue. That's deliberate - the API result changes run to run, and a cached workflow would just replay the old photo.
  • Your images leave your machine. The whole point is remote inference, but that also means every frame you pipe in goes to a public HF Space, and demo outputs carry a non-commercial license. Check studio.yourmirror.io's terms before using demo results for anything with money attached.

Inputs and outputs

Only a handful, and only three really matter:

  • base_person_image - the person/model photo (required)
  • product_image - the garment, shoe, glasses, whatever (required)
  • model_choice - pick the category that matches your product: eyewear, footwear, full-body, or top garment (note the space in "top garment"). Picking the wrong one visibly degrades results, so take the 30 seconds to match it.
  • base_person_mask (optional) - if you don't trust the service's automasking, feed your own person mask and it'll be uploaded in place of it.

The single output is an IMAGE tensor - wire it into a Save Image or Preview node, or into anything downstream that wants a picture.

Install

Either route works. In ComfyUI Manager, search for "sm4ll" (or risunobushi/ComfyUI_sm4ll-Wrapper) and install, or do it by hand:

cd ComfyUI/custom_nodes/
git clone https://github.com/risunobushi/ComfyUI_sm4ll-Wrapper.git
cd ComfyUI_sm4ll-Wrapper
pip install -r requirements.txt

Then restart ComfyUI and look under the sm4ll/VTON category. The requirements are just torch, torchvision, numpy, Pillow, and requests - stock ComfyUI already has all of those, so the pip step usually does nothing. There are no model downloads at all, which is the trade being made: this node trades hard-drive space for an internet connection.

Troubleshooting

The biggest trap is also the most confusing: when anything fails, the node "succeeds" with a solid red 512×512 image. ComfyUI sees a clean run; the error is buried in the console. If you get a red square out, that's the failure signal - read the terminal output.

Beyond that, expect:

  • Slow runs at peak hours. The demo shares one queue with every other user on Earth. A minute or two is normal; if it drags, that's the HF Space, not your machine.
  • Failed to upload - network problem, or the Space is down/restarting. Retry.
  • Weird aspect ratios get a console warning (the code checks for extremes beyond ~0.3–3.0). Cropping your input to something sane before the node avoids the warning.
  • Images smaller than 100×100 are rejected outright.

The console is also extremely chatty - it prints every tensor shape, every resize, every upload step. It's genuinely useful when debugging, just don't panic at the wall of text. And if you try this and like the results, the paid node in the same pack removes the queue and the license restriction for five cents a call.

Categorysm4ll/VTON

Inputs (4)

NameTypeDefaultDescription
base_person_imageIMAGE
product_imageIMAGE
model_choiceCOMBOeyewear4 options: eyewear, footwear, full-body, top garment
base_person_maskoptMASK

Outputs (1)

NameTypeDescription
IMAGEIMAGE