Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
liuwenran committed Aug 21, 2023
1 parent 66792c1 commit 29d800a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 4 additions & 3 deletions mmagic/models/editors/stable_diffusion/stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,12 +612,13 @@ def test_step(self, data: dict) -> SampleList:
data_samples = data['data_samples']
prompt = data_samples.prompt

output = self.infer(prompt, return_type='tensor', height=256, width=256)
output = self.infer(
prompt, return_type='tensor', height=256, width=256)
samples = output['samples']

samples = self.data_preprocessor.destruct(samples, data_samples)
# gt_img = self.data_preprocessor.destruct(data['inputs'], data_samples)
gt_img = ['temp']
gt_img = self.data_preprocessor.destruct(data['inputs'], data_samples)
# gt_img = ['temp']

out_data_sample = DataSample(
fake_img=samples, gt_img=gt_img, prompt=prompt)
Expand Down
4 changes: 1 addition & 3 deletions mmagic/structures/data_sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ def set_gt_label(
self.gt_label = label
return self

def set_gt_prompt(
self, value: Union[str, Sequence[str]]
) -> 'DataSample':
def set_gt_prompt(self, value: Union[str, Sequence[str]]) -> 'DataSample':
"""Set label of ``gt_label``."""
self.prompt = value
return self
Expand Down

0 comments on commit 29d800a

Please sign in to comment.