Spaces:
Thafx
/
Runtime error

Thafx commited on
Commit
28fbaf8
·
1 Parent(s): b8b59b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -22
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>Stable Diffusion 2 //Duc Haiten</h1>
111
  </div>
112
  <p>
113
- Demo for <a href="https://huggingface.co/SG161222/Realistic_Vision_V1.3">Realistic Vision V1.3</a> Stable Diffusion model by "Eugene".<br><br>
114
- Please use this prompt template to get the desired generation results:<br>
115
- <h2><b>Prompt</b>:</h2>
116
- <details>
117
- RAW photo, *subject*, (high detailed skin:1.2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3
118
- <br><br>
119
- <i>Example: RAW photo, a close up portrait photo of 26 y.o woman in wastelander clothes, long haircut, pale skin, slim body, background is city ruins, (high detailed skin:1.2), 8k uhd, dslr, soft lighting, high quality, film grain, Fujifilm XT3
120
- </i>
121
- </details>
122
-
123
- <h2><b>Negative Prompt</b>:</h2>
124
- <details>
125
- (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck
126
- </details>
 
 
 
 
 
 
 
 
 
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 (RAW photo,)", value=prefix, visible=prefix)
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)