Menyu commited on
Commit
acefd22
·
verified ·
1 Parent(s): 565bf01

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -16
app.py CHANGED
@@ -247,23 +247,8 @@ MAX_IMAGE_SIZE = 2048
247
 
248
  if torch.cuda.is_available():
249
  # vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
250
- token = os.environ.get("HF_TOKEN") # 从环境变量读取令牌
251
- model_path = hf_hub_download(
252
- repo_id="Menyu/miaomiaoHarem_vPredDogma10", # 模型仓库名称(非完整URL)
253
- filename="miaomiaoHarem_vPredDogma10.safetensors",
254
- use_auth_token=token
255
- )
256
- pipe = StableDiffusionXLPipeline.from_single_file(
257
- model_path,
258
- #vae=vae, 内置VAE
259
- use_safetensors=True,
260
- torch_dtype=torch.float16,
261
- )
262
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
263
- pipe.scheduler.register_to_config(
264
- prediction_type="v_prediction",
265
- rescale_betas_zero_snr=True,
266
- )
267
  pipe.to("cuda")
268
 
269
  def randomize_seed_fn(seed: int, randomize_seed: bool) -> int:
 
247
 
248
  if torch.cuda.is_available():
249
  # vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
250
+ pipe = StableDiffusionXLPipeline.from_pretrained("John6666/wai-nsfw-illustrious-sdxl-v140-sdxl")
 
 
 
 
 
 
 
 
 
 
 
251
  pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
 
 
 
 
252
  pipe.to("cuda")
253
 
254
  def randomize_seed_fn(seed: int, randomize_seed: bool) -> int: