Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/diffusers/pipelines/qwenimage/pipeline_qwenimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,9 +584,7 @@ def __call__(

device = self._execution_device

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,7 @@ def __call__(

device = self._execution_device

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,9 +739,7 @@ def __call__(

device = self._execution_device

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None
do_true_cfg = true_cfg_scale > 1 and has_neg_prompt
prompt_embeds, prompt_embeds_mask = self.encode_prompt(
prompt=prompt,
Expand Down
4 changes: 1 addition & 3 deletions src/diffusers/pipelines/qwenimage/pipeline_qwenimage_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,7 @@ def __call__(
image = self.image_processor.preprocess(image, calculated_height, calculated_width)
image = image.unsqueeze(2)

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,7 @@ def __call__(
)
image = image.to(dtype=torch.float32)

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -693,9 +693,7 @@ def __call__(
condition_images.append(self.image_processor.resize(img, condition_height, condition_width))
vae_images.append(self.image_processor.preprocess(img, vae_height, vae_width).unsqueeze(2))

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,7 @@ def __call__(

device = self._execution_device

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -822,9 +822,7 @@ def __call__(

device = self._execution_device

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,7 @@ def __call__(
else:
batch_size = prompt_embeds.shape[0]

has_neg_prompt = negative_prompt is not None or (
negative_prompt_embeds is not None and negative_prompt_embeds_mask is not None
)
has_neg_prompt = negative_prompt is not None or negative_prompt_embeds is not None

if true_cfg_scale > 1 and not has_neg_prompt:
logger.warning(
Expand Down