Skip to content

Commit

Permalink
Try integrate SF3D official workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Dec 26, 2024
1 parent f9e7030 commit 22cf838
Show file tree
Hide file tree
Showing 7 changed files with 277 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
{
"last_node_id": 10,
"last_link_id": 12,
"nodes": [
{
"id": 8,
"type": "StableFast3DSampler",
"pos": [
756.9950672198843,
9.735666739723854
],
"size": {
"0": 315,
"1": 166
},
"flags": {},
"order": 3,
"mode": 0,
"inputs": [
{
"name": "model",
"type": "SF3D_MODEL",
"link": 8
},
{
"name": "image",
"type": "IMAGE",
"link": 10,
"slot_index": 1
},
{
"name": "mask",
"type": "MASK",
"link": 11
},
{
"name": "remesh",
"type": "none",
"link": null,
"slot_index": 3
}
],
"outputs": [
{
"name": "mesh",
"type": "MESH",
"links": [
9
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "StableFast3DSampler"
},
"widgets_values": [
0.85,
1024,
"triangle"
]
},
{
"id": 9,
"type": "StableFast3DSave",
"pos": [
1116,
8
],
"size": [
600,
512
],
"flags": {},
"order": 4,
"mode": 0,
"inputs": [
{
"name": "mesh",
"type": "MESH",
"link": 9
}
],
"properties": {
"Node name for S&R": "StableFast3DSave"
},
"widgets_values": [
"SF3D",
null
]
},
{
"id": 6,
"type": "InvertMask",
"pos": [
485,
132
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 2,
"mode": 0,
"inputs": [
{
"name": "mask",
"type": "MASK",
"link": 6
}
],
"outputs": [
{
"name": "MASK",
"type": "MASK",
"links": [
11
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "InvertMask"
}
},
{
"id": 1,
"type": "LoadImage",
"pos": [
105,
26
],
"size": {
"0": 315,
"1": 314
},
"flags": {},
"order": 0,
"mode": 0,
"outputs": [
{
"name": "IMAGE",
"type": "IMAGE",
"links": [
10
],
"shape": 3,
"slot_index": 0
},
{
"name": "MASK",
"type": "MASK",
"links": [
6
],
"shape": 3,
"slot_index": 1
}
],
"properties": {
"Node name for S&R": "LoadImage"
},
"widgets_values": [
"axe.png",
"image"
]
},
{
"id": 7,
"type": "StableFast3DLoader",
"pos": [
478,
-27
],
"size": {
"0": 210,
"1": 26
},
"flags": {},
"order": 1,
"mode": 0,
"outputs": [
{
"name": "sf3d_model",
"type": "SF3D_MODEL",
"links": [
8
],
"shape": 3,
"slot_index": 0
}
],
"properties": {
"Node name for S&R": "StableFast3DLoader"
}
}
],
"links": [
[
6,
1,
1,
6,
0,
"MASK"
],
[
8,
7,
0,
8,
0,
"SF3D_MODEL"
],
[
9,
8,
0,
9,
0,
"MESH"
],
[
10,
1,
0,
8,
1,
"IMAGE"
],
[
11,
6,
0,
8,
2,
"MASK"
]
],
"groups": [],
"config": {},
"extra": {
"ds": {
"scale": 0.6209213230591552,
"offset": [
80.89139921077967,
610.3296066172098
]
}
},
"version": 0.4
}
8 changes: 4 additions & 4 deletions pt25-cu124/attachments/run.bat
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
@REM Edit this first! According to your GPU model.
set TORCH_CUDA_ARCH_LIST=6.1+PTX

@REM To set HuggingFace Access Token, uncomment and edit the line below.
@REM https://huggingface.co/settings/tokens
rem set HF_TOKEN=

@REM Set the correct path for CUDA Toolkit if you install it elsewhere.
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4

Expand All @@ -12,10 +16,6 @@ rem set HTTPS_PROXY=http://localhost:1081
rem set PIP_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple
rem set HF_ENDPOINT=https://hf-mirror.com

@REM To set HuggingFace Access Token, uncomment and edit the line below.
@REM https://huggingface.co/settings/tokens
rem set HF_TOKEN=

@REM To enable HuggingFace Hub's experimental high-speed file transfer, uncomment the line below.
@REM https://huggingface.co/docs/huggingface_hub/hf_transfer
rem set HF_HUB_ENABLE_HF_TRANSFER=1
Expand Down
8 changes: 4 additions & 4 deletions pt25-cu124/attachments/中文脚本/run_cn.bat
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
@REM 务必根据你的 GPU 型号配置!
set TORCH_CUDA_ARCH_LIST=6.1+PTX

@REM 如需配置 HuggingFace Access Token(访问令牌),取消注释并编辑。
@REM 管理令牌: https://huggingface.co/settings/tokens
rem set HF_TOKEN=

@REM 如将 CUDA Toolkit 安装到其他路径,注意修改
set CUDA_HOME=C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4

@REM 如需配置代理,取消注释(移除行首的 'rem ')并编辑下两行环境变量。
rem set HTTP_PROXY=http://localhost:1081
rem set HTTPS_PROXY=http://localhost:1081

@REM 如需配置 HuggingFace Access Token(访问令牌),取消注释并编辑。
@REM 管理令牌: https://huggingface.co/settings/tokens
rem set HF_TOKEN=

@REM 如需启用 HF Hub 实验性高速传输,取消该行注释。仅在千兆比特以上网速有意义。
@REM https://huggingface.co/docs/huggingface_hub/hf_transfer
rem set HF_HUB_ENABLE_HF_TRANSFER=1
Expand Down
5 changes: 5 additions & 0 deletions pt25-cu124/requirements4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ diffusers
einops
fairscale
ftfy
gpytoolbox
huggingface-hub[hf-transfer]
imageio
jaxtyping
joblib
kornia
matplotlib
omegaconf
onnx
onnxruntime-gpu
open-clip-torch
opencv-contrib-python-headless
pandas
pilgram
Expand All @@ -21,6 +24,7 @@ pygit2
python-ffmpeg
pyyaml
regex
rembg[gpu]
safetensors
scikit-image
scikit-learn
Expand All @@ -35,3 +39,4 @@ torchmetrics
torchsde
tqdm
transformers
trimesh
5 changes: 0 additions & 5 deletions pt25-cu124/requirements5.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,14 @@ color-matcher
dill
easydict
GitPython
gpytoolbox
igraph
imageio-ffmpeg
iopath
jaxtyping
libigl
mss
nerfacc
ninja
numba
open-clip-torch
openai
packaging
peft
Expand All @@ -32,13 +29,11 @@ python-dotenv
pytorch-lightning
pytorch-msssim
pyvista
rembg
requests
rich
segment-anything
slangtorch
torchtyping
trimesh
typer
typing-extensions
ultralytics
Expand Down
3 changes: 3 additions & 0 deletions pt25-cu124/requirements8.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
https://huggingface.co/lldacing/flash-attention-windows-wheel/resolve/main/flash_attn-2.7.0.post2%2Bcu124torch2.5.1cxx11abiFALSE-cp312-cp312-win_amd64.whl
https://github.com/YanWenKun/ComfyUI-Windows-Portable/releases/download/v6.2-wheels/pynim-0.0.3-cp312-abi3-win_amd64.whl
https://github.com/YanWenKun/ComfyUI-Windows-Portable/releases/download/v6.2-wheels/texture_baker-0.0.1-cp312-cp312-win_amd64.whl
https://github.com/YanWenKun/ComfyUI-Windows-Portable/releases/download/v6.2-wheels/uv_unwrapper-0.0.1-cp312-cp312-win_amd64.whl
7 changes: 7 additions & 0 deletions pt25-cu124/stage2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ rm -rf ./ComfyUI-3D-Pack/_Pre_Builds
# This time not disable it
$gcs https://github.com/ltdrdata/ComfyUI-Manager.git

# SF3D
$gcs https://github.com/Stability-AI/stable-fast-3d.git

$gcs https://github.com/AIGODLIKE/AIGODLIKE-ComfyUI-Translation.git
$gcs https://github.com/cubiq/ComfyUI_IPAdapter_plus.git
$gcs https://github.com/edenartlab/eden_comfy_pipelines.git
Expand Down Expand Up @@ -86,6 +89,10 @@ rm -rf "$workdir"/Comfy3D_WinPortable/ComfyUI/user/default/workflows/_Example_Ou
mv "$workdir"/Comfy3D_WinPortable/ComfyUI/custom_nodes/ComfyUI-3D-Pack/_Example_Workflows/_Example_Inputs_Files/* \
"$workdir"/Comfy3D_WinPortable/ComfyUI/input/

# Example input files of SF3D
cp -r "$workdir"/Comfy3D_WinPortable/ComfyUI/custom_nodes/stable-fast-3d/demo_files/examples/. \
"$workdir"/Comfy3D_WinPortable/ComfyUI/input/

################################################################################
# Source files needed by user compile-install
cd "$workdir"/Comfy3D_WinPortable/extras/
Expand Down

0 comments on commit 22cf838

Please sign in to comment.