Skip to content

DASH-Lab/Grok-Imagine-Videos

Repository files navigation

Repository Guidelines for WINDOW PC

1. What This Repository Does

This project generates videos using Grok Imagine based on automatically created text prompts. Free rate limits of Grok Imagine now could be around 50~60 requests per day.

Where do the text prompts come from?

Text prompts are generated by randomly sampling activity, place, race, and gender in utils.py. These sampled attributes are sent to a free LLM API (e.g., Gemma-3B) to produce paraphrased and diverse descriptions, which are then saved into files named prompt*.txt.

How the text prompts are used

The script opens a Chrome tab in debug mode on your PC. You must manually navigate to grok.com/imagine and log in to your account. After that, the code interacts with your screen, enters the prompt read from txt file, and downloads the generated video.

Note: Grok Imagine can be slow when generating videos. If the download fails after waiting, the script will retry using the first photo prompt generated by rok (scroll down on the creation page). The prompt photos are also based on the text prompts.


2. Installation

Install the required packages:

pip install -r requirements.txt

3. Creating a (Free) API Key and Setting the Output Directory

  1. Create a free API key at: openrouter.ai
  2. Insert the key into line 10 of prompt_gen.py.
  3. Install RAIDRIVE if you want to access the server disk through Windows Explorer.
  4. Update self.download_dir in line 156 of video_create.py to your preferred output directory, and path to output csv_filename in line 1285. Update your UID in file "config.json"

4. Running the Code

  1. Close all Chrome windown, and Run start_chrome_debug.bat to start Chrome in debug mode.

  2. Manually open grok.com/imagine and log in.

    • Cloudflare currently blocks automated login.
    • (If you have suggestions for automating this step, contributions are welcome!)
  3. Run gen_exe.bat to start generating videos. NO MANUAL STEPS required futher.

( In side gen_exe.bat, it'll first run prompt_gen.py to create 20 prompts by LLMs. Then, video_create.py create video and download sequentially. One'CSV' file created to save all meta data in your meta directory GenAI_600\Police_2025_Simon\created_human_videos\metadata\[UID].)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published