Skip to content

Commit

Permalink
Fix pt. 2
Browse files Browse the repository at this point in the history
  • Loading branch information
Landanjs committed Aug 28, 2023
1 parent 1d0c0ac commit a66f97e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diffusion/inference/inference_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ def predict(self, model_requests: List[Dict[str, Any]]):
if isinstance(inputs, str):
prompts.append(inputs)
elif isinstance(inputs, Dict):
if 'prompt' not in req:
if 'prompt' not in inputs:
raise RuntimeError('"prompt" must be provided to generate call if using a dict as input')
prompts.append(inputs['prompt'])
if 'negative_prompt' in req:
if 'negative_prompt' in inputs:
negative_prompts.append(inputs['negative_prompt'])
else:
raise RuntimeError(f'Input must be of type string or dict, but it is type: {type(inputs)}')
Expand Down

0 comments on commit a66f97e

Please sign in to comment.