Spaces:
Running
on
Zero
Running
on
Zero
kayfahaarukku
commited on
Commit
•
f23fc7b
1
Parent(s):
89effee
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ tqdm.monitor_interval = 0
|
|
11 |
|
12 |
# Load the diffusion pipeline
|
13 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
14 |
-
"kayfahaarukku/UrangDiffusion-
|
15 |
torch_dtype=torch.float16,
|
16 |
custom_pipeline="lpw_stable_diffusion_xl",
|
17 |
)
|
@@ -25,7 +25,7 @@ def generate_image(prompt, negative_prompt, use_defaults, resolution, guidance_s
|
|
25 |
if randomize_seed:
|
26 |
seed = random.randint(0, 99999999)
|
27 |
if use_defaults:
|
28 |
-
prompt = f"{prompt},
|
29 |
negative_prompt = f"nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract], {negative_prompt}"
|
30 |
generator = torch.manual_seed(seed)
|
31 |
|
@@ -76,7 +76,7 @@ with gr.Blocks(title="UrangDiffusion 1.4 Demo", theme="NoCrypt/miku@1.2.1") as d
|
|
76 |
"1344x768", "768x1344", "1536x640", "640x1536"
|
77 |
],
|
78 |
label="Resolution",
|
79 |
-
value="
|
80 |
)
|
81 |
guidance_scale_input = gr.Slider(minimum=1, maximum=20, step=0.5, label="Guidance Scale", value=5)
|
82 |
num_inference_steps_input = gr.Slider(minimum=1, maximum=100, step=1, label="Number of Inference Steps", value=26)
|
@@ -97,9 +97,9 @@ with gr.Blocks(title="UrangDiffusion 1.4 Demo", theme="NoCrypt/miku@1.2.1") as d
|
|
97 |
gr.Markdown(
|
98 |
"""
|
99 |
### Recommended prompt formatting:
|
100 |
-
`1girl/1boy, character name, from what series, everything else in any order,
|
101 |
|
102 |
-
**PS:** `
|
103 |
|
104 |
### Recommended settings:
|
105 |
- Steps: 25-30
|
|
|
11 |
|
12 |
# Load the diffusion pipeline
|
13 |
pipe = StableDiffusionXLPipeline.from_pretrained(
|
14 |
+
"kayfahaarukku/UrangDiffusion-2.0",
|
15 |
torch_dtype=torch.float16,
|
16 |
custom_pipeline="lpw_stable_diffusion_xl",
|
17 |
)
|
|
|
25 |
if randomize_seed:
|
26 |
seed = random.randint(0, 99999999)
|
27 |
if use_defaults:
|
28 |
+
prompt = f"{prompt}, best quality, amazing quality, very aesthetic"
|
29 |
negative_prompt = f"nsfw, lowres, (bad), text, error, fewer, extra, missing, worst quality, jpeg artifacts, low quality, watermark, unfinished, displeasing, oldest, early, chromatic aberration, signature, extra digits, artistic error, username, scan, [abstract], {negative_prompt}"
|
30 |
generator = torch.manual_seed(seed)
|
31 |
|
|
|
76 |
"1344x768", "768x1344", "1536x640", "640x1536"
|
77 |
],
|
78 |
label="Resolution",
|
79 |
+
value="832x1216"
|
80 |
)
|
81 |
guidance_scale_input = gr.Slider(minimum=1, maximum=20, step=0.5, label="Guidance Scale", value=5)
|
82 |
num_inference_steps_input = gr.Slider(minimum=1, maximum=100, step=1, label="Number of Inference Steps", value=26)
|
|
|
97 |
gr.Markdown(
|
98 |
"""
|
99 |
### Recommended prompt formatting:
|
100 |
+
`1girl/1boy, character name, from what series, everything else in any order, best quality, amazing quality, very aesthetic,`
|
101 |
|
102 |
+
**PS:** `best quality, amazing quality, very aesthetic,` is automatically added when "Use Default Quality Tags and Negative Prompt" is enabled
|
103 |
|
104 |
### Recommended settings:
|
105 |
- Steps: 25-30
|