Ahsen Khaliq commited on
Commit
6584d0a
1 Parent(s): 62a8a63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -105,7 +105,7 @@ w_stds = G.mapping(zs, None).std(0)
105
 
106
  def inference(text):
107
  target = clip_model.embed_text(text)
108
- steps = 600
109
  seed = 2
110
  tf = Compose([
111
  Resize(224),
@@ -145,8 +145,6 @@ def inference(text):
145
  loop.set_postfix(loss=loss.item(), q_magnitude=q.std().item())
146
  q_ema = q_ema * 0.9 + q * 0.1
147
  image = G.synthesis(q_ema * w_stds + G.mapping.w_avg, noise_mode='const')
148
- if i % 10 == 0:
149
- display(TF.to_pil_image(tf(image)[0]))
150
  pil_image = TF.to_pil_image(image[0].add(1).div(2).clamp(0,1))
151
  #os.makedirs(f'samples/{timestring}', exist_ok=True)
152
  #pil_image.save(f'samples/{timestring}/{i:04}.jpg')
 
105
 
106
  def inference(text):
107
  target = clip_model.embed_text(text)
108
+ steps = 10
109
  seed = 2
110
  tf = Compose([
111
  Resize(224),
 
145
  loop.set_postfix(loss=loss.item(), q_magnitude=q.std().item())
146
  q_ema = q_ema * 0.9 + q * 0.1
147
  image = G.synthesis(q_ema * w_stds + G.mapping.w_avg, noise_mode='const')
 
 
148
  pil_image = TF.to_pil_image(image[0].add(1).div(2).clamp(0,1))
149
  #os.makedirs(f'samples/{timestring}', exist_ok=True)
150
  #pil_image.save(f'samples/{timestring}/{i:04}.jpg')