Update app.py
Browse filesRemove unused code and improve prompts
app.py
CHANGED
@@ -6,12 +6,8 @@ from flax.jax_utils import replicate
|
|
6 |
from flax.training.common_utils import shard
|
7 |
from PIL import Image
|
8 |
from diffusers import FlaxStableDiffusionControlNetPipeline, FlaxControlNetModel
|
9 |
-
#import cv2
|
10 |
import gc
|
11 |
|
12 |
-
#with open("test.html") as f:
|
13 |
-
# lines = f.readlines()
|
14 |
-
|
15 |
def create_key(seed=0):
|
16 |
return jax.random.PRNGKey(seed)
|
17 |
|
@@ -82,8 +78,8 @@ with gr.Blocks(theme='kfahn/AnimalPose') as demo:
|
|
82 |
""")
|
83 |
with gr.Row():
|
84 |
with gr.Column():
|
85 |
-
prompts = gr.Textbox(label="Prompt", placeholder="
|
86 |
-
negative_prompts = gr.Textbox(label="Negative Prompt", value="lowres, bad anatomy, missing ears, missing paws")
|
87 |
conditioning_image = gr.Image(label="Conditioning Image")
|
88 |
run_btn = gr.Button("Run")
|
89 |
with gr.Column():
|
|
|
6 |
from flax.training.common_utils import shard
|
7 |
from PIL import Image
|
8 |
from diffusers import FlaxStableDiffusionControlNetPipeline, FlaxControlNetModel
|
|
|
9 |
import gc
|
10 |
|
|
|
|
|
|
|
11 |
def create_key(seed=0):
|
12 |
return jax.random.PRNGKey(seed)
|
13 |
|
|
|
78 |
""")
|
79 |
with gr.Row():
|
80 |
with gr.Column():
|
81 |
+
prompts = gr.Textbox(label="Prompt", placeholder="yellow dog sitting on a lawn, best quality, highres")
|
82 |
+
negative_prompts = gr.Textbox(label="Negative Prompt", value="lowres, bad muzzle, bad anatomy, missing ears, missing paws")
|
83 |
conditioning_image = gr.Image(label="Conditioning Image")
|
84 |
run_btn = gr.Button("Run")
|
85 |
with gr.Column():
|