Skip to content

Commit

Permalink
[Fix] Fix bug caused by merging draggan (#2029)
Browse files Browse the repository at this point in the history
fix
  • Loading branch information
liuwenran authored Sep 11, 2023
1 parent 6fda2cc commit d140802
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 d140802

Please sign in to comment.