MrYXJ commited on
Commit
8e4ace7
1 Parent(s): 11e4fff

Update model_utils.py

Browse files
Files changed (1) hide show
  1. model_utils.py +10 -10
model_utils.py CHANGED
@@ -37,16 +37,16 @@ def calculate_flops_in_hugging_space(model_name: str,
37
  "Calculates the FLOPs and Params usage for a model init on `meta` device"
38
 
39
  try:
40
- print("model_name:", model_name)
41
- print("empty_model:", empty_model)
42
- print("access_token:", access_token)
43
- print("input_shape:", input_shape)
44
- flops, macs, params, return_print = calculate_flops_hf(model_name=model_name,
45
- empty_model=empty_model,
46
- access_token=access_token,
47
- input_shape=input_shape,
48
- return_results=True,
49
- output_as_string=False)
50
  except Exception as e:
51
  print("Error info:", e)
52
  raise gr.Error(
 
37
  "Calculates the FLOPs and Params usage for a model init on `meta` device"
38
 
39
  try:
40
+ # print("model_name:", model_name)
41
+ # print("empty_model:", empty_model)
42
+ # print("access_token:", access_token)
43
+ # print("input_shape:", input_shape)
44
+ flops, macs, params, return_print = calculate_flops_hf(model_name=model_name,
45
+ empty_model=empty_model,
46
+ input_shape=input_shape,
47
+ access_token=access_token,
48
+ output_as_string=False,
49
+ return_results=True)
50
  except Exception as e:
51
  print("Error info:", e)
52
  raise gr.Error(