Spaces:
Menyu
/
Running on Zero

Menyu commited on
Commit
b00fb13
1 Parent(s): b8060d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  import numpy as np
4
  import spaces
5
  import torch
6
- from diffusers import StableDiffusionXLPipeline, AutoencoderKL, EulerDiscreteScheduler
7
  from compel import Compel, ReturnedEmbeddingsType
8
 
9
  import re
@@ -226,11 +226,11 @@ MAX_IMAGE_SIZE = 4096
226
 
227
  if torch.cuda.is_available():
228
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
229
- pipe = StableDiffusionXLPipeline.from_single_file(
230
- "https://huggingface.co/Laxhar/noobai-XL-Vpred-0.6/blob/main/noobai-xl-vpred-v0.6.safetensors",
231
  vae=vae,
232
- use_safetensors=True,
233
  torch_dtype=torch.float16,
 
234
  add_watermarker=False
235
  )
236
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
@@ -356,9 +356,9 @@ with gr.Blocks(css=css) as demo:
356
  guidance_scale = gr.Slider(
357
  label="Guidance Scale",
358
  minimum=0.1,
359
- maximum=10,
360
  step=0.1,
361
- value=5.0,
362
  )
363
  num_inference_steps = gr.Slider(
364
  label="生成步数",
 
3
  import numpy as np
4
  import spaces
5
  import torch
6
+ from diffusers import AutoPipelineForText2Image, AutoencoderKL, EulerDiscreteScheduler
7
  from compel import Compel, ReturnedEmbeddingsType
8
 
9
  import re
 
226
 
227
  if torch.cuda.is_available():
228
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
229
+ pipe = AutoPipelineForText2Image.from_pretrained(
230
+ "Menyu/noobai-xl-vpred-v0_6",
231
  vae=vae,
 
232
  torch_dtype=torch.float16,
233
+ use_safetensors=True,
234
  add_watermarker=False
235
  )
236
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config)
 
356
  guidance_scale = gr.Slider(
357
  label="Guidance Scale",
358
  minimum=0.1,
359
+ maximum=8,
360
  step=0.1,
361
+ value=3.0,
362
  )
363
  num_inference_steps = gr.Slider(
364
  label="生成步数",