Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ model_id = "Disty0/LCM_SoteMix"
|
|
| 12 |
#model_id = "Disty0/sotediffusion-v2" #不可
|
| 13 |
|
| 14 |
#1024*512 記憶體不足
|
| 15 |
-
HIGH=
|
| 16 |
WIDTH=512
|
| 17 |
|
| 18 |
|
|
@@ -47,8 +47,8 @@ def infer(prompt,negative_prompt):
|
|
| 47 |
image = pipe(
|
| 48 |
prompt = prompt,
|
| 49 |
negative_prompt = negative_prompt,
|
| 50 |
-
width =
|
| 51 |
-
height =
|
| 52 |
guidance_scale=1.0,
|
| 53 |
num_inference_steps=8,
|
| 54 |
num_images_per_prompt=1,
|
|
@@ -60,8 +60,7 @@ def infer(prompt,negative_prompt):
|
|
| 60 |
examples = [
|
| 61 |
"Sailor Chibi Moon, Katsura Masakazu style",
|
| 62 |
"1girl, silver hair, symbol-shaped pupils, yellow eyes, smiling, light particles, light rays, wallpaper, star guardian, serious face, red inner hair, power aura, grandmaster1, golden and white clothes",
|
| 63 |
-
"A cute kitten,
|
| 64 |
-
"A sweet family, dad stands next to mom, mom holds baby girl.",
|
| 65 |
"(illustration, 8k CG, extremely detailed),(whimsical),catgirl,teenage girl,playing in the snow,winter wonderland,snow-covered trees,soft pastel colors,gentle lighting,sparkling snow,joyful,magical atmosphere,highly detailed,fluffy cat ears and tail,intricate winter clothing,shallow depth of field,watercolor techniques,close-up shot,slightly tilted angle,fairy tale architecture,nostalgic,playful,winter magic,(masterpiece:2),best quality,ultra highres,original,extremely detailed,perfect lighting,",
|
| 66 |
]
|
| 67 |
|
|
@@ -79,7 +78,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 79 |
|
| 80 |
with gr.Column(elem_id="col-container"):
|
| 81 |
gr.Markdown(f"""
|
| 82 |
-
# Disty0/LCM_SoteMix {
|
| 83 |
Currently running on {power_device}.
|
| 84 |
""")
|
| 85 |
|
|
@@ -97,7 +96,9 @@ with gr.Blocks(css=css) as demo:
|
|
| 97 |
|
| 98 |
gr.Examples(
|
| 99 |
examples = examples,
|
| 100 |
-
|
|
|
|
|
|
|
| 101 |
)
|
| 102 |
|
| 103 |
run_button.click(
|
|
|
|
| 12 |
#model_id = "Disty0/sotediffusion-v2" #不可
|
| 13 |
|
| 14 |
#1024*512 記憶體不足
|
| 15 |
+
HIGH=768
|
| 16 |
WIDTH=512
|
| 17 |
|
| 18 |
|
|
|
|
| 47 |
image = pipe(
|
| 48 |
prompt = prompt,
|
| 49 |
negative_prompt = negative_prompt,
|
| 50 |
+
width = WIDTH,
|
| 51 |
+
height = HIGH,
|
| 52 |
guidance_scale=1.0,
|
| 53 |
num_inference_steps=8,
|
| 54 |
num_images_per_prompt=1,
|
|
|
|
| 60 |
examples = [
|
| 61 |
"Sailor Chibi Moon, Katsura Masakazu style",
|
| 62 |
"1girl, silver hair, symbol-shaped pupils, yellow eyes, smiling, light particles, light rays, wallpaper, star guardian, serious face, red inner hair, power aura, grandmaster1, golden and white clothes",
|
| 63 |
+
"A cute kitten, Tinkle style.",
|
|
|
|
| 64 |
"(illustration, 8k CG, extremely detailed),(whimsical),catgirl,teenage girl,playing in the snow,winter wonderland,snow-covered trees,soft pastel colors,gentle lighting,sparkling snow,joyful,magical atmosphere,highly detailed,fluffy cat ears and tail,intricate winter clothing,shallow depth of field,watercolor techniques,close-up shot,slightly tilted angle,fairy tale architecture,nostalgic,playful,winter magic,(masterpiece:2),best quality,ultra highres,original,extremely detailed,perfect lighting,",
|
| 65 |
]
|
| 66 |
|
|
|
|
| 78 |
|
| 79 |
with gr.Column(elem_id="col-container"):
|
| 80 |
gr.Markdown(f"""
|
| 81 |
+
# Disty0/LCM_SoteMix {WIDTH}x{HIGH}
|
| 82 |
Currently running on {power_device}.
|
| 83 |
""")
|
| 84 |
|
|
|
|
| 96 |
|
| 97 |
gr.Examples(
|
| 98 |
examples = examples,
|
| 99 |
+
fn = infer,
|
| 100 |
+
inputs = [prompt],
|
| 101 |
+
outputs = [result]
|
| 102 |
)
|
| 103 |
|
| 104 |
run_button.click(
|