Spaces:
Runtime error
Runtime error
UdacityNoob
commited on
Commit
•
0d9cf1c
1
Parent(s):
21504bf
Update model url to keras-dreambooth org, update default prompt
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ resolution = 512
|
|
10 |
dreambooth_model = models.StableDiffusion(
|
11 |
img_width=resolution, img_height=resolution, jit_compile=True,
|
12 |
)
|
13 |
-
loaded_diffusion_model = from_pretrained_keras("
|
14 |
dreambooth_model._diffusion_model = loaded_diffusion_model
|
15 |
|
16 |
|
@@ -31,9 +31,9 @@ with gr.Blocks() as demo:
|
|
31 |
gr.HTML("<p style=\"font-size: 14; font-weight: normal\" align=\"left\">This model has been fine-tuned to learn the concept of Hogwarts Legacy student characters.<br>To use this demo, you should have append your prompt with string <q>hogwarts [legacy] student</q></p>")
|
32 |
with gr.Row():
|
33 |
with gr.Column():
|
34 |
-
prompt = gr.Textbox(label="Positive Prompt", value="a digital art of hogwarts [legacy] student
|
35 |
-
negative_prompt = gr.Textbox(label="Negative Prompt", value="
|
36 |
-
samples = gr.Slider(label="Number of Images", minimum=1, maximum=6, value=
|
37 |
inference_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=50, step=1)
|
38 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=10, value=7.5, step=0.1)
|
39 |
run = gr.Button(value="Run")
|
@@ -43,7 +43,7 @@ with gr.Blocks() as demo:
|
|
43 |
run.click(fn=generate_images, inputs=[prompt, negative_prompt, samples, inference_steps, guidance_scale], outputs=gallery)
|
44 |
|
45 |
gr.Examples([["realistic painting of a hogwarts [legacy] student riding a horse, high quality, 8k", "bad, ugly, deformed, out of frame, blurry, cropped, noisy", 4, 100, 7.5],
|
46 |
-
["realistic painting of a hogwarts [legacy] student holding a wand, high quality, 8k", "bad, ugly,
|
47 |
[prompt, negative_prompt, samples, inference_steps, guidance_scale], gallery, generate_images, cache_examples=True)
|
48 |
gr.Markdown('Demo created by [Terrence Goh](https://huggingface.co/tgohblio/)')
|
49 |
|
|
|
10 |
dreambooth_model = models.StableDiffusion(
|
11 |
img_width=resolution, img_height=resolution, jit_compile=True,
|
12 |
)
|
13 |
+
loaded_diffusion_model = from_pretrained_keras("keras-dreambooth/dreambooth_hogwarts_legacy")
|
14 |
dreambooth_model._diffusion_model = loaded_diffusion_model
|
15 |
|
16 |
|
|
|
31 |
gr.HTML("<p style=\"font-size: 14; font-weight: normal\" align=\"left\">This model has been fine-tuned to learn the concept of Hogwarts Legacy student characters.<br>To use this demo, you should have append your prompt with string <q>hogwarts [legacy] student</q></p>")
|
32 |
with gr.Row():
|
33 |
with gr.Column():
|
34 |
+
prompt = gr.Textbox(label="Positive Prompt", value="a digital art of hogwarts [legacy] student jumping up")
|
35 |
+
negative_prompt = gr.Textbox(label="Negative Prompt", value="out of frame, blurry, cropped, noisy")
|
36 |
+
samples = gr.Slider(label="Number of Images", minimum=1, maximum=6, value=4, step=1)
|
37 |
inference_steps = gr.Slider(label="Inference Steps", minimum=1, maximum=100, value=50, step=1)
|
38 |
guidance_scale = gr.Slider(label="Guidance Scale", minimum=1, maximum=10, value=7.5, step=0.1)
|
39 |
run = gr.Button(value="Run")
|
|
|
43 |
run.click(fn=generate_images, inputs=[prompt, negative_prompt, samples, inference_steps, guidance_scale], outputs=gallery)
|
44 |
|
45 |
gr.Examples([["realistic painting of a hogwarts [legacy] student riding a horse, high quality, 8k", "bad, ugly, deformed, out of frame, blurry, cropped, noisy", 4, 100, 7.5],
|
46 |
+
["realistic painting of a hogwarts [legacy] student holding a wand, high quality, 8k", "bad, ugly, deformed, out of frame, blurry, cropped, noisy", 4, 100, 7.5]],
|
47 |
[prompt, negative_prompt, samples, inference_steps, guidance_scale], gallery, generate_images, cache_examples=True)
|
48 |
gr.Markdown('Demo created by [Terrence Goh](https://huggingface.co/tgohblio/)')
|
49 |
|