Yaron Koresh commited on
Commit
b0abeb4
·
verified ·
1 Parent(s): e93bf67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 = AutoencoderKL.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()
 
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()