Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
-
|
2 |
-
|
3 |
import gradio as gr
|
4 |
import numpy as np
|
5 |
import random
|
@@ -9,6 +8,8 @@ from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler, Autoe
|
|
9 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
10 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
11 |
|
|
|
|
|
12 |
dtype = torch.bfloat16
|
13 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
14 |
|
|
|
1 |
+
import os
|
|
|
2 |
import gradio as gr
|
3 |
import numpy as np
|
4 |
import random
|
|
|
8 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
9 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
10 |
|
11 |
+
hf_token = os.getenv("HF_TOKEN")
|
12 |
+
|
13 |
dtype = torch.bfloat16
|
14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
|