chore(TEMP): 🧹

This commit is contained in:
Mel Massadian
2025-09-07 11:55:05 +00:00
committed by Mel Massadian
parent 1650ee4769
commit 9501b9e459
2 changed files with 14 additions and 0 deletions
+7
View File
@@ -7,6 +7,13 @@ from PIL import Image, ImageDraw, ImageFont
from ..log import log
from ..utils import comfy_dir, font_path, pil2tensor
# try:
# from cairosvg import svg2png
# HAS_CAIRO = True
# except ImportError:
# HAS_CAIRO = False
# class MtbExamples:
# """MTB Example Images"""
+7
View File
@@ -146,6 +146,11 @@ class MTB_ApplyTextTemplate:
if has_list:
first_list = next(x for x in values if isinstance(x, list))
# all_list = all(isinstance(x, list) for x in kwargs.values())
# if not all_list:
# raise ValueError(
# "Text template supports either str or list[str] but not a mix of the two (yet?)"
# )
target_length = len(first_list)
same_length = all(
len(v) == target_length for v in values if isinstance(v, list)
@@ -158,6 +163,8 @@ class MTB_ApplyTextTemplate:
if has_list:
results = []
# do a padded loop, not the most efficient but easy
# to handle for now
for it in range(target_length):
res = f"{template}"
for k, v in kwargs.items():