Upload 2 files
Browse filesThis would work.
- app.py +5 -4
- requirements.txt +4 -2
app.py
CHANGED
@@ -28,11 +28,12 @@ MARKDOWN = """
|
|
28 |
MAX_SEED = np.iinfo(np.int32).max
|
29 |
IMAGE_SIZE = 1024
|
30 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
-
HF_TOKEN =
|
32 |
|
33 |
-
|
34 |
|
35 |
-
bfl_repo="black-forest-labs/FLUX.1-dev"
|
|
|
36 |
|
37 |
class calculateDuration:
|
38 |
def __init__(self, activity_name=""):
|
@@ -333,4 +334,4 @@ with gr.Blocks() as demo:
|
|
333 |
]
|
334 |
)
|
335 |
|
336 |
-
demo.launch(debug=False, show_error=True
|
|
|
28 |
MAX_SEED = np.iinfo(np.int32).max
|
29 |
IMAGE_SIZE = 1024
|
30 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
31 |
+
HF_TOKEN = os.environ.get("HF_TOKEN")
|
32 |
|
33 |
+
if HF_TOKEN: login(token=HF_TOKEN)
|
34 |
|
35 |
+
#bfl_repo="black-forest-labs/FLUX.1-dev"
|
36 |
+
bfl_repo="camenduru/FLUX.1-dev-diffusers"
|
37 |
|
38 |
class calculateDuration:
|
39 |
def __init__(self, activity_name=""):
|
|
|
334 |
]
|
335 |
)
|
336 |
|
337 |
+
demo.launch(debug=False, show_error=True)
|
requirements.txt
CHANGED
@@ -3,8 +3,10 @@ spaces
|
|
3 |
accelerate
|
4 |
transformers==4.42.4
|
5 |
sentencepiece
|
6 |
-
git+https://github.com/Gothos/diffusers.git@flux-inpaint
|
|
|
7 |
huggingface_hub
|
8 |
peft
|
9 |
gradio_imageslider
|
10 |
-
requests
|
|
|
|
3 |
accelerate
|
4 |
transformers==4.42.4
|
5 |
sentencepiece
|
6 |
+
#git+https://github.com/Gothos/diffusers.git@flux-inpaint
|
7 |
+
diffusers
|
8 |
huggingface_hub
|
9 |
peft
|
10 |
gradio_imageslider
|
11 |
+
requests
|
12 |
+
numpy<2
|