Update app.py
Browse files
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(
|
| 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)
|