Compare commits

..

1 Commits

Author SHA1 Message Date
bigcat88
92890ef01d feat(api-nodes-Tencent3D): allow smaller possible face_count; add uv_image output
Signed-off-by: bigcat88 <bigcat88@icloud.com>
2026-03-28 14:36:06 +02:00
3 changed files with 14 additions and 9 deletions

View File

@@ -38,12 +38,9 @@ void main() {
// GIMP order: per-channel curves first, then RGB master curve.
// See gimp_curve_map_pixels() default case in gimpcurve-map.c:
// dest = colors_curve( channel_curve( src ) )
float tmp_r = applyCurve(u_curve1, color.r);
float tmp_g = applyCurve(u_curve2, color.g);
float tmp_b = applyCurve(u_curve3, color.b);
color.r = applyCurve(u_curve0, tmp_r);
color.g = applyCurve(u_curve0, tmp_g);
color.b = applyCurve(u_curve0, tmp_b);
color.r = applyCurve(u_curve0, applyCurve(u_curve1, color.r));
color.g = applyCurve(u_curve0, applyCurve(u_curve2, color.g));
color.b = applyCurve(u_curve0, applyCurve(u_curve3, color.b));
fragColor0 = vec4(color.rgb, color.a);
}

File diff suppressed because one or more lines are too long

View File

@@ -132,7 +132,7 @@ class TencentTextToModelNode(IO.ComfyNode):
tooltip="The LowPoly option is unavailable for the `3.1` model.",
),
IO.String.Input("prompt", multiline=True, default="", tooltip="Supports up to 1024 characters."),
IO.Int.Input("face_count", default=500000, min=40000, max=1500000),
IO.Int.Input("face_count", default=500000, min=3000, max=1500000),
IO.DynamicCombo.Input(
"generate_type",
options=[
@@ -251,7 +251,7 @@ class TencentImageToModelNode(IO.ComfyNode):
IO.Image.Input("image_left", optional=True),
IO.Image.Input("image_right", optional=True),
IO.Image.Input("image_back", optional=True),
IO.Int.Input("face_count", default=500000, min=40000, max=1500000),
IO.Int.Input("face_count", default=500000, min=3000, max=1500000),
IO.DynamicCombo.Input(
"generate_type",
options=[
@@ -422,6 +422,7 @@ class TencentModelTo3DUVNode(IO.ComfyNode):
outputs=[
IO.File3DOBJ.Output(display_name="OBJ"),
IO.File3DFBX.Output(display_name="FBX"),
IO.Image.Output(display_name="uv_image"),
],
hidden=[
IO.Hidden.auth_token_comfy_org,
@@ -468,9 +469,16 @@ class TencentModelTo3DUVNode(IO.ComfyNode):
response_model=To3DProTaskResultResponse,
status_extractor=lambda r: r.Status,
)
uv_image_file = get_file_from_response(result.ResultFile3Ds, "uv_image", raise_if_not_found=False)
uv_image = (
await download_url_to_image_tensor(uv_image_file.Url)
if uv_image_file is not None
else torch.zeros(1, 1, 1, 3)
)
return IO.NodeOutput(
await download_url_to_file_3d(get_file_from_response(result.ResultFile3Ds, "obj").Url, "obj"),
await download_url_to_file_3d(get_file_from_response(result.ResultFile3Ds, "fbx").Url, "fbx"),
uv_image,
)