Spaces:
Paused
Paused
unknown
commited on
Commit
•
7050772
1
Parent(s):
cf0c1ad
cuda init
Browse files- app.py +4 -3
- foleycrafter/pipelines/auffusion_pipeline.py +1 -1
app.py
CHANGED
@@ -203,6 +203,8 @@ class FoleyController:
|
|
203 |
save_sample_path = os.path.join(self.savedir_sample, f"{name}.mp4")
|
204 |
|
205 |
return save_sample_path
|
|
|
|
|
206 |
|
207 |
def ui():
|
208 |
with gr.Blocks(css=css) as demo:
|
@@ -268,8 +270,7 @@ def ui():
|
|
268 |
|
269 |
return demo
|
270 |
|
271 |
-
if __name__ == "__main__":
|
272 |
-
controller = FoleyController()
|
273 |
demo = ui()
|
274 |
-
demo.queue(
|
275 |
demo.launch(server_name=args.server_name, server_port=args.port, share=args.share, allowed_paths=["./foleycrafter.png"])
|
|
|
203 |
save_sample_path = os.path.join(self.savedir_sample, f"{name}.mp4")
|
204 |
|
205 |
return save_sample_path
|
206 |
+
|
207 |
+
controller = FoleyController()
|
208 |
|
209 |
def ui():
|
210 |
with gr.Blocks(css=css) as demo:
|
|
|
270 |
|
271 |
return demo
|
272 |
|
273 |
+
if __name__ == "__main__":
|
|
|
274 |
demo = ui()
|
275 |
+
demo.queue(10)
|
276 |
demo.launch(server_name=args.server_name, server_port=args.port, share=args.share, allowed_paths=["./foleycrafter.png"])
|
foleycrafter/pipelines/auffusion_pipeline.py
CHANGED
@@ -317,7 +317,7 @@ class Generator(torch.nn.Module):
|
|
317 |
config = get_config(config_path)
|
318 |
vocoder = cls(config)
|
319 |
|
320 |
-
state_dict_g = torch.load(ckpt_path)
|
321 |
vocoder.load_state_dict(state_dict_g["generator"])
|
322 |
vocoder.eval()
|
323 |
vocoder.remove_weight_norm()
|
|
|
317 |
config = get_config(config_path)
|
318 |
vocoder = cls(config)
|
319 |
|
320 |
+
state_dict_g = torch.load(ckpt_path, map_location="cpu")
|
321 |
vocoder.load_state_dict(state_dict_g["generator"])
|
322 |
vocoder.eval()
|
323 |
vocoder.remove_weight_norm()
|