[Bugfix][Qwen-Image-Edit] Add a warning log for none negative_prompt (#1170)
Signed-off-by: gcanlin <canlinguosdu@gmail.com>
This commit is contained in:
1 parent
ce1ae26084
commit
3bc3c95708
2 files changed
+14
No files matched your search
@@ -628,6 +628,13 @@ class QwenImageEditPipeline(nn.Module, SupportImageInput, QwenImageCFGParallelMi
|
||||
first_prompt = req.prompts[0]
|
||||
prompt = first_prompt if isinstance(first_prompt, str) else (first_prompt.get("prompt") or "")
|
||||
negative_prompt = None if isinstance(first_prompt, str) else first_prompt.get("negative_prompt")
|
||||
if negative_prompt is None:
|
||||
logger.warning(
|
||||
"negative_prompt is not set. The official Qwen-Image-Edit model "
|
||||
"may produce lower-quality results without a negative_prompt. "
|
||||
"Qwen official repository recommends to use whitespace string as negative_prompt. "
|
||||
"Note: some distilled variants may not be affected by this."
|
||||
)
|
||||
|
||||
# Get preprocessed image from request (pre-processing is done in DiffusionEngine)
|
||||
if not isinstance(first_prompt, str) and "preprocessed_image" in (
|
||||
|
||||
@@ -563,6 +563,13 @@ class QwenImageEditPlusPipeline(nn.Module, SupportImageInput, QwenImageCFGParall
|
||||
first_prompt = req.prompts[0]
|
||||
prompt = first_prompt if isinstance(first_prompt, str) else (first_prompt.get("prompt") or "")
|
||||
negative_prompt = None if isinstance(first_prompt, str) else first_prompt.get("negative_prompt")
|
||||
if negative_prompt is None:
|
||||
logger.warning(
|
||||
"negative_prompt is not set. The official Qwen-Image-Edit model "
|
||||
"may produce lower-quality results without a negative_prompt. "
|
||||
"Qwen official repository recommends to use whitespace string as negative_prompt. "
|
||||
"Note: some distilled variants may not be affected by this."
|
||||
)
|
||||
|
||||
# Get preprocessed images from request (pre-processing is done in DiffusionEngine)
|
||||
if (
|
||||
|
||||
Reference in new issue
Block a user