You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: diffsynth_engine/pipelines/qwen_image.py
+41-13Lines changed: 41 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -107,10 +107,14 @@ def __init__(
107
107
dtype=config.model_dtype,
108
108
)
109
109
self.config=config
110
+
# qwen image
110
111
self.prompt_template_encode="<|im_start|>system\nDescribe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:<|im_end|>\n<|im_start|>user\n{}<|im_end|>\n<|im_start|>assistant\n"
111
112
self.prompt_template_encode_start_idx=34
112
-
113
+
# qwen image edit
113
114
self.edit_prompt_template_encode="<|im_start|>system\nDescribe the key features of the input image (color, shape, size, texture, objects, background), then explain how the user's text instruction should alter or modify the image. Generate a new image that meets the user's requirements while maintaining consistency with the original input where appropriate.<|im_end|>\n<|im_start|>user\n<|vision_start|><|image_pad|><|vision_end|>{}<|im_end|>\n<|im_start|>assistant\n"
115
+
# qwen image edit plus
116
+
self.edit_plus_prompt_template_encode="<|im_start|>system\nDescribe the key features of the input image (color, shape, size, texture, objects, background), then explain how the user's text instruction should alter or modify the image. Generate a new image that meets the user's requirements while maintaining consistency with the original input where appropriate.<|im_end|>\n<|im_start|>user\n{}<|im_end|>\n<|im_start|>assistant\n"
0 commit comments