Spaces:
Running
Running
chore(be-core): login hf
Browse files
app.py
CHANGED
@@ -2,10 +2,14 @@ import sentencepiece
|
|
2 |
import torch
|
3 |
import spaces
|
4 |
import gradio as gr
|
|
|
5 |
from diffusers.pipelines.flux.pipeline_flux_controlnet_inpaint import FluxControlNetInpaintPipeline
|
6 |
from diffusers.models.controlnet_flux import FluxControlNetModel
|
7 |
from controlnet_aux import CannyDetector
|
8 |
|
|
|
|
|
|
|
9 |
dtype = torch.bfloat16
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
|
|
|
2 |
import torch
|
3 |
import spaces
|
4 |
import gradio as gr
|
5 |
+
import os
|
6 |
from diffusers.pipelines.flux.pipeline_flux_controlnet_inpaint import FluxControlNetInpaintPipeline
|
7 |
from diffusers.models.controlnet_flux import FluxControlNetModel
|
8 |
from controlnet_aux import CannyDetector
|
9 |
|
10 |
+
# login hf token
|
11 |
+
HF_TOKEN = os.getenv("HF_TOKEN")
|
12 |
+
|
13 |
dtype = torch.bfloat16
|
14 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
15 |
|