Nodes/Advanced Text Overlay/Instagram Question Box
ComfyUI Node

Instagram Question Box

An Instagram 'Ask me a question' sticker, built entirely inside ComfyUI

By scofano·Created about a year ago·Updated 5 days ago· 30
Instagram Question Box
  • image
  • IMAGE
◄question_textAsk me a question►
◄answer_text►
◄question_fontArial Black►
◄question_font_size30►
◄question_letter_spacing-0.5►
◄question_fill_color_hex#FFFFFF►
◄question_fill_alpha1.00►
◄answer_fontArial►
◄answer_font_size50►
◄answer_letter_spacing0.0►
◄answer_line_spacing4.0►
◄answer_fill_color_hex#000000►
◄answer_fill_alpha1.00►
◄box_width950►
◄header_height90►
◄body_height200►
◄answer_padding16►
◄header_color_hex#323b42►
◄header_alpha1.00►
◄body_color_hex#FFFFFF►
◄body_alpha1.00►
◄corner_radius32►
◄box_shadow_enabletrue►
◄box_shadow_color_hex#000000►
◄box_shadow_alpha0.50►
◄box_shadow_distance10►
◄box_shadow_blur15►
◄horizontal_alignmentcenter►
◄vertical_alignmentmiddle►
◄x_shift0►
◄y_shift0►
◄animatefalse►
◄animation_kindfade_in►
◄animation_frames32►
◄animation_easeease_in_out►
◄animation_opacity_target1.00►
◄pause_frames_before_start0►

If you make story content for Instagram, you know the "Ask me a question" sticker: a dark header with white text on top of a light rounded panel. Normally you'd recreate that in Canva or Photoshop, screenshot it, and drag it in. Instagram Question Box renders the whole two-panel sticker directly on your image in ComfyUI - header + body, rounded corners, drop shadow, and independent typography for both - so the text stays live and editable in the graph instead of being baked into an export.

The mechanism is where this gets cute. The box is drawn at 4× resolution and then downscaled with Lanczos, which is why the corners look properly anti-aliased instead of the chunky pixel steps you usually get from Pillow's rounded_rectangle. The header/body divider is a deliberate flat line (only the outer corners are rounded), the body sits on a rounded bottom, and the optional shadow is a Gaussian-blurred copy of the box. It's all composited onto your image as an RGBA overlay.

The inputs that matter

There's a lot of knobs here - 35 of them - but the layout is logical, so it groups easily:

  • question_text - the header line, default "Ask me a question". If it's too wide for the box it truncates with an ellipsis rather than wrapping or overflowing.
  • answer_text - the body. Multiline, and it supports the same inline rich text as the main overlay nodes: <b>, <i>, <br>, <span color="#fff" bg="#333">. It word-wraps to the box width and centers.
  • box_width, header_height, body_height - independent pixel dimensions. Defaults (950 / 90 / 200) are tuned for a 1080-wide portrait story, so at 1080px you can leave them alone.
  • header_color_hex / body_color_hex - the dark header (#323b42) and white body (#FFFFFF) defaults match Instagram's look.
  • question_font / answer_font plus their *_font_size, *_letter_spacing, *_fill_color_hex, *_fill_alpha - separate typography per panel. answer_line_spacing and answer_padding control the body's internal breathing room.
  • corner_radius (32 default) and the box_shadow_* cluster (enable, color, alpha, distance, blur).
  • horizontal_alignment / vertical_alignment + x_shift / y_shift - where the sticker sits. Center/middle is the default.

Same animation set as the rest of the pack: animate, animation_kind (fade_in, fade_out, move_from_*), animation_frames, animation_ease, animation_opacity_target, pause_frames_before_start. Output is an IMAGE you can save, preview, or pipe onward - the sticker becomes part of the image tensor, so you can still run it through a sharpener or compression step afterward.

Installing it

It ships in the same pack as Advanced Text Overlay, so one install covers all four nodes. Via ComfyUI Manager, search "Advanced Text Overlay"; or:

cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Advanced-TextOverlay
pip install -r requirements.txt

Restart, and it shows up under Advanced Text Overlay in the node menu. No models, no keys, nothing to download - the only "data" it uses is your system's installed fonts.

Where people get burned

The most common mistake is forgetting the question header is a single line: type a long question and it gets ellipsized, not wrapped. If you need two lines up top, keep the header short and move detail into answer_text. Also, like the main image node, pause_frames_before_start is in frames here (the node has no FPS to convert), and bold/italic in the answer only work when your chosen answer_font actually ships a matching variant. One more honest note: this is a sticker lookalike, not a real Instagram API widget - there's no network call, and nothing gets uploaded. The name describes the style, not the service.

CategoryAdvanced Text Overlay

Inputs (38)

NameTypeDefaultDescription
imageIMAGE—
question_textSTRINGAsk me a question—
answer_textSTRING—
question_fontCOMBOArial Black33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27
question_font_sizeINT301–999—
question_letter_spacingFLOAT-0.5-10–50—
question_fill_color_hexSTRING#FFFFFF—
question_fill_alphaFLOAT1.000–1—
answer_fontCOMBOArial33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27
answer_font_sizeINT501–999—
answer_letter_spacingFLOAT0.0-10–50—
answer_line_spacingFLOAT4.00–100—
answer_fill_color_hexSTRING#000000—
answer_fill_alphaFLOAT1.000–1—
box_widthINT95050–4096—
header_heightINT9010–2048—
body_heightINT20010–2048—
answer_paddingINT160–512—
header_color_hexSTRING#323b42—
header_alphaFLOAT1.000–1—
body_color_hexSTRING#FFFFFF—
body_alphaFLOAT1.000–1—
corner_radiusINT320–200—
box_shadow_enableBOOLEANtrue—
box_shadow_color_hexSTRING#000000—
box_shadow_alphaFLOAT0.500–1—
box_shadow_distanceINT100–100—
box_shadow_blurINT150–60—
horizontal_alignmentCOMBOcenter3 options: left, center, right
vertical_alignmentCOMBOmiddle3 options: top, middle, bottom
x_shiftINT0-4096–4096—
y_shiftINT0-4096–4096—
animateBOOLEANfalse—
animation_kindCOMBOfade_in6 options: fade_in, fade_out, move_from_top, move_from_bottom, move_from_left, move_from_right
animation_framesINT321–1000—
animation_easeCOMBOease_in_out4 options: linear, ease_in, ease_out, ease_in_out
animation_opacity_targetFLOAT1.000–1—
pause_frames_before_startINT00–100000—

Outputs (1)

NameTypeDescription
IMAGEIMAGE—