-
clone the huggingface repo because in this repo have the pretrained vae weight.
cd extract_latent/PATH git clone https://huggingface.co/ProgramerSalar/vae_model_ckptput the
duffusion_pytorch_model.safetensorsfile in thePATH/vae_ckptfolder -
clone this repo:
git clone https://github.com/ProgramerSalar/Tools.git -
Download the Dataset
cd Tools
hf download ProgramerSalar/clip_video clip_video_part_2.zip --repo-type dataset --local-dir .
unzip clip_video_part_2.zip
-
install the
req.txtfilecd tools pip install -r req.txt -
run the
scriptexport PYTORCH_CUDA_ALLOC_CONF=expandable_segments:Truesh extract_latent/script/script.sh
-
yaah, you can understand one things make sure there is not of this
clip_videofolder of in theToolsdir. when you are run theextract_text_featurefunction becausecodeare automatically create thisdir -
make sure the annotation are found in this format
{"video": "", "text": "So here I have an equation, a linear equation.", "video_latent": "", "text_latent": "./clip_video/Graphs_of_linear_equations/videos/So_here_I_have_an_equation,_a_linear_equation.pt"}
-
clone the huggingface repo because in this repo have the pretrained vae weight.
cd extract_text_features/PATH git clone https://huggingface.co/ProgramerSalar/text_encoder_minifluxput the
duffusion_pytorch_model.safetensorsfile in thePATH/vae_ckptfolder -
run the
scriptexport PYTORCH_CUDA_ALLOC_CONF=expandable_segments:Truesh extract_text_features/scripts/scripts.sh