James Peter Perrfone Jefferies
commited on
Commit
·
f87dc42
1
Parent(s):
955633a
Do not use torch_dtype=torch.float16
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def generate(
|
|
15 |
generator = torch.manual_seed(seed)
|
16 |
|
17 |
if input_image is None:
|
18 |
-
pipeline = DiffusionPipeline.from_pretrained("Lykon/DreamShaper"
|
19 |
|
20 |
return pipeline(
|
21 |
prompt=prompt,
|
@@ -32,8 +32,8 @@ def generate(
|
|
32 |
image = np.concatenate([image, image, image], axis=2)
|
33 |
canny_image = Image.fromarray(image)
|
34 |
|
35 |
-
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny"
|
36 |
-
pipeline = StableDiffusionControlNetPipeline.from_pretrained("Lykon/DreamShaper", controlnet=controlnet
|
37 |
|
38 |
return pipeline(
|
39 |
prompt=prompt,
|
@@ -57,6 +57,7 @@ iface = gr.Interface(
|
|
57 |
gr.Slider(label="CFG Scale", minimum=1, maximum=30, value=9, step=0.5),
|
58 |
gr.Slider(
|
59 |
label="Seed",
|
|
|
60 |
minimum=0,
|
61 |
maximum=4294967294,
|
62 |
step=1,
|
|
|
15 |
generator = torch.manual_seed(seed)
|
16 |
|
17 |
if input_image is None:
|
18 |
+
pipeline = DiffusionPipeline.from_pretrained("Lykon/DreamShaper")
|
19 |
|
20 |
return pipeline(
|
21 |
prompt=prompt,
|
|
|
32 |
image = np.concatenate([image, image, image], axis=2)
|
33 |
canny_image = Image.fromarray(image)
|
34 |
|
35 |
+
controlnet = ControlNetModel.from_pretrained("lllyasviel/sd-controlnet-canny")
|
36 |
+
pipeline = StableDiffusionControlNetPipeline.from_pretrained("Lykon/DreamShaper", controlnet=controlnet)
|
37 |
|
38 |
return pipeline(
|
39 |
prompt=prompt,
|
|
|
57 |
gr.Slider(label="CFG Scale", minimum=1, maximum=30, value=9, step=0.5),
|
58 |
gr.Slider(
|
59 |
label="Seed",
|
60 |
+
info="Refresh the page to generate a new random seed.",
|
61 |
minimum=0,
|
62 |
maximum=4294967294,
|
63 |
step=1,
|