ShaoTengLiu commited on
Commit
3b4ffb9
1 Parent(s): 371bfd9

update video-p2p

Browse files
Files changed (2) hide show
  1. requirements.txt +2 -0
  2. trainer.py +4 -0
requirements.txt CHANGED
@@ -17,3 +17,5 @@ torchvision==0.14.1
17
  transformers==4.26.0
18
  triton==2.0.0.dev20221202
19
  xformers==0.0.16
 
 
 
17
  transformers==4.26.0
18
  triton==2.0.0.dev20221202
19
  xformers==0.0.16
20
+ opencv-python
21
+ ipywidgets
trainer.py CHANGED
@@ -136,6 +136,10 @@ class Trainer:
136
  config.prompts = [training_prompt, validation_prompt]
137
  config.blend_word = [blend_word_1, blend_word_2]
138
  config.eq_params = {"words":eq_params_1, "values":int(eq_params_2)}
 
 
 
 
139
 
140
  config_path = output_dir / 'config.yaml'
141
  with open(config_path, 'w') as f:
 
136
  config.prompts = [training_prompt, validation_prompt]
137
  config.blend_word = [blend_word_1, blend_word_2]
138
  config.eq_params = {"words":eq_params_1, "values":int(eq_params_2)}
139
+ if len(validation_prompt) == len(training_prompt):
140
+ config.is_word_swap = True
141
+ else:
142
+ config.is_word_swap = False
143
 
144
  config_path = output_dir / 'config.yaml'
145
  with open(config_path, 'w') as f: