gen3c / start.sh
elungky's picture
Updated start.sh for A100 large 80GB with single GPU command and offloading
f2ae3ad
raw
history blame
1.16 kB
#!/bin/bash
# Set environment variables for a single GPU on Hugging Face Spaces
export CUDA_VISIBLE_DEVICES="0" # Hugging Face maps the visible GPU to device 0
export CUDA_HOME="/usr/local/cuda" # Common path for CUDA toolkit in Docker images
export PYTHONPATH="/app" # Assuming /app is your WORKDIR in the base image where your code is
echo "Starting GEN3C application on A100 Large 80GB GPU..."
python cosmos_predict1/diffusion/inference/gen3c_single_image.py \
--checkpoint_dir checkpoints \
--input_image_path assets/diffusion/000000.png \
--video_save_name test_single_image \
--guidance 1 \
--foreground_masking \
--offload_diffusion_transformer \
--offload_tokenizer \
--offload_text_encoder_model \
--offload_prompt_upsampler \
--offload_guardrail_models \
--disable_guardrail \
--disable_prompt_encoder
# IMPORTANT: If your Python script (gen3c_single_image.py) is designed to run and then exit,
# your Hugging Face Space will stop after it finishes.
# If your application is meant to be a continuous service (like a Gradio/Streamlit app),
# ensure that the Python script itself keeps running (e.g., by starting a web server).