Disty0 commited on
Commit
b6d1bbe
1 Parent(s): 1110e11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -41,6 +41,7 @@ batch_size = -1
41
  width = int(os.getenv("IMAGE_WIDTH", "512"))
42
  height = int(os.getenv("IMAGE_HEIGHT", "512"))
43
  num_images = int(os.getenv("NUM_IMAGES", "1"))
 
44
 
45
  class CustomOVModelVaeDecoder(OVModelVaeDecoder):
46
  def __init__(
@@ -78,7 +79,6 @@ def save_images(image_array, profile: gr.OAuthProfile | None, metadata: dict):
78
  def generate(
79
  prompt: str,
80
  seed: int = 0,
81
- guidance_scale: float = 1.0,
82
  num_inference_steps: int = 4,
83
  randomize_seed: bool = False,
84
  progress = gr.Progress(track_tqdm=True),
@@ -88,6 +88,7 @@ def generate(
88
  global width
89
  global height
90
  global num_images
 
91
 
92
  seed = randomize_seed_fn(seed, randomize_seed)
93
  np.random.seed(seed)
@@ -172,7 +173,6 @@ with gr.Blocks(css="style.css") as demo:
172
  inputs=[
173
  prompt,
174
  seed,
175
- 1.0,
176
  num_inference_steps,
177
  randomize_seed
178
  ],
 
41
  width = int(os.getenv("IMAGE_WIDTH", "512"))
42
  height = int(os.getenv("IMAGE_HEIGHT", "512"))
43
  num_images = int(os.getenv("NUM_IMAGES", "1"))
44
+ guidance_scale = float(os.getenv("GUIDANCE_SCALE", "1.0"))
45
 
46
  class CustomOVModelVaeDecoder(OVModelVaeDecoder):
47
  def __init__(
 
79
  def generate(
80
  prompt: str,
81
  seed: int = 0,
 
82
  num_inference_steps: int = 4,
83
  randomize_seed: bool = False,
84
  progress = gr.Progress(track_tqdm=True),
 
88
  global width
89
  global height
90
  global num_images
91
+ global guidance_scale
92
 
93
  seed = randomize_seed_fn(seed, randomize_seed)
94
  np.random.seed(seed)
 
173
  inputs=[
174
  prompt,
175
  seed,
 
176
  num_inference_steps,
177
  randomize_seed
178
  ],