Spaces:
Paused
Paused
songtianhui
commited on
Commit
·
74ec624
1
Parent(s):
b15b2ae
add model details
Browse files- .gitignore +5 -0
- app.py +19 -4
.gitignore
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
.idea
|
| 2 |
+
.DS_Store
|
| 3 |
+
__pycache__
|
| 4 |
+
**logging**
|
| 5 |
+
**__pycache__**
|
app.py
CHANGED
|
@@ -55,14 +55,29 @@ def generate(prompt: str,
|
|
| 55 |
return [output,]
|
| 56 |
|
| 57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
def main():
|
| 60 |
with gr.Blocks() as demo:
|
| 61 |
-
gr.Markdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
with gr.Row():
|
| 63 |
with gr.Column():
|
| 64 |
with gr.Column():
|
| 65 |
-
model_id = gr.Dropdown(
|
| 66 |
all_check = gr.Checkbox(label="All (ignore the selection above)")
|
| 67 |
prompt = gr.Textbox("portrait photo of a girl, long golden hair, flowers, best quality", label="Prompt")
|
| 68 |
negative_prompt = gr.Textbox("worst quality,low quality,normal quality,lowres,watermark,nsfw", label="Negative Prompt")
|
|
@@ -70,7 +85,7 @@ def main():
|
|
| 70 |
seed = gr.Number(0, label="Seed", precision=0, scale=3)
|
| 71 |
update_seed_btn = gr.Button("🎲", scale=1)
|
| 72 |
with gr.Row():
|
| 73 |
-
height = gr.Number(
|
| 74 |
width = gr.Number(512, step=8, label="Width")
|
| 75 |
submit_btn = gr.Button("Submit", variant="primary")
|
| 76 |
output = gr.Gallery(label="images")
|
|
@@ -81,7 +96,7 @@ def main():
|
|
| 81 |
update_seed_btn.click(lambda: random.randint(0, 1000000),
|
| 82 |
outputs=[seed])
|
| 83 |
|
| 84 |
-
demo.launch(
|
| 85 |
|
| 86 |
|
| 87 |
if __name__ == "__main__":
|
|
|
|
| 55 |
return [output,]
|
| 56 |
|
| 57 |
|
| 58 |
+
candidates = [
|
| 59 |
+
"0. [JuggernautReborn] realistic",
|
| 60 |
+
"1. [MajicmixRealisticV7] realistic, Asia portrait",
|
| 61 |
+
"2. [EpicRealismV5] realistic",
|
| 62 |
+
"3. [RealisticVisionV5] realistic",
|
| 63 |
+
"4. [MajicmixFantasyV3] animation",
|
| 64 |
+
"5. [MinimalismV2] illustration",
|
| 65 |
+
"6. [RealCartoon3dV17] cartoon 3d",
|
| 66 |
+
"7. [AWPaintingV1.4] animation",
|
| 67 |
+
]
|
| 68 |
|
| 69 |
def main():
|
| 70 |
with gr.Blocks() as demo:
|
| 71 |
+
gr.Markdown(
|
| 72 |
+
"""
|
| 73 |
+
# DMM Demo
|
| 74 |
+
The checkpoint is https://huggingface.co/MCG-NJU/DMM.
|
| 75 |
+
"""
|
| 76 |
+
)
|
| 77 |
with gr.Row():
|
| 78 |
with gr.Column():
|
| 79 |
with gr.Column():
|
| 80 |
+
model_id = gr.Dropdown(candidates, label="Model Index", type="index")
|
| 81 |
all_check = gr.Checkbox(label="All (ignore the selection above)")
|
| 82 |
prompt = gr.Textbox("portrait photo of a girl, long golden hair, flowers, best quality", label="Prompt")
|
| 83 |
negative_prompt = gr.Textbox("worst quality,low quality,normal quality,lowres,watermark,nsfw", label="Negative Prompt")
|
|
|
|
| 85 |
seed = gr.Number(0, label="Seed", precision=0, scale=3)
|
| 86 |
update_seed_btn = gr.Button("🎲", scale=1)
|
| 87 |
with gr.Row():
|
| 88 |
+
height = gr.Number(768, step=8, label="Height (suggest 512~768)")
|
| 89 |
width = gr.Number(512, step=8, label="Width")
|
| 90 |
submit_btn = gr.Button("Submit", variant="primary")
|
| 91 |
output = gr.Gallery(label="images")
|
|
|
|
| 96 |
update_seed_btn.click(lambda: random.randint(0, 1000000),
|
| 97 |
outputs=[seed])
|
| 98 |
|
| 99 |
+
demo.launch()
|
| 100 |
|
| 101 |
|
| 102 |
if __name__ == "__main__":
|