Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
7c7ca9d
1
Parent(s):
544d714
add inference
Browse files
app.py
CHANGED
|
@@ -178,7 +178,7 @@ def generate_image_with_steps(prompt, negative_prompt, seed, width, height, guid
|
|
| 178 |
prompts = [prompt]
|
| 179 |
sampler = UniPCSampler(pipe,model_closure=model_closure, steps=num_inference_steps, guidance_scale=guidance_scale)
|
| 180 |
c = prompts
|
| 181 |
-
uc = [
|
| 182 |
shape = [4, width // 8, height // 8]
|
| 183 |
# if opt.method == "dpm_solver_v3":
|
| 184 |
# batch_size, shape, conditioning, x_T, unconditional_conditioning
|
|
@@ -316,7 +316,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 316 |
fn=infer,
|
| 317 |
inputs=[
|
| 318 |
prompt,
|
| 319 |
-
|
| 320 |
seed,
|
| 321 |
randomize_seed,
|
| 322 |
resolution,
|
|
|
|
| 178 |
prompts = [prompt]
|
| 179 |
sampler = UniPCSampler(pipe,model_closure=model_closure, steps=num_inference_steps, guidance_scale=guidance_scale)
|
| 180 |
c = prompts
|
| 181 |
+
uc = ['(worst quality:2), (low quality:2), (normal quality:2), bad anatomy, bad proportions, poorly drawn face, poorly drawn hands, missing fingers, extra limbs, blurry, pixelated, distorted, lowres, jpeg artifacts, watermark, signature, text, (deformed:1.5), (bad hands:1.3), overexposed, underexposed, censored, mutated, extra fingers, cloned face, bad eyes'] * len(c) if guidance_scale != 1.0 else None
|
| 182 |
shape = [4, width // 8, height // 8]
|
| 183 |
# if opt.method == "dpm_solver_v3":
|
| 184 |
# batch_size, shape, conditioning, x_T, unconditional_conditioning
|
|
|
|
| 316 |
fn=infer,
|
| 317 |
inputs=[
|
| 318 |
prompt,
|
| 319 |
+
negative_prompt,
|
| 320 |
seed,
|
| 321 |
randomize_seed,
|
| 322 |
resolution,
|