IDKiro commited on
Commit
703db99
1 Parent(s): efdf2e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,8 +9,8 @@ import torchvision.transforms.functional as F
9
  from diffusers import ControlNetModel, StableDiffusionControlNetPipeline
10
  import gradio as gr
11
 
12
- device = "cpu" # Linux & Windows
13
- weight_type = torch.float32 # torch.float16 works as well, but pictures seem to be a bit worse
14
 
15
  controlnet = ControlNetModel.from_pretrained(
16
  "IDKiro/sdxs-512-dreamshaper-sketch", torch_dtype=weight_type
@@ -88,7 +88,7 @@ def run(
88
  prompt_template,
89
  style_name,
90
  controlnet_conditioning_scale,
91
- device_type="CPU",
92
  param_dtype='torch.float16',
93
  ):
94
  if device_type == "CPU":
 
9
  from diffusers import ControlNetModel, StableDiffusionControlNetPipeline
10
  import gradio as gr
11
 
12
+ device = "cuda"
13
+ weight_type = torch.float16
14
 
15
  controlnet = ControlNetModel.from_pretrained(
16
  "IDKiro/sdxs-512-dreamshaper-sketch", torch_dtype=weight_type
 
88
  prompt_template,
89
  style_name,
90
  controlnet_conditioning_scale,
91
+ device_type="GPU",
92
  param_dtype='torch.float16',
93
  ):
94
  if device_type == "CPU":