Skip to content

Commit

Permalink
Fix conditionals in command buffer set method
Browse files Browse the repository at this point in the history
  • Loading branch information
eagarvey-amd committed Feb 13, 2025
1 parent f9b206a commit c7c01f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shortfin/python/shortfin_apps/sd/components/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def __init__(

def set_command_buffer(self, cb):
# Input IDs for CLIP if they are used as inputs instead of prompts.
if self.input_ids:
if self.input_ids is not None:
# Take a batch of sets of input ids as ndarrays and fill cb.input_ids
host_arrs = [None] * 4
for idx, arr in enumerate(cb.input_ids):
Expand All @@ -127,7 +127,7 @@ def set_command_buffer(self, cb):
cb.input_ids[idx].copy_from(host_arrs[idx])

# Same for noisy latents if they are explicitly provided as a numpy array.
if self.sample:
if self.sample is not None:
sample_host = cb.sample.for_transfer()
with sample_host.map(discard=True) as m:
m.fill(self.sample.tobytes())
Expand Down

0 comments on commit c7c01f0

Please sign in to comment.