Spaces:
Running
on
Zero
Running
on
Zero
Update setup_blender.sh
Browse files- setup_blender.sh +9 -6
setup_blender.sh
CHANGED
@@ -42,7 +42,7 @@ echo "Blender Python Executable: ${BLENDER_PY_EXEC}"
|
|
42 |
echo "Using CUDA_HOME=${CUDA_HOME}"
|
43 |
echo "Targeting PyTorch for CUDA: ${TARGET_CUDA_VERSION_SHORT}"
|
44 |
echo "TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST}"
|
45 |
-
echo "NOTE: flash-attn installation is
|
46 |
|
47 |
# --- Download and Extract Blender ---
|
48 |
mkdir -p "${BLENDER_INSTALL_BASE}"
|
@@ -126,15 +126,18 @@ else
|
|
126 |
fi
|
127 |
|
128 |
# (Optional) VRM Addon installation
|
129 |
-
VRM_ADDON_REL_PATH="blender/add-on-vrm-v2.20.77_modified.zip"
|
130 |
ABSOLUTE_ADDON_PATH="${UNIRIG_REPO_CLONE_DIR}/${VRM_ADDON_REL_PATH}"
|
131 |
if [ -f "${ABSOLUTE_ADDON_PATH}" ]; then
|
132 |
-
echo "
|
|
|
|
|
133 |
(cd "${UNIRIG_REPO_CLONE_DIR}" && \
|
134 |
-
"${BLENDER_PY_EXEC}" -c "import bpy, os; bpy.ops.preferences.addon_install(overwrite=True, filepath=os.path.abspath('${VRM_ADDON_REL_PATH}')); bpy.ops.preferences.addon_enable(module='io_scene_vrm'); print('VRM Addon
|
135 |
-
echo "VRM addon installation
|
|
|
136 |
else
|
137 |
-
echo "VRM addon zip not found at ${ABSOLUTE_ADDON_PATH}, skipping."
|
138 |
fi
|
139 |
|
140 |
# --- Cleanup ---
|
|
|
42 |
echo "Using CUDA_HOME=${CUDA_HOME}"
|
43 |
echo "Targeting PyTorch for CUDA: ${TARGET_CUDA_VERSION_SHORT}"
|
44 |
echo "TORCH_CUDA_ARCH_LIST: ${TORCH_CUDA_ARCH_LIST}"
|
45 |
+
echo "NOTE: flash-attn installation is SKIPPED."
|
46 |
|
47 |
# --- Download and Extract Blender ---
|
48 |
mkdir -p "${BLENDER_INSTALL_BASE}"
|
|
|
126 |
fi
|
127 |
|
128 |
# (Optional) VRM Addon installation
|
129 |
+
VRM_ADDON_REL_PATH="blender/add-on-vrm-v2.20.77_modified.zip" # Relative to UniRig repo root
|
130 |
ABSOLUTE_ADDON_PATH="${UNIRIG_REPO_CLONE_DIR}/${VRM_ADDON_REL_PATH}"
|
131 |
if [ -f "${ABSOLUTE_ADDON_PATH}" ]; then
|
132 |
+
echo "Attempting to install optional VRM addon for Blender..."
|
133 |
+
# Try to install and enable the addon. If it fails, print a warning and continue.
|
134 |
+
# The || true ensures that if the python command fails, the script doesn't exit due to set -e
|
135 |
(cd "${UNIRIG_REPO_CLONE_DIR}" && \
|
136 |
+
"${BLENDER_PY_EXEC}" -c "import bpy, os; print(f'Attempting to install addon from: {os.path.abspath(\"${VRM_ADDON_REL_PATH}\")}'); bpy.ops.preferences.addon_install(overwrite=True, filepath=os.path.abspath('${VRM_ADDON_REL_PATH}')); print('Addon installation script executed. Attempting to enable...'); bpy.ops.preferences.addon_enable(module='io_scene_vrm'); print('VRM Addon enabled successfully.')") \
|
137 |
+
|| echo "WARNING: VRM addon installation or enabling failed. This is an optional addon. Continuing setup..."
|
138 |
+
echo "VRM addon installation/enabling attempt finished."
|
139 |
else
|
140 |
+
echo "VRM addon zip not found at ${ABSOLUTE_ADDON_PATH}, skipping addon installation."
|
141 |
fi
|
142 |
|
143 |
# --- Cleanup ---
|