GuyYariv genevera commited on
Commit
3bf9cd7
·
1 Parent(s): b561bb5

send model to device (#1)

Browse files

- send model to device (71ef4afec6cf2b160917170b88f915b074d7c03f)


Co-authored-by: JC <[email protected]>

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -136,7 +136,7 @@ if __name__ == "__main__":
136
  lora = False
137
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
138
  model = AudioTokenWrapper(lora, device)
139
-
140
  description = """<p>
141
  This is a demo of <a href='https://pages.cs.huji.ac.il/adiyoss-lab/AudioToken' target='_blank'>AudioToken: Adaptation of Text-Conditioned Diffusion Models for Audio-to-Image Generation</a>.<br><br>
142
  A novel method utilizing latent diffusion models trained for text-to-image-generation to generate images conditioned on audio recordings. Using a pre-trained audio encoding model, the proposed method encodes audio into a new token, which can be considered as an adaptation layer between the audio and text representations.<br><br>
 
136
  lora = False
137
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
138
  model = AudioTokenWrapper(lora, device)
139
+ model = model.to(device)
140
  description = """<p>
141
  This is a demo of <a href='https://pages.cs.huji.ac.il/adiyoss-lab/AudioToken' target='_blank'>AudioToken: Adaptation of Text-Conditioned Diffusion Models for Audio-to-Image Generation</a>.<br><br>
142
  A novel method utilizing latent diffusion models trained for text-to-image-generation to generate images conditioned on audio recordings. Using a pre-trained audio encoding model, the proposed method encodes audio into a new token, which can be considered as an adaptation layer between the audio and text representations.<br><br>