Axel-Student commited on
Commit
d35479f
·
1 Parent(s): 30b7d9a

added token

Browse files
Files changed (2) hide show
  1. Dockerfile +2 -0
  2. app.py +2 -1
Dockerfile CHANGED
@@ -7,6 +7,8 @@ RUN pip install -U diffusers
7
  RUN pip install git+https://github.com/huggingface/diffusers.git
8
  RUN pip install transformers
9
  RUN pip install accelerate
 
 
10
  COPY . /app
11
 
12
  EXPOSE 7860
 
7
  RUN pip install git+https://github.com/huggingface/diffusers.git
8
  RUN pip install transformers
9
  RUN pip install accelerate
10
+ RUN pip install huggingface_hub
11
+
12
  COPY . /app
13
 
14
  EXPOSE 7860
app.py CHANGED
@@ -1,7 +1,8 @@
1
  import torch
2
  from diffusers import FluxPipeline # type: ignore
3
  import gradio as gr # type: ignore
4
-
 
5
 
6
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
7
  pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
 
1
  import torch
2
  from diffusers import FluxPipeline # type: ignore
3
  import gradio as gr # type: ignore
4
+ from huggingface_hub import login
5
+ login(token="HF_TOKEN")
6
 
7
  pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
8
  pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power