File size: 1,508 Bytes
5328bed | 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 | # Copyright (c) 2025 SandAI. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
export MASTER_ADDR=localhost
export MASTER_PORT=6005
export GPUS_PER_NODE=1
export NNODES=1
export WORLD_SIZE=1
export CUDA_VISIBLE_DEVICES=0
export PAD_HQ=1
export PAD_DURATION=1
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
export OFFLOAD_T5_CACHE=true
export OFFLOAD_VAE_CACHE=true
export TORCH_CUDA_ARCH_LIST="8.9;9.0"
MAGI_ROOT=$(git rev-parse --show-toplevel)
OUTPUT_NAME=flowcache
TIMESTAMP=$(date "+%Y-%m-%d_%H-%M-%S")
EXP_DIR="output/magi/${TIMESTAMP}_${OUTPUT_NAME}"
mkdir -p "$EXP_DIR"
LOG_FILE="$EXP_DIR/log_${TIMESTAMP}.log"
OUTPUT_PATH="$EXP_DIR/output.mp4"
export PYTHONPATH="$MAGI_ROOT:$PYTHONPATH"
python3 inference/pipeline/flowcache.py \
--config_file config/single_run/flowcache_t2v.json \
--mode t2v \
--prompt "a cat sitting on the grass" \
--output_path $OUTPUT_PATH \
--additional_config yaml_config/single_run/config.yaml \
2>&1 | tee $LOG_FILE
|