Skip to content

Commit

Permalink
--text-encoders help fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Teriks committed Jun 26, 2024
1 parent d4e55cc commit 496a444
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dgenerate/pipelinewrapper/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,10 +968,10 @@ def _text_encoder_not_null(uri):

def _torch_args_hasher(args):
def text_encoder_uri_parse(uri):
if uri is None or uri == '+':
if uri is None or uri.strip() == '+':
return None

if uri == 'help':
if uri.strip() == 'help':
return 'help'

return _uris.TorchTextEncoderUri.parse(uri)
Expand Down Expand Up @@ -1645,10 +1645,10 @@ def __call__(self) -> FlaxPipelineCreationResult:
def _flax_args_hasher(args):

def text_encoder_uri_parse(uri):
if uri is None or uri == '+':
if uri is None or uri.strip() == '+':
return None

if uri == 'help':
if uri.strip() == 'help':
return 'help'

return _uris.FlaxTextEncoderUri.parse(uri)
Expand Down

0 comments on commit 496a444

Please sign in to comment.