Executing the inference step. Args: request_ids (List[int], optional): The request ID. Defaults to None. prompts (Union[List[str], optional): Input prompts. Defaults to None.
(
self,
request_ids: Union[List[int], int] = None,
prompts: Union[List[str], str] = None,
*args,
**kwargs,
)
| 67 | assert self._initialized, "Engine must be initialized" |
| 68 | |
| 69 | def generate( |
| 70 | self, |
| 71 | request_ids: Union[List[int], int] = None, |
| 72 | prompts: Union[List[str], str] = None, |
| 73 | *args, |
| 74 | **kwargs, |
| 75 | ) -> Union[List[Union[str, List[PIL.Image.Image], np.ndarray]], Tuple[List[str], List[List[int]]]]: |
| 76 | """ |
| 77 | Executing the inference step. |
| 78 | |
| 79 | Args: |
| 80 | request_ids (List[int], optional): The request ID. Defaults to None. |
| 81 | prompts (Union[List[str], optional): Input prompts. Defaults to None. |
| 82 | """ |
| 83 | |
| 84 | assert self.engine is not None, "Please init Engine first" |
| 85 | return self.engine.generate(request_ids=request_ids, prompts=prompts, *args, **kwargs) |
| 86 | |
| 87 | def add_request( |
| 88 | self, |
no outgoing calls