Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,11 @@ def canny_filter(image):
|
|
38 |
controlnet, controlnet_params = FlaxControlNetModel.from_pretrained(
|
39 |
"jax-diffusers-event/canny-coyo1m", dtype=jnp.float32
|
40 |
)
|
|
|
41 |
pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
|
42 |
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, from_pt=True, dtype=jnp.float32
|
43 |
)
|
|
|
44 |
|
45 |
def infer(prompts, negative_prompts, image):
|
46 |
|
|
|
38 |
controlnet, controlnet_params = FlaxControlNetModel.from_pretrained(
|
39 |
"jax-diffusers-event/canny-coyo1m", dtype=jnp.float32
|
40 |
)
|
41 |
+
controlnet = controlnet.to("cuda")
|
42 |
pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
|
43 |
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, from_pt=True, dtype=jnp.float32
|
44 |
)
|
45 |
+
pipe = pipe.to("cuda")
|
46 |
|
47 |
def infer(prompts, negative_prompts, image):
|
48 |
|