dkatz2391 commited on
Commit
6dc0d71
·
verified ·
1 Parent(s): 03eba6b

image input logging

Browse files
Files changed (1) hide show
  1. app.py +21 -3
app.py CHANGED
@@ -127,8 +127,8 @@ def extract_glb(
127
 
128
  @spaces.GPU(duration=180)
129
  def generate_model_from_images_and_upload(
130
- image_inputs: List[str],
131
- input_type: str,
132
  seed_val: int,
133
  ss_guidance_strength_val: float,
134
  ss_sampling_steps_val: int,
@@ -142,7 +142,25 @@ def generate_model_from_images_and_upload(
142
  ) -> str:
143
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
144
  os.makedirs(user_dir, exist_ok=True)
145
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
146
  pil_images = []
147
  image_basenames = []
148
  print(f"Received image_inputs: {image_inputs}, input_type: {input_type}")
 
127
 
128
  @spaces.GPU(duration=180)
129
  def generate_model_from_images_and_upload(
130
+ image_inputs_arg, # Temporarily change name to see raw input
131
+ input_type_arg, # Temporarily change name
132
  seed_val: int,
133
  ss_guidance_strength_val: float,
134
  ss_sampling_steps_val: int,
 
142
  ) -> str:
143
  user_dir = os.path.join(TMP_DIR, str(req.session_hash))
144
  os.makedirs(user_dir, exist_ok=True)
145
+
146
+ # --- START DEBUG LOGS ---
147
+ print(f"DEBUG: Raw image_inputs_arg: {image_inputs_arg}")
148
+ print(f"DEBUG: Type of image_inputs_arg: {type(image_inputs_arg)}")
149
+ if isinstance(image_inputs_arg, list):
150
+ print(f"DEBUG: Length of image_inputs_arg list: {len(image_inputs_arg)}")
151
+ if len(image_inputs_arg) > 0:
152
+ print(f"DEBUG: First element of image_inputs_arg: {image_inputs_arg[0]}")
153
+ print(f"DEBUG: Type of first element: {type(image_inputs_arg[0])}")
154
+ # --- END DEBUG LOGS ---
155
+
156
+ # Assign to original names for the rest of the script to function if data is as expected
157
+ # If image_inputs_arg is not what we expect (a list), this might error or behave unexpectedly
158
+ image_inputs: List[str] = image_inputs_arg if isinstance(image_inputs_arg, list) else []
159
+ input_type: str = input_type_arg if isinstance(input_type_arg, str) else ""
160
+
161
+
162
+ print(f"Processed image_inputs: {image_inputs}, input_type: {input_type}") # Original log line
163
+
164
  pil_images = []
165
  image_basenames = []
166
  print(f"Received image_inputs: {image_inputs}, input_type: {input_type}")