Nodes/Comfyui-Tiktok-Caption/TikTok Caption (tscaps)
ComfyUI Node

TikTok Caption (tscaps)

A ComfyUI node in image/text with 36 inputs and 2 outputs.

By obvirm·Created 9 months ago·Updated 17 days ago· 2
TikTok Caption (tscaps)
  • preview_image
  • IMAGE
  • MASK
srt1 00:00:00,000 --> 00:00:02,000 WAH GILA BANGET! 2 00:00:02,000 --> 00:00:04,000 RENDER PAKAI TSCAPS
width540
height960
font_family(template default)
font_size0.0
font_weight0
letter_spacing0.000
word_spacing0.00
line_spacing0.00
text_align(auto)
text_case(auto)
italic(auto)
underline(auto)
strikethrough(auto)
vertical_alignbottom
vertical_offset0.85
horizontal_aligncenter
horizontal_offset0.50
rotation0
text_color
highlight_color
outline0.02
outline_color
outline_stylefalse
split_by_speakerfalse
split_by(auto)
max_letters0
min_letters0
lines_max0
lines_min0
max_line_width0.00
gap_freefalse
css.segment{ font-family: var(--tscaps-font-family, 'Montserrat'), system-ui, sans-serif; font-weight: 800; font-style: var(--tscaps-font-style, normal); /* cqh = proportional to FRAME height. So when you change the output resolution, the caption ZOOMS together with the frame (text grows/shrinks with the frame), it does NOT re-grow relative to the preview box. This is exactly the "proxy" look you want: the preview is just a zoomed-to-fit view of the real frame. The preview canvas is rendered at the output resolution and CSS-scaled down to the box (see takumi_caption.ts). */ font-size: var(--tscaps-font-size, 13cqh); letter-spacing: var(--tscaps-letter-spacing, 0em); text-align: center; text-transform: none; text-decoration: none; color: var(--tscaps-primary-color, #ffffff); -webkit-text-stroke: var(--tscaps-outline-width, 0.02em) var(--tscaps-outline-color, #000); paint-order: stroke fill; text-shadow: var(--tscaps-outline-shadow, none); line-height: 1.3; } .line { display: block; text-align: center; white-space: normal; } .line + .line { margin-top: 0.1em; } .word { display: inline-block; margin: 0 0.14em; } .word.word-being-narrated { color: var(--tscaps-highlight-color, #ffd400); } .word.word-already-narrated { color: #e0e0e0; } .quote { color: var(--tscaps-quote-color, #e6d647); font-style: italic; } /* split_words_into_letters: per-letter spans for staggered animations */ .letter { display: inline-block; }
template(none / custom)
template_overrides{}
Categoryimage/text

Inputs (36)

NameTypeDefaultDescription
srtSTRING1 00:00:00,000 --> 00:00:02,000 WAH GILA BANGET! 2 00:00:02,000 --> 00:00:04,000 RENDER PAKAI TSCAPS
widthINT5401–4096
heightINT9601–4096
font_familyCOMBO(template default)31 options: (template default), Inter Variable, Poppins, Montserrat Variable, Roboto, Anton, +25
font_sizeFLOAT0.00–100
font_weightINT00–900
letter_spacingFLOAT0.000-0.2–0.5
word_spacingFLOAT0.00-0.5–1
line_spacingFLOAT0.00-0.5–1
text_alignCOMBO(auto)4 options: (auto), left, center, right
text_caseCOMBO(auto)4 options: (auto), none, uppercase, lowercase
italicCOMBO(auto)3 options: (auto), on, off
underlineCOMBO(auto)3 options: (auto), on, off
strikethroughCOMBO(auto)3 options: (auto), on, off
vertical_alignCOMBObottom3 options: top, center, bottom
vertical_offsetFLOAT0.850–1
horizontal_alignCOMBOcenter3 options: left, center, right
horizontal_offsetFLOAT0.500–1
rotationFLOAT0-180–180
text_colorSTRING
highlight_colorSTRING
outlineFLOAT0.020–0.5
outline_colorSTRING
outline_styleBOOLEANfalse
split_by_speakerBOOLEANfalse
split_byCOMBO(auto)4 options: (auto), none, sentence, clause
max_lettersINT00–200
min_lettersINT00–200
lines_maxINT00–8
lines_minINT00–8
max_line_widthFLOAT0.000–1
gap_freeBOOLEANfalse
cssSTRING.segment{ font-family: var(--tscaps-font-family, 'Montserrat'), system-ui, sans-serif; font-weight: 800; font-style: var(--tscaps-font-style, normal); /* cqh = proportional to FRAME height. So when you change the output resolution, the caption ZOOMS together with the frame (text grows/shrinks with the frame), it does NOT re-grow relative to the preview box. This is exactly the "proxy" look you want: the preview is just a zoomed-to-fit view of the real frame. The preview canvas is rendered at the output resolution and CSS-scaled down to the box (see takumi_caption.ts). */ font-size: var(--tscaps-font-size, 13cqh); letter-spacing: var(--tscaps-letter-spacing, 0em); text-align: center; text-transform: none; text-decoration: none; color: var(--tscaps-primary-color, #ffffff); -webkit-text-stroke: var(--tscaps-outline-width, 0.02em) var(--tscaps-outline-color, #000); paint-order: stroke fill; text-shadow: var(--tscaps-outline-shadow, none); line-height: 1.3; } .line { display: block; text-align: center; white-space: normal; } .line + .line { margin-top: 0.1em; } .word { display: inline-block; margin: 0 0.14em; } .word.word-being-narrated { color: var(--tscaps-highlight-color, #ffd400); } .word.word-already-narrated { color: #e0e0e0; } .quote { color: var(--tscaps-quote-color, #e6d647); font-style: italic; } /* split_words_into_letters: per-letter spans for staggered animations */ .letter { display: inline-block; }
templateCOMBO(none / custom)32 options: (none / custom), anya, cleo, elio, freya, iris, +26
template_overridesSTRING{}
preview_imageoptIMAGE

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK