@@ -325,9 +325,11 @@ def main():
325325 sdxl_models = ["stable-diffusion-xl" , "sdxl" ]
326326 sd3_models = ["stable-diffusion-3" , "sd3" ]
327327 flux_models = ["FLUX.1" , "flux" ]
328+ qwen_models = ["Qwen-Image" , "qwen" ]
328329 sdxl = True if any (model in args .model_name_or_path for model in sdxl_models ) else False
329330 sd3 = True if any (model in args .model_name_or_path for model in sd3_models ) else False
330331 flux = True if any (model in args .model_name_or_path for model in flux_models ) else False
332+ qwen = True if any (model in args .model_name_or_path for model in qwen_models ) else False
331333 controlnet = True if args .control_image is not None else False
332334 inpainting = True if (args .base_image is not None ) and (args .mask_image is not None ) else False
333335
@@ -549,6 +551,24 @@ def main():
549551 ** kwargs ,
550552 )
551553
554+ elif qwen :
555+ # QwenImage pipelines
556+ if controlnet :
557+ raise ValueError ("QwenImage+ControlNet pipeline is not currenly supported" )
558+ elif inpainting :
559+ raise ValueError ("QwenImage Inpainting pipeline is not currenly supported" )
560+ else :
561+ if negative_prompts is None :
562+ logger .warning ("Adding an empty string, because you do not have specific concept to remove." )
563+ kwargs_call ["negative_prompt" ] = " "
564+
565+ from optimum .habana .diffusers import GaudiQwenImagePipeline
566+
567+ pipeline = GaudiQwenImagePipeline .from_pretrained (
568+ args .model_name_or_path ,
569+ ** kwargs ,
570+ )
571+
552572 else :
553573 # SD pipelines (SD1.x, SD2.x)
554574 if controlnet :
0 commit comments