Spaces:
Running
on
Zero
Running
on
Zero
mikonvergence
commited on
Commit
·
40c3bb1
1
Parent(s):
a1c8d5a
fix order
Browse files- src/backend.py +5 -5
src/backend.py
CHANGED
@@ -240,16 +240,16 @@ def generate_output(s2l1c_input, s2l2a_input, s1rtc_input, dem_input, num_infere
|
|
240 |
|
241 |
if s2l2a_active and s2l1c_active and s1rtc_active and dem_active:
|
242 |
gr.Warning("You need to remove some of the inputs that you would like to generate. If all modalities are known, there is nothing to generate.")
|
243 |
-
return
|
244 |
|
245 |
images=[]
|
246 |
condition_modalities=[]
|
247 |
-
if s2l2a_active:
|
248 |
-
images.append(s2l2a_input)
|
249 |
-
condition_modalities.append('s2_l2a')
|
250 |
if s2l1c_active:
|
251 |
images.append(s2l1c_input)
|
252 |
condition_modalities.append('s2_l1c')
|
|
|
|
|
|
|
253 |
if s1rtc_active:
|
254 |
images.append(s1rtc_input)
|
255 |
condition_modalities.append('s1_rtc')
|
@@ -259,7 +259,7 @@ def generate_output(s2l1c_input, s2l2a_input, s1rtc_input, dem_input, num_infere
|
|
259 |
|
260 |
imgs_out = custom_inference(
|
261 |
images=images,
|
262 |
-
generate_modalities=[el for el in ['
|
263 |
condition_modalities=condition_modalities,
|
264 |
num_inference_steps=num_inference_steps_slider,
|
265 |
seed=seed
|
|
|
240 |
|
241 |
if s2l2a_active and s2l1c_active and s1rtc_active and dem_active:
|
242 |
gr.Warning("You need to remove some of the inputs that you would like to generate. If all modalities are known, there is nothing to generate.")
|
243 |
+
return s2l1c_input, s2l2a_input, s1rtc_input, dem_input
|
244 |
|
245 |
images=[]
|
246 |
condition_modalities=[]
|
|
|
|
|
|
|
247 |
if s2l1c_active:
|
248 |
images.append(s2l1c_input)
|
249 |
condition_modalities.append('s2_l1c')
|
250 |
+
if s2l2a_active:
|
251 |
+
images.append(s2l2a_input)
|
252 |
+
condition_modalities.append('s2_l2a')
|
253 |
if s1rtc_active:
|
254 |
images.append(s1rtc_input)
|
255 |
condition_modalities.append('s1_rtc')
|
|
|
259 |
|
260 |
imgs_out = custom_inference(
|
261 |
images=images,
|
262 |
+
generate_modalities=[el for el in ['s2_l1c', 's2_l2a', 's1_rtc', 'dem'] if el not in condition_modalities],
|
263 |
condition_modalities=condition_modalities,
|
264 |
num_inference_steps=num_inference_steps_slider,
|
265 |
seed=seed
|