Spaces:
Menyu
/
Running on Zero

Menyu commited on
Commit
20c6b82
·
verified ·
1 Parent(s): 38300bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -246,7 +246,7 @@ MAX_SEED = np.iinfo(np.int32).max
246
  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/ModelFile", # 模型仓库名称(非完整URL)
@@ -255,7 +255,7 @@ if torch.cuda.is_available():
255
  )
256
  pipe = StableDiffusionXLPipeline.from_single_file(
257
  model_path,
258
- #vae=vae, 内置VAE
259
  use_safetensors=True,
260
  torch_dtype=torch.bfloat16,
261
  )
@@ -348,7 +348,7 @@ h1{text-align:center}
348
 
349
  with gr.Blocks(css=css) as demo:
350
  gr.Markdown("""# 梦羽的模型生成器
351
- ### 快速生成MiaoMiao Harem 1.6模型的图片""")
352
  with gr.Group():
353
  with gr.Row():
354
  prompt = gr.Text(
 
246
  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/ModelFile", # 模型仓库名称(非完整URL)
 
255
  )
256
  pipe = StableDiffusionXLPipeline.from_single_file(
257
  model_path,
258
+ vae=vae,
259
  use_safetensors=True,
260
  torch_dtype=torch.bfloat16,
261
  )
 
348
 
349
  with gr.Blocks(css=css) as demo:
350
  gr.Markdown("""# 梦羽的模型生成器
351
+ ### 快速生成NaixlMmmmix v50模型的图片""")
352
  with gr.Group():
353
  with gr.Row():
354
  prompt = gr.Text(