Comments (5)
Yeah, we didn't support this feature, because it is a little messy. The style embedding is given by y_cond
here. To interpolate them, you could add these lines and pass appropriate values of another_y
and alpha
when get_cond
is called:
+def get_cond(self, z_conds, y, another_y=None, alpha=0.5):
...
y_cond, y_pos = self.y_emb(y) if self.y_cond else (None, None)
+ if self.y_cond and another_y is not None:
+ assert y.shape[0] == another_y.shape[0], "Label batch size is different."
+ n_labels = another_y.shape[1] - self.n_tokens
+ another_y = another_y[:, :n_labels]
+ another_y_cond, _ = self.y_emb(another_y)
+ y_cond = y_cond * alpha + another_y_cond * (1.0 - alpha)
x_cond = self.x_emb(z_conds) if self.x_cond else y_pos
return x_cond, y_cond, prime
To construct another_y
:
- Choose
other_metas
like this (it doesn't matter what lyrics you choose here, because they are not used). - other_metas -> other_labels
- other_labels -> another_y (
start
is used to approximately locate the lyric window, and can be set to a dummy value like 0 for the purpose of mixing styles)
from jukebox.
Thanks! Would spherical interpolation be a better choice?
from jukebox.
Yeah, it's possible. You're welcome to try other variations
from jukebox.
Hi - trying to implement this and got as far as
another_y_cond, _ = self.y_emb(another_y)
...when i got the following error... cant really diagnose what's happening here @heewooj ... any thoughts? thanks in advance!
/usr/local/lib/python3.7/dist-packages/jukebox/prior/conditioners.py in forward(self, pos_start, pos_end)
89 # Check if [pos_start,pos_end] in [pos_min, pos_max)
90 assert len(pos_start.shape) == 2, f"Expected shape with 2 dims, got {pos_start.shape}"
---> 91 assert (self.pos_min <= pos_start).all() and (pos_start < self.pos_max).all(), f"Range is [{self.pos_min},{self.pos_max}), got {pos_start}"
92 pos_start = pos_start.float()
93 if pos_end is not None:
AssertionError: Range is [1049580.0,26460000.0), got tensor([[1048576.],
[1048576.],
[1048576.]], device='cuda:0')
from jukebox.
ok think i have a solution... y_emb()
was calling the positional embedding from the forward()
function on the underlying LabelConditioner
class was being called... we dont need that for another_y
y_emb_time_signal = self.y_emb.include_time_signal
self.y_emb.include_time_signal = False
another_y_cond, _ = self.y_emb(another_y)
self.y_emb.include_time_signal = y_emb_time_signal
from jukebox.
Related Issues (20)
- Installation Error,Packages not found HOT 7
- Fine-tuning the prior
- Hudba
- Error
- Just ignore
- Error right at the start of Colab HOT 1
- Changing output permissions
- stuck repeating the last few lines over and over and over and over again
- #0penA1 - #Fu11A1
- Encountering Errors with OpenAI Jukebox in Google Colab HOT 3
- Enhancement feature
- "Installation Error: jukebox package not found on conda channels (Windows 64-bit, Python 3.9.18)" "Unable to Install Jukebox from Conda (conda 23.11.0, Python 3.9.18)" HOT 1
- Syntax error on Colab
- My trackq HOT 1
- Rt
- Te amo
- AROA HOT 1
- Size mismatch
- Ya par tal
- Does anyone use the jukebox on their mac M2?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jukebox.