jamino30 commited on
Commit
3d5845b
1 Parent(s): d3ca146

Support AdamW optimizer

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. inference.py +1 -1
  3. style_images/Scream.jpg +3 -0
app.py CHANGED
@@ -55,7 +55,7 @@ def run(content_image, style_name, style_strength, output_quality, progress=gr.P
55
  print('HIGH QUALITY:', output_quality)
56
 
57
  style_features = cached_style_features[style_name][0 if img_size == 512 else 1]
58
- converted_lr = 0.001 + (0.099 / 99) * (style_strength - 1)
59
 
60
  st = time.time()
61
  generated_img = inference(
 
55
  print('HIGH QUALITY:', output_quality)
56
 
57
  style_features = cached_style_features[style_name][0 if img_size == 512 else 1]
58
+ converted_lr = 0.001 + (0.009 / 99) * (style_strength - 1) # [0.001, 0.01]
59
 
60
  st = time.time()
61
  generated_img = inference(
inference.py CHANGED
@@ -26,7 +26,7 @@ def inference(
26
  content_image,
27
  style_features,
28
  lr,
29
- iterations=35,
30
  optim_caller=optim.AdamW,
31
  alpha=1,
32
  beta=1
 
26
  content_image,
27
  style_features,
28
  lr,
29
+ iterations=100,
30
  optim_caller=optim.AdamW,
31
  alpha=1,
32
  beta=1
style_images/Scream.jpg ADDED

Git LFS Details

  • SHA256: 722abcb9c0c69a2d3b841b6ecb1bedbb1749897f92c6261305e38e34e97d5170
  • Pointer size: 131 Bytes
  • Size of remote file: 261 kB