Gemini-VideoGeneration / run_gen_image_prompt_only.sh
LehongWu's picture
Upload folder using huggingface_hub
6cc3d86 verified
#!/usr/bin/env bash
set -euo pipefail
export http_proxy="http://127.0.0.1:7890"
export https_proxy="http://127.0.0.1:7890"
if [[ -z "${GEMINI_API_KEY:-}" ]]; then
echo "Error: GEMINI_API_KEY is not set."
echo 'Run: export GEMINI_API_KEY="your_api_key"'
exit 1
fi
# if ! python3 -c "from google import genai" >/dev/null 2>&1; then
# echo "Installing dependency: google-genai"
# python3 -m pip install --upgrade google-genai
# fi
datetime=$(date +%m%d%H%M%S)
name=leaves
output_dir="output_image/${name}_${datetime}"
prompt="
Autumn leaves drifting on the black background, but the locations can follow the original image.
The autumn leaves should look diverse in shapes, sizes, and colors should be red and gold.
Not all leaves are facing the camera, instead, they are in random directions as if drifting in the wind.
But overall, the leaves should not be too dense or too large.
"
python gen_image_prompt_only.py \
--prompt "$prompt" \
--model gemini-3.1-flash-image-preview \
--aspect-ratio 16:9 \
--resolution 2K \
--number-of-images 1 \
--name $name \
--output-dir $output_dir