UltraTex: تكسية نموذج ثلاثي الأبعاد
أضف نسيج PBR إلى شبكة ثلاثية الأبعاد بدون نسيج من صورة مرجعية واحدة. يعرض UltraTex الشبكة في ستة مشاهد للمتجهات العمودية العالمية، ثم يولّد الألبيدو...
حول
Texture an untextured mesh from a single reference image. UltraTex renders the mesh into six world-normal views, paints albedo and metallic/roughness with two UltraTex LoRA passes on FLUX.2 Klein 9B, then bakes the result onto the mesh UVs and exports a PBR GLB with its PNG maps.
Graph: ApplyTextureToMesh, BakeTextureFromViews, BlockSparseAttention, ConditioningLoader, CreateCameraOrbit, EmptyFlux2LatentImage, Get3DComponents, KSampler, Load3DAdvanced, LoadBackgroundRemovalModel, LoadImage, LoraLoaderModelOnly, MarkdownNote, MaskPreview, PreviewImage, RemoveBackground, RenderMesh, ResizeAndPadImage, SaveGLB, SaveImageAdvanced, SplitImageChannels, UNETLoader, UltraTexConditioning, VAEDecode, VAELoader, b6610733-f2f0-4f83-9281-42e1aa892a5a. Output: 3d (ultratex_texture_3d_model.glb).
ما تقدّمه
- جارٍ قراءة سير العمل
يعمل في ComfyUI. لا يمكن تشغيل سير العمل هذا على هذه الصفحة. نزّله وافتحه في ComfyUI.
تنزيل سير العمللا توجد مخرجات نموذجية لسير العمل هذا بعد.
داخل سير العمل
معاينة للقراءة فقط لرسم العقد البياني. افتحه في Comfy Cloud أو نزّله لتعديل العقد.
Loading the graph
Open full-size workflow previewالملفات في سير العمل هذا
- المخرج
- 3D
- المؤلف
- المؤلف غير متاح
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
What you need
- Runs on
- Comfy Cloud
- المفتاح
- COMFY_API_KEY
يتطلب خطة Cloud مدفوعة ورصيدًا.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"1": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux-2-klein-base-9b_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"3": {
"class_type": "BlockSparseAttention",
"inputs": {
"dense_blocks": "",
"end_percent": 1,
"extra_tokens": 256,
"min_tokens": 12288,
"model": [
"1",
0
],
"selection": "sla",
"selection.keep_percent": 20,
"sink_conditioning": "exact_kv_and_rows",
"start_percent": 0,
"verbose": False
},
"_meta": {
"title": "Model Sparse Attention"
}
},
"4": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ultratex_flux2_klein_9b_albedo_lora_bf16.safetensors",
"model": [
"105",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"5": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "ultratex_flux2_klein_9b_metallic_roughness_lora_bf16.safetensors",
"model": [
"3",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"7": {
"class_type": "ConditioningLoader",
"inputs": {
"conditioning_name": "flux-2-klein-9b_empty_prompt.safetensors"
},
"_meta": {
"title": "Load Conditioning"
}
},
"8": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ultratex_flux2_vae_fp32.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"11": {
"class_type": "Get3DComponents",
"inputs": {
"model_3d": [
"234",
0
]
},
"_meta": {
"title": "Get 3D Components"
}
},
"13": {
"class_type": "RenderMesh",
"inputs": {
"background": "#ffffff",
"camera_info": [
"18",
0
],
"height": [
"233:90",
0
],
"mesh": [
"11",
0
],
"mode": "world normal",
"width": [
"233:90",
0
]
},
"_meta": {
"title": "Render Mesh"
}
},
"14": {
"class_type": "LoadImage",
"inputs": {
"image": "sir_frog.png"
},
"_meta": {
"title": "Load Image"
}
},
"16": {
"class_type": "UltraTexConditioning",
"inputs": {
"conditioning": [
"7",
0
],
"extra_views": "off",
"masks": [
"210",
0
],
"normals": [
"209",
0
],
"reference": [
"242",
0
],
"reference_mask": [
"202",
0
],
"vae": [
"8",
0
]
},
"_meta": {
"title": "UltraTex Conditioning"
}
},
"17": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 6,
"height": [
"233:90",
0
],
"width": [
"233:90",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"18": {
"class_type": "CreateCameraOrbit",
"inputs": {
"camera_info": [
"234",
2
],
"count": 4,
"pitch": 0,
"poles": "top and bottom",
"yaw": 360
},
"_meta": {
"title": "Create Camera Orbit"
}
},
"20": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"17",
0
],
"model": [
"4",
0
],
"negative": [
"16",
0
],
"positive": [
"16",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 1,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"21": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"20",
0
],
"vae": [
"8",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"22": {
"class_type": "BakeTextureFromViews",
"inputs": {
"blend_exponent": 4,
"camera_info": [
"18",
0
],
"fill_unseen": True,
"images": [
"21",
0
],
"mesh": [
"11",
0
],
"resolution": [
"233:93",
0
]
},
"_meta": {
"title": "Bake Texture From Views"
}
},
"60": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"17",
0
],
"model": [
"5",
0
],
"negative": [
"16",
0
],
"positive": [
"16",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 4,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"61": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"60",
0
],
"vae": [
"8",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"62": {
"class_type": "BakeTextureFromViews",
"inputs": {
"blend_exponent": 4,
"camera_info": [
"18",
0
],
"fill_unseen": True,
"images": [
"61",
0
],
"mesh": [
"11",
0
],
"resolution": [
"233:93",
0
]
},
"_meta": {
"title": "Bake Texture From Views"
}
},
"80": {
"class_type": "ApplyTextureToMesh",
"inputs": {
"base_color": [
"228",
0
],
"mesh": [
"11",
0
],
"metallic": [
"231",
0
],
"roughness": [
"230",
0
]
},
"_meta": {
"title": "Apply Texture to Mesh"
}
},
"81": {
"class_type": "SaveGLB",
"inputs": {
"filename_prefix": "3d/ultratex_texture_3d_model",
"mesh": [
"80",
0
]
},
"_meta": {
"title": "Save 3D Model"
}
},
"105": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "flux-2-klein-9b_distill_lora_avg_rank_345_bf16.safetensors",
"model": [
"3",
0
],
"strength_model": 0.5
},
"_meta": {
"title": "Load LoRA"
}
},
"200": {
"class_type": "RemoveBackground",
"inputs": {
"bg_removal_model": [
"201",
0
],
"image": [
"242",
0
]
},
"_meta": {
"title": "Remove Background"
}
},
"201": {
"class_type": "LoadBackgroundRemovalModel",
"inputs": {
"bg_removal_name": "birefnet.safetensors"
},
"_meta": {
"title": "Load Background Removal Model"
}
},
"202": {
"class_type": "MaskPreview",
"inputs": {
"mask": [
"200",
0
]
},
"_meta": {
"title": "Preview Mask"
}
},
"209": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"13",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"210": {
"class_type": "MaskPreview",
"inputs": {
"mask": [
"13",
1
]
},
"_meta": {
"title": "Preview Mask"
}
},
"223": {
"class_type": "SplitImageChannels",
"inputs": {
"image": [
"62",
0
]
},
"_meta": {
"title": "Split Image Channels"
}
},
"228": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "3d/ultratex_texture_3d_model_albedo",
"format": "png",
"format.bit_depth": "8-bit",
"format.channels": "auto",
"format.input_color_space": "sRGB",
"images": [
"22",
0
]
},
"_meta": {
"title": "Save Albedo"
}
},
"230": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "3d/ultratex_texture_3d_model_roughness",
"format": "png",
"format.bit_depth": "8-bit",
"format.channels": "grayscale (1 channel)",
"format.input_color_space": "sRGB",
"images": [
"223",
1
]
},
"_meta": {
"title": "Save Roughness"
}
},
"231": {
"class_type": "SaveImageAdvanced",
"inputs": {
"filename_prefix": "3d/ultratex_texture_3d_model_metallic",
"format": "png",
"format.bit_depth": "8-bit",
"format.channels": "grayscale (1 channel)",
"format.input_color_space": "sRGB",
"images": [
"223",
2
]
},
"_meta": {
"title": "Save Metallic"
}
},
"234": {
"class_type": "Load3DAdvanced",
"inputs": {
"height": [
"233:90",
0
],
"model_file": "sir_frog.obj",
"viewport_state": "",
"width": [
"233:90",
0
]
},
"_meta": {
"title": "Load 3D (Advanced)"
}
},
"242": {
"class_type": "ResizeAndPadImage",
"inputs": {
"image": [
"14",
0
],
"interpolation": "area",
"padding_color": "white",
"target_height": [
"233:90",
0
],
"target_width": [
"233:90",
0
]
},
"_meta": {
"title": "Resize And Pad Image"
}
},
"233:90": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 1024
},
"_meta": {
"title": "Rendered Mesh Resolution"
}
},
"233:93": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 4096
},
"_meta": {
"title": "Texture Resolution"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)مهام سير عمل ذات صلة
- Hunyuan3D, Tencent
Hunyuan3D 2.0 MV
- Hunyuan3D
HunYuan3D: النص إلى النموذج
- Hunyuan3D
Hunyuan3D: من صورة إلى نموذج
- IIdol, TripoSplat
Idol: من صورة إلى Gaussian Splat
- Meshy
Meshy T2.5: من النص إلى النموذج (طوبولوجيا ذكية)
- Meshy
Meshy T2.5: من صورة إلى نموذج (طوبولوجيا ذكية)
- Meshy
Meshy: من الصورة إلى النقش البارز
- MMoGe
MoGe: بانوراما إلى شبكة
- MMoGe
MoGe: تقدير الهندسة المنظورية
- SSAM 3D Body
SAM 3D Body: استخراج شبكة الجسم البشري ثلاثية الأبعاد من الفيديو
- Tripo
Tripo H3.1: من الصورة إلى النموذج
- Tripo
Tripo H3.1: من العرض المتعدد إلى النموذج