feat(api-nodes): add Bria Edit node (#11978)

Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
Jedrzej Kosinski
2026-01-19 16:47:14 -08:00
committed by GitHub
parent 866a4619db
commit b931b37e30
4 changed files with 267 additions and 0 deletions

View File

@@ -451,6 +451,12 @@ def resize_mask_to_image(
return mask
def convert_mask_to_image(mask: Input.Image) -> torch.Tensor:
"""Make mask have the expected amount of dims (4) and channels (3) to be recognized as an image."""
mask = mask.unsqueeze(-1)
return torch.cat([mask] * 3, dim=-1)
def text_filepath_to_base64_string(filepath: str) -> str:
"""Converts a text file to a base64 string."""
with open(filepath, "rb") as f: