Menyu commited on
Commit
5b4cbb9
·
verified ·
1 Parent(s): c22c431

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -5,6 +5,7 @@ import spaces
5
  import torch
6
  from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
7
  from compel import Compel, ReturnedEmbeddingsType
 
8
 
9
  import re
10
 
@@ -224,9 +225,15 @@ if not torch.cuda.is_available():
224
  MAX_SEED = np.iinfo(np.int32).max
225
  MAX_IMAGE_SIZE = 4096
226
 
 
 
 
 
 
 
227
  if torch.cuda.is_available():
228
  pipe = StableDiffusionXLPipeline.from_pretrained(
229
- "Menyu/noobaiXLNAIXL_vPred10Version",
230
  torch_dtype=torch.float16
231
  )
232
  scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}
 
5
  import torch
6
  from diffusers import StableDiffusionXLPipeline, EulerDiscreteScheduler
7
  from compel import Compel, ReturnedEmbeddingsType
8
+ from huggingface_hub import hf_hub_download
9
 
10
  import re
11
 
 
225
  MAX_SEED = np.iinfo(np.int32).max
226
  MAX_IMAGE_SIZE = 4096
227
 
228
+ local_ckpt_path = hf_hub_download(
229
+ repo_id="Menyu/ModelFile",
230
+ filename="noobaiXLNAIXL_vPred10Version.safetensors",
231
+ revision="main"
232
+ )
233
+
234
  if torch.cuda.is_available():
235
  pipe = StableDiffusionXLPipeline.from_pretrained(
236
+ local_ckpt_path,
237
  torch_dtype=torch.float16
238
  )
239
  scheduler_args = {"prediction_type": "v_prediction", "rescale_betas_zero_snr": True}