Thafx commited on
Commit
20850e2
·
1 Parent(s): fd52e1d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +30 -27
app.py CHANGED
@@ -5,7 +5,7 @@ from PIL import Image
5
 
6
  model_id = 'wavymulder/lomo-diffusion'
7
  prefix = 'lomo style,'
8
-
9
  scheduler = DPMSolverMultistepScheduler.from_pretrained(model_id, subfolder="scheduler")
10
 
11
  pipe = StableDiffusionPipeline.from_pretrained(
@@ -107,29 +107,32 @@ 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,15 +151,15 @@ 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)
155
- steps = gr.Slider(label="Steps", value=25, minimum=2, maximum=75, step=1)
156
 
157
  with gr.Row():
158
- width = gr.Slider(label="Width", value=512, minimum=64, maximum=1024, step=8)
159
- height = gr.Slider(label="Height", value=512, minimum=64, maximum=1024, step=8)
160
 
161
  seed = gr.Slider(0, 2147483647, label='Seed (0 = random)', value=0, step=1)
162
 
@@ -175,4 +178,4 @@ Have Fun & Enjoy
175
 
176
 
177
  demo.queue(concurrency_count=1)
178
- demo.launch()
 
5
 
6
  model_id = 'wavymulder/lomo-diffusion'
7
  prefix = 'lomo style,'
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:yellow;">📸 Lomo Diffusion 📸</h1>
111
  </div>
112
  <p>
113
+ Demo for <a href="https://huggingface.com/wwavymulder/lomo-diffusion">Lomo Diffusion</a>
114
+ Stable Diffusion model by <a href="https://huggingface.co/wavymulder/"><abbr title="Wavymulder">Wavymulder</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
+ lomo style photograph of <b>* subject * </b>, (high detailed skin:1.2), 8k uhd, dslr, soft lighting, high quality, film grain, realistic, photo-realistic, full length frame, High detail RAW color art, piercing, diffused soft lighting, shallow depth of field, sharp focus, hyperrealism, cinematic lighting
123
+ <br>
124
+ <br>
125
+ <q><i>Example: lomo style photograph of Heath Ledger as Batman</i></q>
126
+ </code></details>
127
+ <q><em>Important note: Lomo Diffusion works best at a 1:1 aspect ratio, it is also successful using tall aspect ratios as well.</em></q>
128
+ <br>
129
+ <b>Negative Prompt</b>:
130
+ <details><code>
131
+ blender illustration hdr, lowres, text, error, cropped, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, out of frame, 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, username, watermark, signature
132
+ </code></details>
133
+ <br>
134
+ Have Fun & Enjoy ⚡ <a href="https://www.thafx.com"><abbr title="Website">//THAFX</abbr></a>
135
  <br>
 
 
 
 
 
136
  </div>
137
  """
138
  )
 
151
  with gr.Tab("Options"):
152
  with gr.Group():
153
  neg_prompt = gr.Textbox(label="Negative prompt", placeholder="What to exclude from the image")
154
+ auto_prefix = gr.Checkbox(label="Prefix styling tokens automatically (portrait+ style,)", value=prefix, visible=prefix)
155
 
156
  with gr.Row():
157
+ guidance = gr.Slider(label="Guidance scale", value=7, maximum=15)
158
+ steps = gr.Slider(label="Steps", value=20, minimum=2, maximum=75, step=1)
159
 
160
  with gr.Row():
161
+ width = gr.Slider(label="Width", value=768, minimum=64, maximum=1024, step=8)
162
+ height = gr.Slider(label="Height", value=768, minimum=64, maximum=1024, step=8)
163
 
164
  seed = gr.Slider(0, 2147483647, label='Seed (0 = random)', value=0, step=1)
165
 
 
178
 
179
 
180
  demo.queue(concurrency_count=1)
181
+ demo.launch()