Spaces:
Build error
Build error
File size: 1,710 Bytes
e3e5f9e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# !/usr/bin/bash
# ------------------------------------
# stage | Minimum Memory Support
# ------------------------------------
# text_to_image | ~14G
# ------------------------------------
# image_to_views | lite ~8G
# image_to_views | std ~16G
# ------------------------------------
# views_to_mesh | ~10G (90000 faces)
# ------------------------------------
# Usage:
# bash scripts/text_to_3d_lite_separately.sh "a lovely rabbit" ./outputs/test
# # need Memory > 14G
text_prompt=$1
save_folder=$2
# init
use_lite=true
do_texture_mapping=true
max_faces_num=90000
mkdir -p $save_folder
python infer/text_to_image.py \
--text2image_path weights/hunyuanDiT \
--text_prompt "$text_prompt" \
--output_img_path $save_folder/img.jpg \
--seed 0 \
--steps 25 \
--device "cuda:0" \
&& \
python infer/removebg.py \
--rgb_path $save_folder/img.jpg \
--output_rgba_path $save_folder/img_nobg.png \
&& \
python infer/image_to_views.py \
--rgba_path $save_folder/img_nobg.png \
--output_views_path $save_folder/views.jpg \
--output_cond_path $save_folder/cond.jpg \
--seed 0 \
--steps 50 \
--device "cuda:0" \
--use_lite $use_lite \
&& \
python infer/views_to_mesh.py \
--views_path $save_folder/views.jpg \
--cond_path $save_folder/cond.jpg \
--save_folder $save_folder \
--max_faces_num $max_faces_num \
--mv23d_cfg_path ./svrm/configs/svrm.yaml \
--mv23d_ckt_path ./weights/svrm/svrm.safetensors \
--device "cuda:0" \
--use_lite $use_lite \
--do_texture_mapping $do_texture_mapping \
&& \
python infer/gif_render.py \
--mesh_path $save_folder/mesh.obj \
--output_gif_path $save_folder/output.gif
|