elungky commited on
Commit
5ae0b37
·
1 Parent(s): 0f7bb64

Save generated video to /data/output

Browse files
Files changed (1) hide show
  1. start.sh +10 -7
start.sh CHANGED
@@ -1,16 +1,21 @@
1
  #!/bin/bash
2
 
3
  # Set environment variables for a single GPU on Hugging Face Spaces
4
- export CUDA_VISIBLE_DEVICES="0"
5
- export CUDA_HOME="/usr/local/cuda"
6
  export PYTHONPATH="/app"
7
 
8
  echo "Starting GEN3C application on A100 Large 80GB GPU..."
9
 
 
 
 
 
 
10
  python cosmos_predict1/diffusion/inference/gen3c_single_image.py \
11
  --checkpoint_dir checkpoints \
12
  --input_image_path assets/diffusion/000000.png \
13
- --video_save_name test_single_image \
14
  --guidance 1 \
15
  --foreground_masking \
16
  --offload_diffusion_transformer \
@@ -21,7 +26,5 @@ python cosmos_predict1/diffusion/inference/gen3c_single_image.py \
21
  --disable_guardrail \
22
  --disable_prompt_encoder
23
 
24
- # IMPORTANT: If your Python script (gen3c_single_image.py) is designed to run and then exit,
25
- # your Hugging Face Space will stop after it finishes.
26
- # If your application is meant to be a continuous service (like a Gradio/Streamlit app),
27
- # ensure that the Python script itself keeps running (e.g., by starting a web server).
 
1
  #!/bin/bash
2
 
3
  # Set environment variables for a single GPU on Hugging Face Spaces
4
+ export CUDA_VISIBLE_DEVICES="0"
5
+ export CUDA_HOME="/usr/local/cuda"
6
  export PYTHONPATH="/app"
7
 
8
  echo "Starting GEN3C application on A100 Large 80GB GPU..."
9
 
10
+ # Create the /data directory if it doesn't exist (it should be mounted, but good practice)
11
+ mkdir -p /data/output
12
+
13
+ # Run your Python script, saving the output video to /data/output/
14
+ # IMPORTANT: Ensure your script can handle an absolute path for --video_save_name
15
  python cosmos_predict1/diffusion/inference/gen3c_single_image.py \
16
  --checkpoint_dir checkpoints \
17
  --input_image_path assets/diffusion/000000.png \
18
+ --video_save_name /data/output/test_single_image.mp4 \ # <-- CHANGED PATH HERE
19
  --guidance 1 \
20
  --foreground_masking \
21
  --offload_diffusion_transformer \
 
26
  --disable_guardrail \
27
  --disable_prompt_encoder
28
 
29
+ # IMPORTANT: Your Space will still stop after this script finishes,
30
+ # but the generated video will now be saved in /data/output/ and persist.