linoyts HF staff commited on
Commit
f5068f7
1 Parent(s): a7f8c35

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -52,8 +52,8 @@ def nms(x, t, s):
52
  return z
53
 
54
 
55
- DESCRIPTION = '''# Scribble SDXL 🖋️🌄
56
- sketch to image with SDXL, using [@xinsir](https://huggingface.co/xinsir) [scribble sdxl controlnet](https://huggingface.co/xinsir/controlnet-scribble-sdxl-1.0)
57
  '''
58
 
59
  if not torch.cuda.is_available():
@@ -124,9 +124,6 @@ def apply_style(style_name: str, positive: str, negative: str = "") -> tuple[str
124
 
125
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
126
 
127
- eulera_scheduler = EulerAncestralDiscreteScheduler.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", subfolder="scheduler")
128
-
129
-
130
  controlnet = ControlNetModel.from_pretrained(
131
  "xinsir/controlnet-scribble-sdxl-1.0",
132
  torch_dtype=torch.float16
@@ -136,12 +133,13 @@ controlnet = ControlNetModel.from_pretrained(
136
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
137
 
138
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
139
- "stabilityai/stable-diffusion-xl-base-1.0",
140
  controlnet=controlnet,
141
  vae=vae,
142
  torch_dtype=torch.float16,
143
- scheduler=eulera_scheduler,
144
  )
 
145
  pipe.to(device)
146
  # Load model.
147
 
 
52
  return z
53
 
54
 
55
+ DESCRIPTION = '''# Flash Scribble SDXL 🖋️🌄
56
+ super fast sketch to image with Flash SDXL, using [@xinsir](https://huggingface.co/xinsir) [scribble sdxl controlnet](https://huggingface.co/xinsir/controlnet-scribble-sdxl-1.0) and [sdxl flash](https://huggingface.co/sd-community/sdxl-flash)
57
  '''
58
 
59
  if not torch.cuda.is_available():
 
124
 
125
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
126
 
 
 
 
127
  controlnet = ControlNetModel.from_pretrained(
128
  "xinsir/controlnet-scribble-sdxl-1.0",
129
  torch_dtype=torch.float16
 
133
  vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
134
 
135
  pipe = StableDiffusionXLControlNetPipeline.from_pretrained(
136
+ "sd-community/sdxl-flash",
137
  controlnet=controlnet,
138
  vae=vae,
139
  torch_dtype=torch.float16,
140
+ # scheduler=eulera_scheduler,
141
  )
142
+ pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
143
  pipe.to(device)
144
  # Load model.
145