Spaces:
Running
on
L40S
Running
on
L40S
update
Browse files
canonicalize/pipeline_canonicalize.py
CHANGED
@@ -394,7 +394,10 @@ class CanonicalizationPipeline(DiffusionPipeline):
|
|
394 |
batch_size = image.shape[0]
|
395 |
# Define call parameters
|
396 |
batch_size = 1 if isinstance(prompt, str) else len(prompt)
|
397 |
-
device = self._execution_device
|
|
|
|
|
|
|
398 |
# here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
|
399 |
# of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
|
400 |
# corresponds to doing no classifier free guidance.
|
|
|
394 |
batch_size = image.shape[0]
|
395 |
# Define call parameters
|
396 |
batch_size = 1 if isinstance(prompt, str) else len(prompt)
|
397 |
+
# device = self._execution_device
|
398 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
399 |
+
import sys
|
400 |
+
print(f"PIPELINE Using device!!!!!!!!!!!!: {device}", file=sys.stderr)
|
401 |
# here `guidance_scale` is defined analog to the guidance weight `w` of equation (2)
|
402 |
# of the Imagen paper: https://arxiv.org/pdf/2205.11487.pdf . `guidance_scale = 1`
|
403 |
# corresponds to doing no classifier free guidance.
|