Spaces:
vilarin
/
Running on Zero

vilarin commited on
Commit
3599676
1 Parent(s): 6db2d1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
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 hf_hub_download
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
- model_path = hf_hub_download(
22
- repo_id="stabilityai/stable-diffusion-3-medium",
23
- filename="*.safetensors"
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;