Spaces:
Sleeping
Sleeping
BlockDetail
commited on
Commit
•
6fc5ba2
1
Parent(s):
e211558
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ device = torch.device('cuda')
|
|
11 |
|
12 |
controlnet = ControlNetModel.from_pretrained("BlockDetail/PartialSketchControlNet", torch_dtype=torch.float16).to(device)
|
13 |
pipe = CustomStableDiffusionControlNetPipeline.from_pretrained(
|
14 |
-
"
|
15 |
controlnet=controlnet, torch_dtype=torch.float16
|
16 |
).to(device)
|
17 |
pipe.safety_checker = None
|
@@ -102,7 +102,7 @@ with gr.Blocks() as demo:
|
|
102 |
else:
|
103 |
dilation_mask = None
|
104 |
|
105 |
-
images, new_images = sketch(curr_sketch_image, dilation_mask, prompt, seed, num_steps =
|
106 |
|
107 |
save_sketch = np.array(Image.fromarray(curr_sketch).convert("RGBA"))
|
108 |
save_sketch[:, :, 3][save_sketch[:, :, 0] > 128] = 0
|
|
|
11 |
|
12 |
controlnet = ControlNetModel.from_pretrained("BlockDetail/PartialSketchControlNet", torch_dtype=torch.float16).to(device)
|
13 |
pipe = CustomStableDiffusionControlNetPipeline.from_pretrained(
|
14 |
+
"Lykon/dreamshaper-7",
|
15 |
controlnet=controlnet, torch_dtype=torch.float16
|
16 |
).to(device)
|
17 |
pipe.safety_checker = None
|
|
|
102 |
else:
|
103 |
dilation_mask = None
|
104 |
|
105 |
+
images, new_images = sketch(curr_sketch_image, dilation_mask, prompt, seed, num_steps = 8, dilation = dilation)
|
106 |
|
107 |
save_sketch = np.array(Image.fromarray(curr_sketch).convert("RGBA"))
|
108 |
save_sketch[:, :, 3][save_sketch[:, :, 0] > 128] = 0
|