Update app.py
Browse filesStill trouble shooting
app.py
CHANGED
@@ -27,12 +27,12 @@ def infer(prompt, image):
|
|
27 |
im = image
|
28 |
image = Image.fromarray(im)
|
29 |
|
30 |
-
|
31 |
#negative_prompt_ids = pipe.prepare_text_inputs([negative_prompts] * num_samples)
|
32 |
processed_image = pipe.prepare_image_inputs([image] * num_samples)
|
33 |
|
34 |
p_params = replicate(params)
|
35 |
-
|
36 |
#negative_prompt_ids = shard(negative_prompt_ids)
|
37 |
processed_image = shard(processed_image)
|
38 |
|
@@ -54,12 +54,15 @@ def infer(prompt, image):
|
|
54 |
title = "Animal Pose Control Net"
|
55 |
description = "This is a demo of Animal Pose ControlNet, which is a model trained on runwayml/stable-diffusion-v1-5 with new type of conditioning."
|
56 |
|
57 |
-
with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"])) as demo:
|
58 |
-
gr.Markdown(
|
59 |
-
|
60 |
# Animal Pose Control Net
|
61 |
# This is a demo of Animal Pose Control Net, which is a model trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.
|
62 |
-
""")
|
|
|
|
|
|
|
63 |
|
64 |
gr.Examples(
|
65 |
examples=[
|
@@ -76,8 +79,6 @@ gr.Examples(
|
|
76 |
cache_examples=True,
|
77 |
)
|
78 |
|
79 |
-
gr.Interface(fn = infer, inputs = ["text", "text", "image"], outputs = "image",
|
80 |
-
title = title, description = description, examples = gr.examples, theme='gradio/soft').launch()
|
81 |
|
82 |
gr.Markdown(
|
83 |
"""
|
|
|
27 |
im = image
|
28 |
image = Image.fromarray(im)
|
29 |
|
30 |
+
prompt_ids = pipe.prepare_text_inputs([prompts] * num_samples)
|
31 |
#negative_prompt_ids = pipe.prepare_text_inputs([negative_prompts] * num_samples)
|
32 |
processed_image = pipe.prepare_image_inputs([image] * num_samples)
|
33 |
|
34 |
p_params = replicate(params)
|
35 |
+
prompt_ids = shard(prompt_ids)
|
36 |
#negative_prompt_ids = shard(negative_prompt_ids)
|
37 |
processed_image = shard(processed_image)
|
38 |
|
|
|
54 |
title = "Animal Pose Control Net"
|
55 |
description = "This is a demo of Animal Pose ControlNet, which is a model trained on runwayml/stable-diffusion-v1-5 with new type of conditioning."
|
56 |
|
57 |
+
#with gr.Blocks(theme=gr.themes.Default(font=[gr.themes.GoogleFont("Inconsolata"), "Arial", "sans-serif"])) as demo:
|
58 |
+
#gr.Markdown(
|
59 |
+
# """
|
60 |
# Animal Pose Control Net
|
61 |
# This is a demo of Animal Pose Control Net, which is a model trained on runwayml/stable-diffusion-v1-5 with new type of conditioning.
|
62 |
+
#""")
|
63 |
+
|
64 |
+
gr.Interface(fn = infer, inputs = ["text", "text", "image"], outputs = "image",
|
65 |
+
title = title, description = description, examples = gr.examples, theme='gradio/soft').launch()
|
66 |
|
67 |
gr.Examples(
|
68 |
examples=[
|
|
|
79 |
cache_examples=True,
|
80 |
)
|
81 |
|
|
|
|
|
82 |
|
83 |
gr.Markdown(
|
84 |
"""
|