Commit
·
d373851
1
Parent(s):
60a96af
goofy oopsies
Browse files- jam_worker.py +8 -6
jam_worker.py
CHANGED
@@ -90,12 +90,7 @@ class JamWorker(threading.Thread):
|
|
90 |
self.mrt.temperature = float(self.params.temperature)
|
91 |
self.mrt.topk = int(self.params.topk)
|
92 |
|
93 |
-
|
94 |
-
self._style_vec = (None if self.params.style_vec is None
|
95 |
-
else np.array(self.params.style_vec, dtype=np.float32, copy=True))
|
96 |
-
self._chunk_secs = (
|
97 |
-
self.mrt.config.chunk_length_frames * self.mrt.config.frame_length_samples
|
98 |
-
) / float(self._model_sr) # ≈ 2.0 s by default
|
99 |
|
100 |
# codec/setup
|
101 |
self._codec_fps = float(self.mrt.codec.frame_rate)
|
@@ -107,6 +102,13 @@ class JamWorker(threading.Thread):
|
|
107 |
self._model_stream: Optional[np.ndarray] = None
|
108 |
self._model_sr = int(self.mrt.sample_rate)
|
109 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
# target-SR in-RAM spool (what we cut loops from)
|
111 |
if int(self.params.target_sr) != int(self._model_sr):
|
112 |
self._rs = StreamingResampler(self._model_sr, int(self.params.target_sr), channels=2)
|
|
|
90 |
self.mrt.temperature = float(self.params.temperature)
|
91 |
self.mrt.topk = int(self.params.topk)
|
92 |
|
93 |
+
|
|
|
|
|
|
|
|
|
|
|
94 |
|
95 |
# codec/setup
|
96 |
self._codec_fps = float(self.mrt.codec.frame_rate)
|
|
|
102 |
self._model_stream: Optional[np.ndarray] = None
|
103 |
self._model_sr = int(self.mrt.sample_rate)
|
104 |
|
105 |
+
# style vector (already normalized upstream)
|
106 |
+
self._style_vec = (None if self.params.style_vec is None
|
107 |
+
else np.array(self.params.style_vec, dtype=np.float32, copy=True))
|
108 |
+
self._chunk_secs = (
|
109 |
+
self.mrt.config.chunk_length_frames * self.mrt.config.frame_length_samples
|
110 |
+
) / float(self._model_sr) # ≈ 2.0 s by default
|
111 |
+
|
112 |
# target-SR in-RAM spool (what we cut loops from)
|
113 |
if int(self.params.target_sr) != int(self._model_sr):
|
114 |
self._rs = StreamingResampler(self._model_sr, int(self.params.target_sr), channels=2)
|