neverix commited on
Commit
17ea825
1 Parent(s): fbf122b

Fix big bug

Browse files
Files changed (1) hide show
  1. pulsar_clip.py +6 -6
pulsar_clip.py CHANGED
@@ -12,11 +12,11 @@ CONFIG_SPEC = [
12
  ("text", "A cloud at dawn", str),
13
  ("iterations", 5000, (0, 7500)),
14
  ("seed", 12, int),
 
15
  ]),
16
  ("Rendering", [
17
  ("w", 224, [224, 252]),
18
  ("h", 224, [224, 252]),
19
- # ("show_every", 50, int),
20
  ("showoff", 5000, (0, 10000)),
21
  ("turns", 4, int),
22
  ("focal_length", 0.1, float),
@@ -217,11 +217,11 @@ class PulsarCLIP(object):
217
  self.scheduler.step()
218
  except AttributeError:
219
  pass
220
- #if i % self.args.show_every == 0:
221
- #cam_params = self.camera(i / self.args.iterations * np.pi * 2 * self.args.turns, use_random=False)
222
- #img_show, _ = self.render(cam_params)
223
- #img = Image.fromarray((img_show.cpu().detach().numpy() * 255).astype(np.uint8))
224
- #yield img
225
  except KeyboardInterrupt:
226
  pass
227
 
 
12
  ("text", "A cloud at dawn", str),
13
  ("iterations", 5000, (0, 7500)),
14
  ("seed", 12, int),
15
+ ("show_every", 10, int),
16
  ]),
17
  ("Rendering", [
18
  ("w", 224, [224, 252]),
19
  ("h", 224, [224, 252]),
 
20
  ("showoff", 5000, (0, 10000)),
21
  ("turns", 4, int),
22
  ("focal_length", 0.1, float),
 
217
  self.scheduler.step()
218
  except AttributeError:
219
  pass
220
+ if i % self.args.show_every == 0:
221
+ cam_params = self.camera(i / self.args.iterations * np.pi * 2 * self.args.turns, use_random=False)
222
+ img_show, _ = self.render(cam_params)
223
+ img = Image.fromarray((img_show.cpu().detach().numpy() * 255).astype(np.uint8))
224
+ yield img
225
  except KeyboardInterrupt:
226
  pass
227