Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
55b1f9d
1
Parent(s):
77ed278
flux
Browse files
app.py
CHANGED
@@ -33,8 +33,6 @@ from src.utils.camera_util import (
|
|
33 |
from src.utils.mesh_util import save_obj, save_glb
|
34 |
from src.utils.infer_util import remove_background, resize_foreground, images_to_video
|
35 |
|
36 |
-
from transformer_flux import FluxTransformer2DModel
|
37 |
-
|
38 |
# Set up cache path
|
39 |
cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
40 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
@@ -84,7 +82,7 @@ base_model = "black-forest-labs/FLUX.1-dev"
|
|
84 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
85 |
good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype, token=huggingface_token).to(device)
|
86 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype, vae=taef1, token=huggingface_token).to(device)
|
87 |
-
|
88 |
base_model,
|
89 |
vae=good_vae,
|
90 |
transformer=pipe.transformer,
|
|
|
33 |
from src.utils.mesh_util import save_obj, save_glb
|
34 |
from src.utils.infer_util import remove_background, resize_foreground, images_to_video
|
35 |
|
|
|
|
|
36 |
# Set up cache path
|
37 |
cache_path = path.join(path.dirname(path.abspath(__file__)), "models")
|
38 |
os.environ["TRANSFORMERS_CACHE"] = cache_path
|
|
|
82 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
83 |
good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype, token=huggingface_token).to(device)
|
84 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype, vae=taef1, token=huggingface_token).to(device)
|
85 |
+
pipe = AutoPipelineForImage2Image.from_pretrained(
|
86 |
base_model,
|
87 |
vae=good_vae,
|
88 |
transformer=pipe.transformer,
|