Skip to content

Commit

Permalink
fix: prompt unaligned loading
Browse files Browse the repository at this point in the history
  • Loading branch information
beniz committed Jun 20, 2024
1 parent 2538c00 commit e25d4b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions data/unaligned_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,12 @@ def get_img(
A = self.transform_A(A_img)
B = self.transform_B(B_img)

real_B_prompt = self.B_img_prompt[B_img_path]
if len(real_B_prompt) == 1 and isinstance(real_B_prompt[0], str):
real_B_prompt = real_B_prompt[0]
if self.B_img_prompt is not None:
real_B_prompt = self.B_img_prompt[B_img_path]
if len(real_B_prompt) == 1 and isinstance(real_B_prompt[0], str):
real_B_prompt = real_B_prompt[0]
else:
real_B_prompt = None

return {
"A": A,
Expand Down

0 comments on commit e25d4b1

Please sign in to comment.