Quick fix to ChineseStableDiffusion meta tensor bug.

Link: https://code.alibaba-inc.com/Ali-MaaS/MaaS-lib/codereview/12382517
* Quick fix to ChineseStableDiffusion meta tensor bug.
This commit is contained in:
guangpan.cd
2023-04-19 17:11:25 +08:00
committed by mulin.lyh
parent 8ea82e6f6d
commit 8debc432cf

View File

@@ -46,7 +46,9 @@ class ChineseStableDiffusionPipeline(DiffusersPipeline):
torch_dtype = kwargs.get('torch_dtype', torch.float32)
self.pipeline = _DiffuersChineseStableDiffusionPipeline.from_pretrained(
model, torch_dtype=torch_dtype).to(self.device)
model, torch_dtype=torch_dtype)
self.pipeline.text_encoder.pooler = None
self.pipeline.to(self.device)
def forward(self, inputs: Dict[str, Any],
**forward_params) -> Dict[str, Any]: