Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import os
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from diffusers import StableDiffusion3Pipeline, AutoencoderKL, KDPM2AncestralDiscreteScheduler
|
5 |
-
from huggingface_hub import
|
6 |
import spaces
|
7 |
from PIL import Image
|
8 |
import requests
|
@@ -16,16 +16,17 @@ model = "stabilityai/stable-diffusion-3-medium"
|
|
16 |
vae_model = "madebyollin/sdxl-vae-fp16-fix"
|
17 |
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
local_dir="model",
|
25 |
token=HF_TOKEN,
|
26 |
)
|
27 |
|
28 |
|
|
|
29 |
CSS = """
|
30 |
.gradio-container {
|
31 |
max-width: 690px !important;
|
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from diffusers import StableDiffusion3Pipeline, AutoencoderKL, KDPM2AncestralDiscreteScheduler
|
5 |
+
from huggingface_hub import snapshot_download
|
6 |
import spaces
|
7 |
from PIL import Image
|
8 |
import requests
|
|
|
16 |
vae_model = "madebyollin/sdxl-vae-fp16-fix"
|
17 |
|
18 |
|
19 |
+
model_path = snapshot_download(
|
20 |
+
repo_id=model,
|
21 |
+
revision="refs/pr/26",
|
22 |
+
repo_type="model",
|
23 |
+
ignore_patterns=["*.md", "*..gitattributes"],
|
24 |
local_dir="model",
|
25 |
token=HF_TOKEN,
|
26 |
)
|
27 |
|
28 |
|
29 |
+
|
30 |
CSS = """
|
31 |
.gradio-container {
|
32 |
max-width: 690px !important;
|