3laa2 commited on
Commit
dfa0ea3
·
1 Parent(s): a71b15c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -42,9 +42,9 @@ with c5:
42
 
43
  create = st.button("Imagine")
44
  if create:
45
- generator = torch.Generator("cpu").manual_seed(int(bu_1))
46
- model = st.session_state.t2m_mod
47
- img = model(prom, width=int(sl_1), height=int(sl_2), num_inference_steps=int(bu_2), generator=generator).images[0]
48
  # st.image(img)
49
 
50
  if int(bu_3) == 1 :
@@ -58,9 +58,9 @@ if create:
58
  generator = torch.Generator("cpu").manual_seed(int(bu_1))
59
  PROMS = [prom]*int(bu_3)
60
  model = st.session_state.t2m_mod
61
- IMGS = model(prom, width=int(sl_1), height=int(sl_2),
62
  num_inference_steps=int(bu_2),
63
  generator=generator).images
64
 
65
- IMGS = np.hstack(IMGS)
66
  st.image(IMGS)
 
42
 
43
  create = st.button("Imagine")
44
  if create:
45
+ # generator = torch.Generator("cpu").manual_seed(int(bu_1))
46
+ # model = st.session_state.t2m_mod
47
+ # img = model(prom, width=int(sl_1), height=int(sl_2), num_inference_steps=int(bu_2), generator=generator).images[0]
48
  # st.image(img)
49
 
50
  if int(bu_3) == 1 :
 
58
  generator = torch.Generator("cpu").manual_seed(int(bu_1))
59
  PROMS = [prom]*int(bu_3)
60
  model = st.session_state.t2m_mod
61
+ IMGS = model(PROMS, width=int(sl_1), height=int(sl_2),
62
  num_inference_steps=int(bu_2),
63
  generator=generator).images
64
 
65
+ # IMGS = np.hstack(IMGS)
66
  st.image(IMGS)