Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
|
|
5 |
|
6 |
model_id = 'Fictiverse/Stable_Diffusion_PaperCut_Model'
|
7 |
prefix = 'PaperCut,'
|
8 |
-
|
9 |
scheduler = DPMSolverMultistepScheduler.from_pretrained(model_id, subfolder="scheduler")
|
10 |
|
11 |
pipe = StableDiffusionPipeline.from_pretrained(
|
@@ -107,29 +107,33 @@ with gr.Blocks(css=css) as demo:
|
|
107 |
f"""
|
108 |
<div class="main-div">
|
109 |
<div>
|
110 |
-
<h1
|
111 |
</div>
|
112 |
<p>
|
113 |
-
Demo for <a href="https://huggingface.
|
114 |
-
|
115 |
-
<
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
</
|
121 |
-
|
122 |
-
|
123 |
-
<
|
124 |
-
<
|
125 |
-
|
126 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
<br>
|
128 |
-
Have Fun & Enjoy
|
129 |
-
//THAFX<br>
|
130 |
-
{"" if prefix else ""}
|
131 |
-
</p>
|
132 |
-
Running on {"<b>GPU 🔥</b>" if torch.cuda.is_available() else f"<b>CPU 🔥</b>"}.
|
133 |
</div>
|
134 |
"""
|
135 |
)
|
@@ -148,7 +152,7 @@ Have Fun & Enjoy
|
|
148 |
with gr.Tab("Options"):
|
149 |
with gr.Group():
|
150 |
neg_prompt = gr.Textbox(label="Negative prompt", placeholder="What to exclude from the image")
|
151 |
-
auto_prefix = gr.Checkbox(label="Prefix styling tokens automatically (
|
152 |
|
153 |
with gr.Row():
|
154 |
guidance = gr.Slider(label="Guidance scale", value=7.5, maximum=15)
|
|
|
5 |
|
6 |
model_id = 'Fictiverse/Stable_Diffusion_PaperCut_Model'
|
7 |
prefix = 'PaperCut,'
|
8 |
+
|
9 |
scheduler = DPMSolverMultistepScheduler.from_pretrained(model_id, subfolder="scheduler")
|
10 |
|
11 |
pipe = StableDiffusionPipeline.from_pretrained(
|
|
|
107 |
f"""
|
108 |
<div class="main-div">
|
109 |
<div>
|
110 |
+
<h1 style="color:green;">✂️ PaperCut V1.0 📃</h1>
|
111 |
</div>
|
112 |
<p>
|
113 |
+
Demo for <a href="https://huggingface.com/Fictiverse/Stable_Diffusion_PaperCut_Model">PaperCut V1.0</a>
|
114 |
+
Stable Diffusion model by <a href="https://huggingface.co/Fictiverse/"><abbr title="Fictiverse">Fictiverse</abbr></a>. {"" if prefix else ""}
|
115 |
+
Running on {"<b>GPU 🔥</b>" if torch.cuda.is_available() else f"<b>CPU ⚡</b>"}.
|
116 |
+
</p>
|
117 |
+
<p>Please use the prompt template below to achieve the desired result:
|
118 |
+
</p>
|
119 |
+
|
120 |
+
<b>Prompt</b>:
|
121 |
+
<details><code>
|
122 |
+
PaperCut, <b>* the subject * </b>,
|
123 |
+
<br>
|
124 |
+
<br>
|
125 |
+
<q><i>Example:
|
126 |
+
</i></q>
|
127 |
+
</code></details>
|
128 |
+
|
129 |
+
<br>
|
130 |
+
<b>Negative Prompt</b>:
|
131 |
+
<details><code>
|
132 |
+
lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, out of frame, extra fingers, deformed, blurry, bad anatomy, bad proportions, extra limbs, cloned face, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, username, watermark, signature
|
133 |
+
</code></details>
|
134 |
+
<br>
|
135 |
+
Have Fun & Enjoy ⚡ <a href="https://www.thafx.com"><abbr title="Website">//THAFX</abbr></a>
|
136 |
<br>
|
|
|
|
|
|
|
|
|
|
|
137 |
</div>
|
138 |
"""
|
139 |
)
|
|
|
152 |
with gr.Tab("Options"):
|
153 |
with gr.Group():
|
154 |
neg_prompt = gr.Textbox(label="Negative prompt", placeholder="What to exclude from the image")
|
155 |
+
auto_prefix = gr.Checkbox(label="Prefix styling tokens automatically (mdjrny-v4 style,)", value=prefix, visible=prefix)
|
156 |
|
157 |
with gr.Row():
|
158 |
guidance = gr.Slider(label="Guidance scale", value=7.5, maximum=15)
|