Update app.py
Browse files
app.py
CHANGED
@@ -53,7 +53,7 @@ def infer(prompts, negative_prompts, image):
|
|
53 |
|
54 |
# load control net and stable diffusion v1-5
|
55 |
controlnet, controlnet_params = FlaxControlNetModel.from_pretrained(
|
56 |
-
"jax-diffusers-event/canny-coyo1m",
|
57 |
)
|
58 |
pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
|
59 |
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, from_pt=True, dtype=jnp.float32
|
@@ -87,4 +87,4 @@ def infer(prompts, negative_prompts, image):
|
|
87 |
output_images = image_grid(output_images, num_samples // 4, 4)
|
88 |
return output_images
|
89 |
|
90 |
-
gr.Interface(
|
|
|
53 |
|
54 |
# load control net and stable diffusion v1-5
|
55 |
controlnet, controlnet_params = FlaxControlNetModel.from_pretrained(
|
56 |
+
"jax-diffusers-event/canny-coyo1m", dtype=jnp.float32
|
57 |
)
|
58 |
pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
|
59 |
"runwayml/stable-diffusion-v1-5", controlnet=controlnet, from_pt=True, dtype=jnp.float32
|
|
|
87 |
output_images = image_grid(output_images, num_samples // 4, 4)
|
88 |
return output_images
|
89 |
|
90 |
+
gr.Interface(infer, inputs=["text", "text", "image"], outputs="gallery").launch()
|