Workflow ComfyUi - Create a Hugging and Kissing Video from a Photo

세부 정보

파일 다운로드

모델 설명

이 모델은 두 사진이 주어졌을 때 두 사람이 서로 안아주는 워크플로우입니다. 이 워크플로우는 T8star-Aix가 Runninghub에 게시한 비기능적인 부분을 수정하여 만들어졌습니다.

제거해 달라고 요청받을 경우, 즉시 제거하겠습니다.

변경 사항은 영상에서 이미지 크롭핑 노드를 교체한 내용과 아래와 같이 코드에서 수정된 오류들을 보여줍니다:
2025-03-28T08:24:10.310732 - Traceback (최신 호출 순):

File "/ComfyUI/execution.py", line 327, in execute

output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

File "/ComfyUI/execution.py", line 202, in get_output_data

return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)

File "/ComfyUI/execution.py", line 174, in _map_node_over_list

process_inputs(input_dict, i)

File "/ComfyUI/execution.py", line 163, in process_inputs

results.append(getattr(obj, func)(**inputs))

File "/ComfyUI/custom_nodes/comfyui_ttp_toolset/TTP_toolsets.py", line 704, in expand_and_mask

fill_rgba = self.hex_to_rgba(fill_color)

File "/ComfyUI/custom_nodes/comfyui_ttp_toolset/TTP_toolsets.py", line 559, in hex_to_rgba

raise ValueError("Invalid hex color format")

ValueError: Invalid hex color format

2025-03-28T08:24:10.310997 - Prompt executed in 8.00 seconds

이 오류의 해결책:

expand_and_mask 함수가 호출되는 위치를 확인하세요:

TTP_toolsets.py의 704행에서 fill_color 변수를 정의하세요.

HEX 코드가 유효한지 확인하세요:

HEX 색상 코드는 일반적으로 #RRGGBB 또는 #RRGGBBAA 형식이어야 합니다(예: #FF5733 또는 #FF5733FF).

fill_color가 잘못된 형식일 경우(예: #FF573, 123456, red 등) 이 오류가 발생합니다.

hex_to_rgba 함수 내에서 HEX 형식을 검증하세요:

TTP_toolsets.py의 559행에 있는 hex_to_rgba 함수를 아래와 같이 업데이트하세요:

코드를 다음과 같이 변경:

import re

def hex_to_rgba(self, hex_color):
    # '#'이 존재하면 앞에서 제거
    hex_color = hex_color.lstrip('#')
    
    # HEX 형식이 유효한지 확인
    if not re.match(r'^[A-Fa-f0-9]{6}$|^[A-Fa-f0-9]{8}$', hex_color):
        raise ValueError(f"Invalid hex color format: {hex_color}. Expected format is #RRGGBB or #RRGGBBAA.")
    
    # 6자리인 경우, 기본 알파값 255(불투명)로 반환
    if len(hex_color) == 6:
        r = int(hex_color[0:2], 16)
        g = int(hex_color[2:4], 16)
        b = int(hex_color[4:6], 16)
        return (r, g, b, 255)
    
    # 8자리인 경우, 마지막 두 자리는 알파(투명도) 값을 나타냄
    elif len(hex_color) == 8:
        r = int(hex_color[0:2], 16)
        g = int(hex_color[2:4], 16)
        b = int(hex_color[4:6], 16)
        a = int(hex_color[6:8], 16)
        return (r, g, b, a)
    
    else:
        raise ValueError(f"Invalid hex color format: {hex_color}")

이 모델로 만든 이미지

이미지를 찾을 수 없습니다.