hysts HF staff commited on
Commit
06affa1
1 Parent(s): 07a02e5
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. app.py +5 -7
  3. requirements.txt +6 -6
Dockerfile CHANGED
@@ -35,7 +35,7 @@ WORKDIR ${HOME}/app
35
 
36
  RUN curl https://pyenv.run | bash
37
  ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
38
- ENV PYTHON_VERSION=3.10.9
39
  RUN pyenv install ${PYTHON_VERSION} && \
40
  pyenv global ${PYTHON_VERSION} && \
41
  pyenv rehash && \
 
35
 
36
  RUN curl https://pyenv.run | bash
37
  ENV PATH=${HOME}/.pyenv/shims:${HOME}/.pyenv/bin:${PATH}
38
+ ARG PYTHON_VERSION=3.10.11
39
  RUN pyenv install ${PYTHON_VERSION} && \
40
  pyenv global ${PYTHON_VERSION} && \
41
  pyenv rehash && \
app.py CHANGED
@@ -14,10 +14,10 @@ from app_upload import create_upload_demo
14
  from inference import InferencePipeline
15
  from trainer import Trainer
16
 
17
- TITLE = '# [Tune-A-Video](https://tuneavideo.github.io/) UI'
18
 
19
  ORIGINAL_SPACE_ID = 'Tune-A-Video-library/Tune-A-Video-Training-UI'
20
- SPACE_ID = os.getenv('SPACE_ID', ORIGINAL_SPACE_ID)
21
  GPU_DATA = getoutput('nvidia-smi')
22
  SHARED_UI_WARNING = f'''## Attention - Training doesn't work in this shared UI. You can duplicate and use it with a paid private T4 GPU.
23
 
@@ -39,10 +39,8 @@ You can use "T4 small/medium" to run this demo.
39
  '''
40
 
41
  HF_TOKEN_NOT_SPECIFIED_WARNING = f'''The environment variable `HF_TOKEN` is not specified. Feel free to specify your Hugging Face token with write permission if you don't want to manually provide it for every run.
42
- <center>
43
- You can check and create your Hugging Face tokens <a href="https://huggingface.co/settings/tokens" target="_blank">here</a>.
44
- You can specify environment variables in the "Repository secrets" section of the {SETTINGS} tab.
45
- </center>
46
  '''
47
 
48
  HF_TOKEN = os.getenv('HF_TOKEN')
@@ -63,7 +61,7 @@ with gr.Blocks(css='style.css') as demo:
63
  show_warning(SHARED_UI_WARNING)
64
  elif not torch.cuda.is_available():
65
  show_warning(CUDA_NOT_AVAILABLE_WARNING)
66
- elif (not 'T4' in GPU_DATA):
67
  show_warning(INVALID_GPU_WARNING)
68
 
69
  gr.Markdown(TITLE)
 
14
  from inference import InferencePipeline
15
  from trainer import Trainer
16
 
17
+ TITLE = '# [Tune-A-Video](https://tuneavideo.github.io/)'
18
 
19
  ORIGINAL_SPACE_ID = 'Tune-A-Video-library/Tune-A-Video-Training-UI'
20
+ SPACE_ID = os.getenv('SPACE_ID')
21
  GPU_DATA = getoutput('nvidia-smi')
22
  SHARED_UI_WARNING = f'''## Attention - Training doesn't work in this shared UI. You can duplicate and use it with a paid private T4 GPU.
23
 
 
39
  '''
40
 
41
  HF_TOKEN_NOT_SPECIFIED_WARNING = f'''The environment variable `HF_TOKEN` is not specified. Feel free to specify your Hugging Face token with write permission if you don't want to manually provide it for every run.
42
+
43
+ You can check and create your Hugging Face tokens <a href="https://huggingface.co/settings/tokens" target="_blank">here</a>. You can specify environment variables in the "Repository secrets" section of the {SETTINGS} tab.
 
 
44
  '''
45
 
46
  HF_TOKEN = os.getenv('HF_TOKEN')
 
61
  show_warning(SHARED_UI_WARNING)
62
  elif not torch.cuda.is_available():
63
  show_warning(CUDA_NOT_AVAILABLE_WARNING)
64
+ elif 'T4' not in GPU_DATA:
65
  show_warning(INVALID_GPU_WARNING)
66
 
67
  gr.Markdown(TITLE)
requirements.txt CHANGED
@@ -4,16 +4,16 @@ decord==0.6.0
4
  diffusers[torch]==0.11.1
5
  einops==0.6.0
6
  ftfy==6.1.1
7
- gradio==3.16.2
8
- huggingface-hub==0.12.0
9
- imageio==2.25.0
10
  imageio-ffmpeg==0.4.8
11
  omegaconf==2.3.0
12
- Pillow==9.4.0
13
- python-slugify==7.0.0
14
  tensorboard==2.11.2
15
  torch==1.13.1
16
  torchvision==0.14.1
17
  transformers==4.26.0
18
- triton==2.0.0.dev20221202
19
  xformers==0.0.16
 
4
  diffusers[torch]==0.11.1
5
  einops==0.6.0
6
  ftfy==6.1.1
7
+ gradio==3.24.1
8
+ huggingface-hub==0.13.4
9
+ imageio==2.27.0
10
  imageio-ffmpeg==0.4.8
11
  omegaconf==2.3.0
12
+ Pillow==9.5.0
13
+ python-slugify==8.0.1
14
  tensorboard==2.11.2
15
  torch==1.13.1
16
  torchvision==0.14.1
17
  transformers==4.26.0
18
+ triton==2.0.0
19
  xformers==0.0.16