Spaces:
Sleeping
Sleeping
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ import gradio as gr
|
|
33 |
from lxml.html import fromstring
|
34 |
from huggingface_hub import hf_hub_download
|
35 |
from safetensors.torch import load_file, save_file
|
36 |
-
from diffusers import DiffusionPipeline, AutoencoderKL
|
37 |
from PIL import Image, ImageDraw, ImageFont
|
38 |
from transformers import pipeline, T5ForConditionalGeneration, T5Tokenizer
|
39 |
from refiners.fluxion.utils import manual_seed
|
@@ -502,7 +502,7 @@ function custom(){
|
|
502 |
|
503 |
# torch pipes
|
504 |
|
505 |
-
taef1 =
|
506 |
good_vae = AutoencoderKL.from_pretrained("ostris/Flex.1-alpha", subfolder="vae", torch_dtype=dtype).to(device)
|
507 |
image_pipe = DiffusionPipeline.from_pretrained("ostris/Flex.1-alpha", torch_dtype=dtype, vae=taef1).to(device)
|
508 |
image_pipe.enable_model_cpu_offload()
|
|
|
33 |
from lxml.html import fromstring
|
34 |
from huggingface_hub import hf_hub_download
|
35 |
from safetensors.torch import load_file, save_file
|
36 |
+
from diffusers import DiffusionPipeline, AutoencoderTiny, AutoencoderKL
|
37 |
from PIL import Image, ImageDraw, ImageFont
|
38 |
from transformers import pipeline, T5ForConditionalGeneration, T5Tokenizer
|
39 |
from refiners.fluxion.utils import manual_seed
|
|
|
502 |
|
503 |
# torch pipes
|
504 |
|
505 |
+
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
506 |
good_vae = AutoencoderKL.from_pretrained("ostris/Flex.1-alpha", subfolder="vae", torch_dtype=dtype).to(device)
|
507 |
image_pipe = DiffusionPipeline.from_pretrained("ostris/Flex.1-alpha", torch_dtype=dtype, vae=taef1).to(device)
|
508 |
image_pipe.enable_model_cpu_offload()
|