Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ from lxml.html import fromstring
|
|
| 24 |
from diffusers.utils import export_to_video, load_image
|
| 25 |
from huggingface_hub import hf_hub_download
|
| 26 |
from safetensors.torch import load_file, save_file
|
| 27 |
-
from diffusers import
|
| 28 |
from PIL import Image, ImageDraw, ImageFont
|
| 29 |
|
| 30 |
# logging
|
|
@@ -47,7 +47,7 @@ else:
|
|
| 47 |
device = "cpu"
|
| 48 |
dtype = torch.float32
|
| 49 |
|
| 50 |
-
base = "
|
| 51 |
|
| 52 |
# variable data
|
| 53 |
|
|
@@ -107,7 +107,7 @@ function custom(){
|
|
| 107 |
|
| 108 |
# torch pipes
|
| 109 |
|
| 110 |
-
image_pipe =
|
| 111 |
video_pipe = CogVideoXImageToVideoPipeline.from_pretrained(
|
| 112 |
"THUDM/CogVideoX-5b-I2V",
|
| 113 |
torch_dtype=dtype
|
|
|
|
| 24 |
from diffusers.utils import export_to_video, load_image
|
| 25 |
from huggingface_hub import hf_hub_download
|
| 26 |
from safetensors.torch import load_file, save_file
|
| 27 |
+
from diffusers import FluxPipeline, CogVideoXImageToVideoPipeline
|
| 28 |
from PIL import Image, ImageDraw, ImageFont
|
| 29 |
|
| 30 |
# logging
|
|
|
|
| 47 |
device = "cpu"
|
| 48 |
dtype = torch.float32
|
| 49 |
|
| 50 |
+
base = "black-forest-labs/FLUX.1-dev"
|
| 51 |
|
| 52 |
# variable data
|
| 53 |
|
|
|
|
| 107 |
|
| 108 |
# torch pipes
|
| 109 |
|
| 110 |
+
image_pipe = FluxPipeline.from_pretrained(base, torch_dtype=dtype, safety_checker=None).to(device)
|
| 111 |
video_pipe = CogVideoXImageToVideoPipeline.from_pretrained(
|
| 112 |
"THUDM/CogVideoX-5b-I2V",
|
| 113 |
torch_dtype=dtype
|