Browse Source

[to #42322933]converting string to int to meet the input of face-image-generation

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/10489981
master
baiguan.yt yingda.chen 3 years ago
parent
commit
46107e3ecf
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      modelscope/pipelines/cv/face_image_generation_pipeline.py

+ 2
- 0
modelscope/pipelines/cv/face_image_generation_pipeline.py View File

@@ -61,6 +61,8 @@ class FaceImageGenerationPipeline(Pipeline):
return input

def forward(self, input: Dict[str, Any]) -> Dict[str, Any]:
if isinstance(input, str):
input = int(input)
assert isinstance(input, int)
torch.manual_seed(input)
torch.cuda.manual_seed(input)


Loading…
Cancel
Save