Compare commits

...
Author SHA1 Message Date
Your Name fe10d6990e fix image preprocess 2025-03-10 17:27:35 +04:00
Your Name d5b7d2550c fix import 2025-03-10 15:40:25 +04:00
Xenia 80db13454c Merge remote-tracking branch 'origin/main' into comfy_tailored_portrait 2025-03-10 08:53:57 +00:00
Xenia ae89bb1aa0 tailored portrait 2025-03-10 08:52:49 +00:00
Xenia da131c5a49 tailored portrait 2025-03-10 08:26:15 +00:00
3 changed files with 7 additions and 5 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
from nodes.tailored_portrait_node import TailoredPortraitNode
from .nodes import (EraserNode, GenFillNode, ImageExpansionNode, ReplaceBgNode, RmbgNode, RemoveForegroundNode, ShotByTextNode, ShotByImageNode, TailoredGenNode,
TailoredModelInfoNode, Text2ImageBaseNode, Text2ImageFastNode, Text2ImageHDNode,
TailoredModelInfoNode, Text2ImageBaseNode, Text2ImageFastNode, Text2ImageHDNode, TailoredPortraitNode,
ReimagineNode)
# Map the node class to a name used internally by ComfyUI
NODE_CLASS_MAPPINGS = {
+5 -2
View File
@@ -4,7 +4,7 @@ from PIL import Image
import io
import torch
from .common import image_to_base64
from .common import image_to_base64, preprocess_image
class TailoredPortraitNode():
@classmethod
@@ -35,7 +35,10 @@ class TailoredPortraitNode():
if api_key.strip() == "" or api_key.strip() == "BRIA_API_TOKEN":
raise Exception("Please insert a valid API key.")
# Convert the image and mask directly to Base64 strings
# Convert the image and mask directly to if isinstance(image, torch.Tensor):
if isinstance(image, torch.Tensor):
image = preprocess_image(image)
image_base64 = image_to_base64(image)
# Prepare the API request payload
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui-bria-api"
description = "Custom nodes for ComfyUI using BRIA's API."
version = "2.0.2"
version = "2.0.3"
license = {file = "LICENSE"}
[project.urls]