Giter VIP home page Giter VIP logo

Comments (4)

qiuyu96 avatar qiuyu96 commented on July 3, 2024 5

Wow, thank you so much for your outstanding work! I genuinely believe it is incredibly helpful 👍👍👍.

from codef.

undcloud avatar undcloud commented on July 3, 2024
%cd /content
%env TF_CPP_MIN_LOG_LEVEL=1

# !git clone --recursive https://github.com/nvlabs/tiny-cuda-nn
# %cd /content/tiny-cuda-nn
# !cmake . -B build
# !cmake --build build --config RelWithDebInfo -j
# !pip install git+https://github.com/NVlabs/tiny-cuda-nn/#subdirectory=bindings/torch

!git clone -b dev https://github.com/camenduru/CoDeF
%cd /content/CoDeF

!pip install -q pytorch_lightning einops ipdb torch_optimizer kornia scikit-video
!pip install -q https://huggingface.co/camenduru/CoDeF/resolve/main/tinycudann-1.7-cp310-cp310-linux_x86_64.whl

!apt -y install -qq aria2
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/all_sequences.zip -d /content/CoDeF/ckpts -o all_sequences.zip
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/beauty_0.ckpt -d /content/CoDeF/ckpts -o beauty_0.ckpt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/beauty_1.ckpt -d /content/CoDeF/ckpts -o beauty_1.ckpt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/lemon_hit.ckpt -d /content/CoDeF/ckpts -o lemon_hit.ckpt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/scene_0.ckpt -d /content/CoDeF/ckpts -o scene_0.ckpt
!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/camenduru/CoDeF/resolve/main/white_smoke.ckpt -d /content/CoDeF/ckpts -o white_smoke.ckpt

!unzip /content/CoDeF/ckpts/all_sequences.zip -d /content/CoDeF/ckpts
!rm -rf /content/CoDeF/ckpts/__MACOSX

# !mkdir /content/CoDeF/ckpts/all_sequences/scene_0/base
# !cp /content/CoDeF/ckpts/scene_0.ckpt /content/CoDeF/ckpts/all_sequences/scene_0/base/scene_0.ckpt
# @title Generate Video (Step 3)

GPUS=0
NAME="scene_0"
EXP_NAME="base"
ROOT_DIRECTORY=f"ckpts/all_sequences/{NAME}/{NAME}"
LOG_SAVE_PATH=f"logs/test_all_sequences/{NAME}"
MASK_DIRECTORY=f"ckpts/all_sequences/{NAME}/{NAME}_masks_0 ckpts/all_sequences/{NAME}/{NAME}_masks_1"
CONFIG_DIRECTORY=f"configs/{NAME}/{EXP_NAME}.yaml"
CANONICAL_DIR=f"ckpts/all_sequences/{NAME}/{EXP_NAME}_control"
WEIGHT_PATH= f"ckpts/{NAME}.ckpt" 

!python train.py --test --encode_w \
                --root_dir $ROOT_DIRECTORY \
                --log_save_path $LOG_SAVE_PATH \
                --mask_dir $MASK_DIRECTORY \
                --weight_path $WEIGHT_PATH \
                --gpus $GPUS \
                --canonical_dir $CANONICAL_DIR \
                --config $CONFIG_DIRECTORY \
                --exp_name $EXP_NAME

from codef.

sergedahdouh avatar sergedahdouh commented on July 3, 2024

i am facing issue with colab
Traceback (most recent call last):
File "/content/CoDeF/train.py", line 556, in
hparams = get_opts()
Screenshot 2023-08-27 at 00 37 19

File "/content/CoDeF/opt.py", line 157, in get_opts
with open(args.config, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: 'configs/serge/base.yaml'

from codef.

desaiankitb avatar desaiankitb commented on July 3, 2024

replace the block 1 with the following code and it should work. Issue is with variable names and relative paths.

# @title Train (Step 1)

GPUS=0
NAME="beauty_0"
EXP_NAME="base"
ROOT_DIRECTORY=f"ckpts/all_sequences/{NAME}/{NAME}"
MODEL_SAVE_PATH=f"ckpts/all_sequences/{NAME}"
LOG_SAVE_PATH=f"logs/test_all_sequences/{NAME}"
WEIGHT_PATH=f"ckpts/all_sequences/{NAME}.ckpt"
CONFIG_DIRECTORY=f"configs/{NAME}/{EXP_NAME}.yaml"
MASK_DIRECTORY=f"all_sequences/{NAME}/{NAME}_masks_0 all_sequences/{NAME}/{NAME}_masks_1"
FLOW_DIRECTORY=f"all_sequences/{NAME}/{NAME}_flow"

!python train.py --root_dir $ROOT_DIRECTORY \
                --model_save_path $MODEL_SAVE_PATH \
                --log_save_path $LOG_SAVE_PATH  \
                --gpus $GPUS \
                --encode_w --annealed \
                --config $CONFIG_DIRECTORY \
                --exp_name $EXP_NAME
                # --mask_dir $MASK_DIRECTORY
                # --flow_dir $FLOW_DIRECTORY

https://github.com/desaiankitb/video-capabilities/blob/main/Copy_of_CoDeF_colab.ipynb - this is the working copy with "beauty_0" example.

from codef.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.