Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import spaces
|
2 |
|
3 |
-
import torch
|
4 |
-
torch.multiprocessing.set_start_method('spawn', force=True)
|
5 |
|
6 |
import re
|
7 |
import os
|
@@ -229,6 +229,9 @@ def parse_args() -> Config:
|
|
229 |
return Config(**vars(args))
|
230 |
|
231 |
if __name__ == "__main__":
|
232 |
-
|
|
|
|
|
|
|
233 |
demo = create_demo(config.name, config.device, config.offload, config.ckpt_dir)
|
234 |
demo.launch(share=config.share)
|
|
|
1 |
import spaces
|
2 |
|
3 |
+
# import torch
|
4 |
+
# torch.multiprocessing.set_start_method('spawn', force=True)
|
5 |
|
6 |
import re
|
7 |
import os
|
|
|
229 |
return Config(**vars(args))
|
230 |
|
231 |
if __name__ == "__main__":
|
232 |
+
import torch.multiprocessing as mp
|
233 |
+
mp.set_start_method('spawn', force=True) # Corrected start method for CUDA
|
234 |
+
|
235 |
+
config = Config()
|
236 |
demo = create_demo(config.name, config.device, config.offload, config.ckpt_dir)
|
237 |
demo.launch(share=config.share)
|