-
Notifications
You must be signed in to change notification settings - Fork 88
feat(diffusers/pipelines): add pipelines and required modules of QwenImage in Diffusers Master #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
How to fix the requirement of |
Can add an inference example and lora fine-tune example in |
The main reason for using ../../transformers/src/transformers/models/qwen2_5_vl/modeling_qwen2_5_vl.py:1517: in __init__
super().__init__(config)
../../transformers/src/transformers/modeling_utils.py:1898: in __init__
self.generation_config = GenerationConfig.from_model_config(config) if self.can_generate() else None
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
decoder_config = model_config.get_text_config(decoder=True)
if decoder_config is not model_config:
default_generation_config = GenerationConfig()
> decoder_config_dict = decoder_config.to_dict()
^^^^^^^^^^^^^^^^^^^^^^
E AttributeError: 'dict' object has no attribute 'to_dict'
../../transformers/src/transformers/generation/configuration_utils.py:1287: AttributeError Upgrading |
What does this PR do?
Adds
1. QwenImage Pipelines and Required Modules
(Comparable with Diffusers Master)
a. Pipelines
mindone.diffusers.QwenImagePipeline
mindone.diffusers.QwenImageImg2ImgPipeline
mindone.diffusers.QwenImageInpaintPipeline
mindone.diffusers.QwenImageEditPipeline
mindone.diffusers.QwenImageEditInpaintPipeline
b. Modules
mindone.diffusers.models.AutoencoderQwenImage
mindone.diffusers.models.QwenImageTransformer2DModel
mindone.diffusers.loaders.QwenImageLoraLoaderMixin
2. add UTs of pipelines
tests/diffusers_tests/pipelines/qwenimage/test_qwenimage.py
tests/diffusers_tests/pipelines/qwenimage/test_qwenimage_img2img.py
tests/diffusers_tests/pipelines/qwenimage/test_qwenimage_inpaint.py
tests/diffusers_tests/pipelines/qwenimage/test_qwenimage_edit.py
Usage
Performance
Experiments are tested on Ascend Atlas 800T A2 machines with MindSpore 2.7.0
Limitation
QwenImageEditPipeline
andQwenImageEditInpaintPipeline
will load modules from Qwen-Image-Edit. The use of these two pipes requires manually changingimage_processor_type
fromQwen2VLImageProcessorFast
toQwen2VLImageProcessor
inQwen-Image-Edit/processor/preprocessor_config.json
Notes
random seed
andhidden states
from the text encoder.Before submitting
What's New
. Here are thedocumentation guidelines
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
@xxx