Instagram Question Box
An Instagram 'Ask me a question' sticker, built entirely inside ComfyUI
- image
- IMAGE
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_fontplus their*_font_size,*_letter_spacing,*_fill_color_hex,*_fill_alpha- separate typography per panel.answer_line_spacingandanswer_paddingcontrol the body's internal breathing room.corner_radius(32 default) and thebox_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.
Inputs (38)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| question_text | STRING | Ask me a question | — |
| answer_text | STRING | — | |
| question_font | COMBO | Arial Black | 33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27 |
| question_font_size | INT | 301–999 | — |
| question_letter_spacing | FLOAT | -0.5-10–50 | — |
| question_fill_color_hex | STRING | #FFFFFF | — |
| question_fill_alpha | FLOAT | 1.000–1 | — |
| answer_font | COMBO | Arial | 33 options: Arial, Arial Black, Arial Narrow, C059, Comic Sans MS, Courier New, +27 |
| answer_font_size | INT | 501–999 | — |
| answer_letter_spacing | FLOAT | 0.0-10–50 | — |
| answer_line_spacing | FLOAT | 4.00–100 | — |
| answer_fill_color_hex | STRING | #000000 | — |
| answer_fill_alpha | FLOAT | 1.000–1 | — |
| box_width | INT | 95050–4096 | — |
| header_height | INT | 9010–2048 | — |
| body_height | INT | 20010–2048 | — |
| answer_padding | INT | 160–512 | — |
| header_color_hex | STRING | #323b42 | — |
| header_alpha | FLOAT | 1.000–1 | — |
| body_color_hex | STRING | #FFFFFF | — |
| body_alpha | FLOAT | 1.000–1 | — |
| corner_radius | INT | 320–200 | — |
| box_shadow_enable | BOOLEAN | true | — |
| box_shadow_color_hex | STRING | #000000 | — |
| box_shadow_alpha | FLOAT | 0.500–1 | — |
| box_shadow_distance | INT | 100–100 | — |
| box_shadow_blur | INT | 150–60 | — |
| horizontal_alignment | COMBO | center | 3 options: left, center, right |
| vertical_alignment | COMBO | middle | 3 options: top, middle, bottom |
| x_shift | INT | 0-4096–4096 | — |
| y_shift | INT | 0-4096–4096 | — |
| animate | BOOLEAN | false | — |
| animation_kind | COMBO | fade_in | 6 options: fade_in, fade_out, move_from_top, move_from_bottom, move_from_left, move_from_right |
| animation_frames | INT | 321–1000 | — |
| animation_ease | COMBO | ease_in_out | 4 options: linear, ease_in, ease_out, ease_in_out |
| animation_opacity_target | FLOAT | 1.000–1 | — |
| pause_frames_before_start | INT | 00–100000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |