Update app.py
Browse files
app.py
CHANGED
@@ -45,4 +45,22 @@ 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)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 :
|
51 |
+
generator = torch.Generator("cpu").manual_seed(int(bu_1))
|
52 |
+
model = st.session_state.t2m_mod
|
53 |
+
IMG = model(prom, width=int(sl_1), height=int(sl_2),
|
54 |
+
num_inference_steps=int(bu_2),
|
55 |
+
generator=generator).images[0]
|
56 |
+
st.image(IMG)
|
57 |
+
else :
|
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)
|