lym0302 commited on
Commit
0321bb5
·
1 Parent(s): c7895e7
app.py CHANGED
@@ -41,7 +41,7 @@ os.makedirs("pretrained/v2a/mmaudio", exist_ok=True)
41
  setup_eval_logging()
42
  pipeline = Pipeline(
43
  step0_model_dir=repo_local_path,
44
- step1_mode='mmaudio_medium_44k',
45
  step2_model_dir=repo_local_path,
46
  step2_mode='cot',
47
  step3_mode='bs_roformer',
 
41
  setup_eval_logging()
42
  pipeline = Pipeline(
43
  step0_model_dir=repo_local_path,
44
+ step1_mode='mmaudio_small_44k',
45
  step2_model_dir=repo_local_path,
46
  step2_mode='cot',
47
  step3_mode='bs_roformer',
third_party/VideoLLaMA2/videollama2/model/__init__.py CHANGED
@@ -76,7 +76,8 @@ def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, l
76
  bnb_4bit_quant_type='nf4'
77
  )
78
  else:
79
- kwargs['torch_dtype'] = torch.float16
 
80
 
81
  if use_flash_attn:
82
  kwargs['attn_implementation'] = 'flash_attention_2'
@@ -181,7 +182,7 @@ def load_pretrained_model(model_path, model_base, model_name, load_8bit=False, l
181
  elif model_type in ['videollama2_mixtral']:
182
  model = Videollama2MixtralForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, config=config, **kwargs)
183
  elif model_type in ['videollama2_qwen2']:
184
- model = Videollama2Qwen2ForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, torch_dtype=torch.bfloat16, config=config, **kwargs)
185
  elif model_type in ['videollama2_gemma2']:
186
  model = Videollama2Gemma2ForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, config=config, **kwargs)
187
  elif model_type in ['videollama2_phi3']:
 
76
  bnb_4bit_quant_type='nf4'
77
  )
78
  else:
79
+ # kwargs['torch_dtype'] = torch.float16
80
+ kwargs['torch_dtype'] = torch.bfloat16
81
 
82
  if use_flash_attn:
83
  kwargs['attn_implementation'] = 'flash_attention_2'
 
182
  elif model_type in ['videollama2_mixtral']:
183
  model = Videollama2MixtralForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, config=config, **kwargs)
184
  elif model_type in ['videollama2_qwen2']:
185
+ model = Videollama2Qwen2ForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, config=config, **kwargs)
186
  elif model_type in ['videollama2_gemma2']:
187
  model = Videollama2Gemma2ForCausalLM.from_pretrained(model_path, low_cpu_mem_usage=True, config=config, **kwargs)
188
  elif model_type in ['videollama2_phi3']: