Spaces:
Runtime error
Runtime error
Update pipline_StableDiffusionXL_ConsistentID.py
Browse files
pipline_StableDiffusionXL_ConsistentID.py
CHANGED
|
@@ -464,6 +464,8 @@ class ConsistentIDStableDiffusionXLPipeline(StableDiffusionXLPipeline):
|
|
| 464 |
start_merge_step: int = 0,
|
| 465 |
class_tokens_mask: Optional[torch.LongTensor] = None,
|
| 466 |
prompt_embeds_text_only: Optional[torch.FloatTensor] = None,
|
|
|
|
|
|
|
| 467 |
### add for sdxl
|
| 468 |
negative_prompt_2: Optional[Union[str, List[str]]] = None,
|
| 469 |
prompt_2: Optional[Union[str, List[str]]] = None,
|
|
@@ -694,7 +696,7 @@ class ConsistentIDStableDiffusionXLPipeline(StableDiffusionXLPipeline):
|
|
| 694 |
|
| 695 |
if not output_type == "latent":
|
| 696 |
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
|
| 697 |
-
else:
|
| 698 |
image = latents
|
| 699 |
return StableDiffusionXLPipelineOutput(images=image)
|
| 700 |
|
|
|
|
| 464 |
start_merge_step: int = 0,
|
| 465 |
class_tokens_mask: Optional[torch.LongTensor] = None,
|
| 466 |
prompt_embeds_text_only: Optional[torch.FloatTensor] = None,
|
| 467 |
+
retouching: bool=False,
|
| 468 |
+
need_safetycheck: bool=True,
|
| 469 |
### add for sdxl
|
| 470 |
negative_prompt_2: Optional[Union[str, List[str]]] = None,
|
| 471 |
prompt_2: Optional[Union[str, List[str]]] = None,
|
|
|
|
| 696 |
|
| 697 |
if not output_type == "latent":
|
| 698 |
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
|
| 699 |
+
else: ### TODO add self.run_safety_checker (if need_safetycheck True)
|
| 700 |
image = latents
|
| 701 |
return StableDiffusionXLPipelineOutput(images=image)
|
| 702 |
|