Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwenran committed Sep 11, 2023
1 parent c4fe495 commit afcb9da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmagic/apis/inferencers/base_mmagic_inferencer.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __call__(self, **kwargs) -> Union[Dict, List[Dict]]:
Returns:
Union[Dict, List[Dict]]: Results of inference pipeline.
"""
if ('extra_parameters' in kwargs.keys()
if ('extra_parameters' in kwargs.keys() and kwargs['extra_parameters']
and 'infer_with_grad' in kwargs['extra_parameters'].keys()
and kwargs['extra_parameters']['infer_with_grad']):
results = self.base_call(**kwargs)
Expand Down

0 comments on commit afcb9da

Please sign in to comment.