Upload pipeline.py
Browse files- pipeline.py +3 -1
pipeline.py
CHANGED
@@ -1378,15 +1378,17 @@ class StableDiffusionControlNetPipeline(
|
|
1378 |
else:
|
1379 |
assert False
|
1380 |
|
|
|
1381 |
if effective_region_mask is not None:
|
1382 |
effective_region_mask = self.control_mask_processor.preprocess(
|
1383 |
effective_region_mask, height=height, width=width
|
1384 |
-
)
|
1385 |
|
1386 |
print("mask shape:")
|
1387 |
print(effective_region_mask.shape)
|
1388 |
print()
|
1389 |
|
|
|
1390 |
print(torch.max(effective_region_mask))
|
1391 |
|
1392 |
# 5. Prepare timesteps
|
|
|
1378 |
else:
|
1379 |
assert False
|
1380 |
|
1381 |
+
# Prepare effective region mask
|
1382 |
if effective_region_mask is not None:
|
1383 |
effective_region_mask = self.control_mask_processor.preprocess(
|
1384 |
effective_region_mask, height=height, width=width
|
1385 |
+
).to(dtype=torch.float16)
|
1386 |
|
1387 |
print("mask shape:")
|
1388 |
print(effective_region_mask.shape)
|
1389 |
print()
|
1390 |
|
1391 |
+
print(torch.min(effective_region_mask))
|
1392 |
print(torch.max(effective_region_mask))
|
1393 |
|
1394 |
# 5. Prepare timesteps
|