Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,14 +1,11 @@
|
|
1 |
import spaces
|
2 |
import os
|
3 |
|
4 |
-
os.environ['HF_HOME'] = os.path.abspath(os.path.realpath(os.path.join(os.path.dirname(__file__), './hf_download')))
|
5 |
-
|
6 |
import gradio as gr
|
7 |
import torch
|
8 |
import traceback
|
9 |
import einops
|
10 |
import numpy as np
|
11 |
-
import argparse
|
12 |
|
13 |
from PIL import Image
|
14 |
from diffusers import AutoencoderKLHunyuanVideo
|
@@ -25,18 +22,6 @@ from diffusers_helper.clip_vision import hf_clip_vision_encode
|
|
25 |
from diffusers_helper.bucket_tools import find_nearest_bucket
|
26 |
|
27 |
|
28 |
-
parser = argparse.ArgumentParser()
|
29 |
-
parser.add_argument('--share', action='store_true')
|
30 |
-
parser.add_argument("--server", type=str, default='0.0.0.0')
|
31 |
-
parser.add_argument("--port", type=int, required=False)
|
32 |
-
parser.add_argument("--inbrowser", action='store_true')
|
33 |
-
args = parser.parse_args()
|
34 |
-
|
35 |
-
# for win desktop probably use --server 127.0.0.1 --inbrowser
|
36 |
-
# For linux server probably use --server 127.0.0.1 or do not use any cmd flags
|
37 |
-
|
38 |
-
print(args)
|
39 |
-
|
40 |
free_mem_gb = get_cuda_free_memory_gb(gpu)
|
41 |
high_vram = free_mem_gb > 60
|
42 |
|
@@ -393,9 +378,4 @@ with block:
|
|
393 |
end_button.click(fn=end_process)
|
394 |
|
395 |
|
396 |
-
block.launch(
|
397 |
-
server_name=args.server,
|
398 |
-
server_port=args.port,
|
399 |
-
share=args.share,
|
400 |
-
inbrowser=args.inbrowser,
|
401 |
-
)
|
|
|
1 |
import spaces
|
2 |
import os
|
3 |
|
|
|
|
|
4 |
import gradio as gr
|
5 |
import torch
|
6 |
import traceback
|
7 |
import einops
|
8 |
import numpy as np
|
|
|
9 |
|
10 |
from PIL import Image
|
11 |
from diffusers import AutoencoderKLHunyuanVideo
|
|
|
22 |
from diffusers_helper.bucket_tools import find_nearest_bucket
|
23 |
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
free_mem_gb = get_cuda_free_memory_gb(gpu)
|
26 |
high_vram = free_mem_gb > 60
|
27 |
|
|
|
378 |
end_button.click(fn=end_process)
|
379 |
|
380 |
|
381 |
+
block.queue().launch(share=True)
|
|
|
|
|
|
|
|
|
|