Update app.py
Browse files
app.py
CHANGED
@@ -18,8 +18,6 @@ MAX_IMAGE_SIZE = int(os.getenv("MAX_IMAGE_SIZE", "4096"))
|
|
18 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|
19 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
20 |
|
21 |
-
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
22 |
-
|
23 |
if torch.cuda.is_available():
|
24 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
25 |
"John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl",
|
@@ -179,4 +177,4 @@ with gr.Blocks(css=css) as demo:
|
|
179 |
)
|
180 |
|
181 |
if __name__ == "__main__":
|
182 |
-
demo.
|
|
|
18 |
USE_TORCH_COMPILE = os.getenv("USE_TORCH_COMPILE", "0") == "1"
|
19 |
ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD", "0") == "1"
|
20 |
|
|
|
|
|
21 |
if torch.cuda.is_available():
|
22 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
23 |
"John6666/noobai-xl-nai-xl-epsilonpred075version-sdxl",
|
|
|
177 |
)
|
178 |
|
179 |
if __name__ == "__main__":
|
180 |
+
demo.launch()
|