Spaces:
Runtime error
Runtime error
adaface-neurips
commited on
Commit
•
825581a
1
Parent(s):
07ac181
tiny change to .to()
Browse files
lib/pipeline_ConsistentID.py
CHANGED
@@ -36,16 +36,16 @@ class ConsistentIDPipeline(StableDiffusionPipeline):
|
|
36 |
def to(
|
37 |
self,
|
38 |
torch_device: Optional[Union[str, torch.device]] = None,
|
39 |
-
|
40 |
):
|
41 |
-
super().to(torch_device, dtype=
|
42 |
-
self.bise_net.to(torch_device, dtype=
|
43 |
-
self.clip_encoder.to(torch_device, dtype=
|
44 |
-
self.image_proj_model.to(torch_device, dtype=
|
45 |
-
self.FacialEncoder.to(torch_device, dtype=
|
46 |
# If the unet is not released, the ip_layers should be moved to the specified device and dtype.
|
47 |
if not isinstance(self.unet, edict):
|
48 |
-
self.ip_layers.to(torch_device, dtype=
|
49 |
return self
|
50 |
|
51 |
@validate_hf_hub_args
|
|
|
36 |
def to(
|
37 |
self,
|
38 |
torch_device: Optional[Union[str, torch.device]] = None,
|
39 |
+
dtype: Optional[torch.dtype] = None,
|
40 |
):
|
41 |
+
super().to(torch_device, dtype=dtype)
|
42 |
+
self.bise_net.to(torch_device, dtype=dtype)
|
43 |
+
self.clip_encoder.to(torch_device, dtype=dtype)
|
44 |
+
self.image_proj_model.to(torch_device, dtype=dtype)
|
45 |
+
self.FacialEncoder.to(torch_device, dtype=dtype)
|
46 |
# If the unet is not released, the ip_layers should be moved to the specified device and dtype.
|
47 |
if not isinstance(self.unet, edict):
|
48 |
+
self.ip_layers.to(torch_device, dtype=dtype)
|
49 |
return self
|
50 |
|
51 |
@validate_hf_hub_args
|