Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def encode_image_emb(self, siglip_image, device, dtype):
def init_ccp_and_attn_processor(self, *args, **kwargs):
subject_ip_adapter_path = kwargs['subject_ip_adapter_path']
nb_token = kwargs['nb_token']
device=kwargs.get('nb_token', torch.device('cuda'))
device=kwargs.get('device', torch.device('cuda'))

state_dict = torch.load(subject_ip_adapter_path, map_location="cpu")
dtype = self.transformer.dtype
Expand Down Expand Up @@ -627,4 +627,4 @@ def enable_sequential_cpu_offload(self, gpu_id: Optional[int] = None, device: Un
# make sure to offload buffers if not all high level weights
# are of type nn.Module
offload_buffers = len(model._parameters) > 0
cpu_offload(model, device, offload_buffers=offload_buffers)
cpu_offload(model, device, offload_buffers=offload_buffers)