nostalgebraist commited on
Commit
ba1e299
·
1 Parent(s): 2a4c476
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import streamlit as st
2
 
 
3
  import numpy as np
4
  from PIL import Image
5
 
@@ -12,7 +13,7 @@ timestep_respacing_sres2 = '20' # '250'
12
  DIFFUSION_DEFAULTS = dict(
13
  batch_size=1,
14
  n_samples=1,
15
- clf_free_guidance=False,
16
  clf_free_guidance_sres=False,
17
  guidance_scale=1,
18
  guidance_scale_sres=0,
@@ -77,11 +78,15 @@ def handler(text, ts1, ts2, gs1):
77
  return pipeline.sample(**args)
78
 
79
 
80
- text = st.text_area('asdf')
81
 
82
- ts1 = st.slider('steps1', min_value=5, max_value=500, value=10)
83
- ts2 = st.slider('steps2', min_value=5, max_value=500, value=10)
84
- gs1 = st.slider('gs1', min_value=0., max_value=4., value=0.)
 
 
 
 
85
  # ts1, ts2, gs1 = 20, 20, 0
86
 
87
  if st.button('rweerew'):
 
1
  import streamlit as st
2
 
3
+ import time
4
  import numpy as np
5
  from PIL import Image
6
 
 
13
  DIFFUSION_DEFAULTS = dict(
14
  batch_size=1,
15
  n_samples=1,
16
+ clf_free_guidance=True,
17
  clf_free_guidance_sres=False,
18
  guidance_scale=1,
19
  guidance_scale_sres=0,
 
78
  return pipeline.sample(**args)
79
 
80
 
81
+ text = st.text_area('Enter your text here (or leave blank for a textless image)', max_chars=380)
82
 
83
+ help_ts1 = "foo"
84
+ help_ts2 = "bar " * 40
85
+ help_gs1 = "aaff"
86
+
87
+ ts1 = st.slider('Steps (base)', min_value=5, max_value=500, value=10, help=help_ts1)
88
+ ts2 = st.slider('Steps (upsampling)', min_value=5, max_value=500, value=10, help=help_ts1)
89
+ gs1 = st.slider('Guidance scale (base)', min_value=0., max_value=4., value=0., help=help_gs1)
90
  # ts1, ts2, gs1 = 20, 20, 0
91
 
92
  if st.button('rweerew'):