Skip to content

Commit bc72f9c

Browse files
committed
sample_mode, default controlnet_conditioning_scale
1 parent 5f8ab7b commit bc72f9c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/diffusers/pipelines/z_image/pipeline_z_image_controlnet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def __call__(
360360
sigmas: Optional[List[float]] = None,
361361
guidance_scale: float = 5.0,
362362
control_image: PipelineImageInput = None,
363-
controlnet_conditioning_scale: Union[float, List[float]] = 1.0,
363+
controlnet_conditioning_scale: Union[float, List[float]] = 0.75,
364364
cfg_normalization: bool = False,
365365
cfg_truncation: float = 1.0,
366366
negative_prompt: Optional[Union[str, List[str]]] = None,
@@ -517,7 +517,7 @@ def __call__(
517517
dtype=self.vae.dtype,
518518
)
519519
height, width = control_image.shape[-2:]
520-
control_image = retrieve_latents(self.vae.encode(control_image), generator=generator)
520+
control_image = retrieve_latents(self.vae.encode(control_image), generator=generator, sample_mode="argmax")
521521
control_image = (control_image - self.vae.config.shift_factor) * self.vae.config.scaling_factor
522522
control_image = control_image.unsqueeze(2)
523523

0 commit comments

Comments
 (0)