Spaces:
Runtime error
Runtime error
add hf token
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from share_btn import community_icon_html, loading_icon_html, share_js
|
|
3 |
import torch
|
4 |
from diffusers.utils import export_to_video
|
5 |
|
|
|
6 |
from PIL import Image
|
7 |
|
8 |
import torch.nn.functional as F
|
@@ -16,6 +17,8 @@ from showone.pipelines.pipeline_t2v_base_pixel import tensor2vid
|
|
16 |
from showone.pipelines.pipeline_t2v_sr_pixel_cond import TextToVideoIFSuperResolutionPipeline_Cond
|
17 |
|
18 |
|
|
|
|
|
19 |
# Base Model
|
20 |
pretrained_model_path = "showlab/show-1-base"
|
21 |
pipe_base = TextToVideoIFPipeline.from_pretrained(
|
@@ -41,7 +44,8 @@ pipe_sr_1_image = IFSuperResolutionPipeline.from_pretrained(
|
|
41 |
pretrained_model_path,
|
42 |
text_encoder=None,
|
43 |
torch_dtype=torch.float16,
|
44 |
-
variant="fp16"
|
|
|
45 |
)
|
46 |
pipe_sr_1_image.enable_model_cpu_offload()
|
47 |
|
|
|
3 |
import torch
|
4 |
from diffusers.utils import export_to_video
|
5 |
|
6 |
+
import os
|
7 |
from PIL import Image
|
8 |
|
9 |
import torch.nn.functional as F
|
|
|
17 |
from showone.pipelines.pipeline_t2v_sr_pixel_cond import TextToVideoIFSuperResolutionPipeline_Cond
|
18 |
|
19 |
|
20 |
+
HF_TOKEN = os.getenv('HF_TOKEN')
|
21 |
+
|
22 |
# Base Model
|
23 |
pretrained_model_path = "showlab/show-1-base"
|
24 |
pipe_base = TextToVideoIFPipeline.from_pretrained(
|
|
|
44 |
pretrained_model_path,
|
45 |
text_encoder=None,
|
46 |
torch_dtype=torch.float16,
|
47 |
+
variant="fp16",
|
48 |
+
token=HF_TOKEN
|
49 |
)
|
50 |
pipe_sr_1_image.enable_model_cpu_offload()
|
51 |
|