Spaces:
Runtime error
Runtime error
Update app.py
#1
by
greerben0
- opened
app.py
CHANGED
@@ -13,8 +13,6 @@ from diffusers import StableDiffusionPipeline, StableDiffusionInpaintPipeline, S
|
|
13 |
from diffusers.utils import load_image
|
14 |
from huggingface_hub import hf_hub_download
|
15 |
|
16 |
-
HF_TOKEN = os.getenv("HF_TOKEN")
|
17 |
-
|
18 |
DESCRIPTION = """
|
19 |
# [Fluently Playground](https://huggingface.co/fluently)
|
20 |
|
@@ -33,7 +31,7 @@ device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
|
33 |
|
34 |
if torch.cuda.is_available():
|
35 |
pipe_xl_final = StableDiffusionXLPipeline.from_single_file(
|
36 |
-
hf_hub_download(repo_id="fluently/Fluently-XL-Final", filename="FluentlyXL-Final.safetensors"
|
37 |
torch_dtype=torch.float16,
|
38 |
use_safetensors=True,
|
39 |
)
|
@@ -56,11 +54,16 @@ if torch.cuda.is_available():
|
|
56 |
pipe_epic.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe_epic.scheduler.config)
|
57 |
pipe_epic.to(device)
|
58 |
|
59 |
-
pipe_xl_inpaint = StableDiffusionXLInpaintPipeline.
|
60 |
-
"
|
61 |
torch_dtype=torch.float16,
|
62 |
-
use_safetensors=True,
|
63 |
-
|
|
|
|
|
|
|
|
|
|
|
64 |
pipe_xl_inpaint.to(device)
|
65 |
|
66 |
pipe_inpaint = StableDiffusionInpaintPipeline.from_pretrained(
|
|
|
13 |
from diffusers.utils import load_image
|
14 |
from huggingface_hub import hf_hub_download
|
15 |
|
|
|
|
|
16 |
DESCRIPTION = """
|
17 |
# [Fluently Playground](https://huggingface.co/fluently)
|
18 |
|
|
|
31 |
|
32 |
if torch.cuda.is_available():
|
33 |
pipe_xl_final = StableDiffusionXLPipeline.from_single_file(
|
34 |
+
hf_hub_download(repo_id="fluently/Fluently-XL-Final", filename="FluentlyXL-Final.safetensors"),
|
35 |
torch_dtype=torch.float16,
|
36 |
use_safetensors=True,
|
37 |
)
|
|
|
54 |
pipe_epic.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe_epic.scheduler.config)
|
55 |
pipe_epic.to(device)
|
56 |
|
57 |
+
pipe_xl_inpaint = StableDiffusionXLInpaintPipeline.from_pretrained(
|
58 |
+
"fluently/Fluently-XL-v3-inpainting",
|
59 |
torch_dtype=torch.float16,
|
60 |
+
use_safetensors=True,)
|
61 |
+
|
62 |
+
# pipe_xl_inpaint = StableDiffusionXLInpaintPipeline.from_single_file(
|
63 |
+
# "https://huggingface.co/fluently/Fluently-XL-v3-inpainting/blob/main/FluentlyXL-v3-inpainting.safetensors",
|
64 |
+
# torch_dtype=torch.float16,
|
65 |
+
# use_safetensors=True,
|
66 |
+
# )
|
67 |
pipe_xl_inpaint.to(device)
|
68 |
|
69 |
pipe_inpaint = StableDiffusionInpaintPipeline.from_pretrained(
|