Update controlnet_module.py
Browse files- controlnet_module.py +9 -0
controlnet_module.py
CHANGED
|
@@ -151,6 +151,15 @@ class ControlNetProcessor:
|
|
| 151 |
with torch.no_grad():
|
| 152 |
outputs = self.sam_model(**inputs)
|
| 153 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 154 |
# 5. Maske extrahieren und verarbeiten
|
| 155 |
# outputs.pred_masks enthält die Masken-Logits
|
| 156 |
# post_process_masks stellt die Originalgröße wieder her
|
|
|
|
| 151 |
with torch.no_grad():
|
| 152 |
outputs = self.sam_model(**inputs)
|
| 153 |
|
| 154 |
+
|
| 155 |
+
# DEBUG: Dimensionen prüfen
|
| 156 |
+
print(f"🔍 Original image size: {image.size}") # z.B. (1024, 768)
|
| 157 |
+
print(f"🔍 Processed image size: {inputs['pixel_values'].shape}") # z.B. torch.Size([1, 3, 1024, 1024])
|
| 158 |
+
print(f"🔍 Output masks shape: {outputs.pred_masks.shape}") # KRITISCH: z.B. torch.Size([1, 2, 256, 256])
|
| 159 |
+
print(f"🔍 Original_sizes parameter (in inputs): {inputs.get('original_sizes', 'NOT FOUND')}")
|
| 160 |
+
print(f"🔍 Reshaped_input_sizes parameter (in inputs): {inputs.get('reshaped_input_sizes', 'NOT FOUND')}")
|
| 161 |
+
|
| 162 |
+
|
| 163 |
# 5. Maske extrahieren und verarbeiten
|
| 164 |
# outputs.pred_masks enthält die Masken-Logits
|
| 165 |
# post_process_masks stellt die Originalgröße wieder her
|