Disty0 commited on
Commit
e3761d9
1 Parent(s): aa9bed2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -13
app.py CHANGED
@@ -24,11 +24,11 @@ import uuid
24
  DESCRIPTION = '''# Latent Consistency Model OpenVino CPU
25
  Based on [Latency Consistency Model OpenVINO CPU](https://huggingface.co/deinferno/Latent_Consistency_Model_OpenVino_CPU) HF space
26
 
27
- Converted from [SoteMix](https://huggingface.co/Disty0/SoteMix) to [LCM_SoteMix](https://huggingface.co/Disty0/LCM_SoteMix)
28
 
29
- [Project page](https://latent-consistency-models.github.io)
30
 
31
- <p>Running on CPU 🥶.</p>
32
  '''
33
 
34
  MAX_SEED = np.iinfo(np.int32).max
@@ -39,6 +39,7 @@ batch_size = -1
39
  width = int(os.getenv("IMAGE_WIDTH", "512"))
40
  height = int(os.getenv("IMAGE_HEIGHT", "512"))
41
  num_images = int(os.getenv("NUM_IMAGES", "1"))
 
42
 
43
  class CustomOVModelVaeDecoder(OVModelVaeDecoder):
44
  def __init__(
@@ -105,9 +106,9 @@ def generate(
105
 
106
  examples = [
107
  "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo",
108
- "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, dark red hair, blue eyes, long hair, straight hair, medium breasts, mature female, sweater",
109
- "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, pov, scenery, flowers, shrine, dark red hair, blue eyes, long hair, straight hair, medium breasts, mature female, sweater",
110
- "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, abstract, abstract background, (bloom, swirling lights, light particles), floating, romanticized, blush, emotional, cat ears, fire, galaxy, dark red hair, blue eyes, long hair, straight hair, medium breasts, mature female, sweater",
111
  ]
112
 
113
 
@@ -142,13 +143,6 @@ with gr.Blocks(css="style.css") as demo:
142
  )
143
  randomize_seed = gr.Checkbox(label="Randomize seed across runs", value=True)
144
  with gr.Row():
145
- guidance_scale = gr.Slider(
146
- label="Guidance scale for base",
147
- minimum=1,
148
- maximum=8,
149
- step=0.1,
150
- value=1.0,
151
- )
152
  num_inference_steps = gr.Slider(
153
  label="Number of inference steps for base",
154
  minimum=1,
 
24
  DESCRIPTION = '''# Latent Consistency Model OpenVino CPU
25
  Based on [Latency Consistency Model OpenVINO CPU](https://huggingface.co/deinferno/Latent_Consistency_Model_OpenVino_CPU) HF space
26
 
27
+ Converted from [SoteMix](https://huggingface.co/Disty0/SoteMix) to [LCM_SoteMix](https://huggingface.co/Disty0/LCM_SoteMix) and then to OpenVINO
28
 
29
+ [LCM Project page](https://latent-consistency-models.github.io)
30
 
31
+ <p>Running on CPU with OpenVINO.</p>
32
  '''
33
 
34
  MAX_SEED = np.iinfo(np.int32).max
 
39
  width = int(os.getenv("IMAGE_WIDTH", "512"))
40
  height = int(os.getenv("IMAGE_HEIGHT", "512"))
41
  num_images = int(os.getenv("NUM_IMAGES", "1"))
42
+ guidance_scale = float(os.getenv("GUIDANCE_SCALE", "1.0"))
43
 
44
  class CustomOVModelVaeDecoder(OVModelVaeDecoder):
45
  def __init__(
 
106
 
107
  examples = [
108
  "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo",
109
+ "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, dark red hair, long hair, blue eyes, straight hair, cat ears, medium breasts, mature female, white sweater",
110
+ "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, scenery, wind, petals, rim lighting, shrine, lens flare, light scatter, depth of field, lens refraction, dark red hair, long hair, blue eyes, straight hair, cat ears, medium breasts, mature female, white sweater",
111
+ "(masterpiece, best quality, highres), anime art style, pixiv, 1girl, solo, supernova, abstract, abstract background, (bloom, swirling lights, light particles), fire, galaxy, floating, romanticized, blush, looking at viewer, dark red hair, long hair, blue eyes, straight hair, cat ears, medium breasts, mature female, white sweater",
112
  ]
113
 
114
 
 
143
  )
144
  randomize_seed = gr.Checkbox(label="Randomize seed across runs", value=True)
145
  with gr.Row():
 
 
 
 
 
 
 
146
  num_inference_steps = gr.Slider(
147
  label="Number of inference steps for base",
148
  minimum=1,