bardofcodes commited on
Commit
50798c0
·
verified ·
1 Parent(s): 3828afa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +8 -5
README.md CHANGED
@@ -66,12 +66,14 @@ from io import BytesIO
66
  import matplotlib.pyplot as plt
67
  from PIL import Image, ImageOps
68
  from diffusers import DiffusionPipeline
69
-
 
 
70
  SEED = 1729
71
  DEVICE = th.device("cuda")
72
  DTYPE = th.float16
73
  FIG_K = 3
74
- EXAMPLE_ID = 0
75
 
76
  # Now we need to do the trick
77
  pretrained_path = "bardofcodes/pattern_analogies"
@@ -104,15 +106,15 @@ plt.rcParams['legend.fontsize'] = 'large'
104
  for i in range(6):
105
  if i == 0:
106
  plt.subplot(2, 3, i+1)
107
- val_image = img1
108
  label_str = "A"
109
  elif i == 1:
110
  plt.subplot(2, 3, i+1)
111
- val_image = alt_img1
112
  label_str = "A*"
113
  elif i == 2:
114
  plt.subplot(2, 3, i+1)
115
- val_image = img2
116
  label_str = "Target"
117
  else:
118
  plt.subplot(2, 3,i + 1)
@@ -125,6 +127,7 @@ for i in range(6):
125
  plt.legend(loc="lower right")
126
  plt.axis('off')
127
  plt.subplots_adjust(wspace=0.01, hspace=0.01)
 
128
  ```
129
 
130
  ### Full GitHub Repository
 
66
  import matplotlib.pyplot as plt
67
  from PIL import Image, ImageOps
68
  from diffusers import DiffusionPipeline
69
+ import sys
70
+ # CLONE: https://github.com/adobe-research/pattern-analogies
71
+ sys.path.insert(0, "PATH_TO_REPOSITORY")
72
  SEED = 1729
73
  DEVICE = th.device("cuda")
74
  DTYPE = th.float16
75
  FIG_K = 3
76
+ EXAMPLE_ID = 1
77
 
78
  # Now we need to do the trick
79
  pretrained_path = "bardofcodes/pattern_analogies"
 
106
  for i in range(6):
107
  if i == 0:
108
  plt.subplot(2, 3, i+1)
109
+ val_image = images[0]
110
  label_str = "A"
111
  elif i == 1:
112
  plt.subplot(2, 3, i+1)
113
+ val_image = images[1]
114
  label_str = "A*"
115
  elif i == 2:
116
  plt.subplot(2, 3, i+1)
117
+ val_image = images[2]
118
  label_str = "Target"
119
  else:
120
  plt.subplot(2, 3,i + 1)
 
127
  plt.legend(loc="lower right")
128
  plt.axis('off')
129
  plt.subplots_adjust(wspace=0.01, hspace=0.01)
130
+
131
  ```
132
 
133
  ### Full GitHub Repository