Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import os
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import json
|
| 4 |
import logging
|
|
@@ -23,6 +24,7 @@ dtype = torch.bfloat16
|
|
| 23 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 24 |
base_model = "black-forest-labs/FLUX.1-dev"
|
| 25 |
|
|
|
|
| 26 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
| 27 |
good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype).to(device)
|
| 28 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype, vae=taef1).to(device)
|
|
|
|
| 1 |
import os
|
| 2 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
| 3 |
import gradio as gr
|
| 4 |
import json
|
| 5 |
import logging
|
|
|
|
| 24 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 25 |
base_model = "black-forest-labs/FLUX.1-dev"
|
| 26 |
|
| 27 |
+
|
| 28 |
taef1 = AutoencoderTiny.from_pretrained("madebyollin/taef1", torch_dtype=dtype).to(device)
|
| 29 |
good_vae = AutoencoderKL.from_pretrained(base_model, subfolder="vae", torch_dtype=dtype).to(device)
|
| 30 |
pipe = DiffusionPipeline.from_pretrained(base_model, torch_dtype=dtype, vae=taef1).to(device)
|