mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
add qwen-image-edit-2509 and update requirements
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -46,14 +46,6 @@ tunableop_results*.csv
|
||||
!package.json
|
||||
!requirements.txt
|
||||
|
||||
# pyinstaller
|
||||
*.spec
|
||||
build/
|
||||
dist/
|
||||
|
||||
# dynamically generated
|
||||
/repositories/deepseek-vl2/
|
||||
|
||||
# all dynamic stuff
|
||||
/extensions/**/*
|
||||
/outputs/**/*
|
||||
|
||||
+3
-1
@@ -1,10 +1,12 @@
|
||||
# Change Log for SD.Next
|
||||
|
||||
## Update for 2025-09-22
|
||||
## Update for 2025-09-23
|
||||
|
||||
- **Models**
|
||||
- [WAN 2.2 14B VACE](https://huggingface.co/alibaba-pai/Wan2.2-VACE-Fun-A14B)
|
||||
available for *text-to-image* and *text-to-video* and *image-to-video* workflows
|
||||
- [Qwen Image Edit 2509](https://huggingface.co/Qwen/Qwen-Image-Edit-2509)
|
||||
improved version of Qwen Image Edit with improved image consistency
|
||||
- [Tencent FLUX.1 Dev SRPO](https://huggingface.co/tencent/SRPO)
|
||||
SRPO is trained by Tencent with specific technique: Directly Aligning the Full Diffusion Trajectory with Fine-Grained Human Preference
|
||||
- [Nunchaku SDXL](https://huggingface.co/nunchaku-tech/nunchaku-sdxl) and [Nunchaku SDXL Turbo](https://huggingface.co/nunchaku-tech/nunchaku-sdxl-turbo)
|
||||
|
||||
@@ -170,6 +170,13 @@
|
||||
"skip": true,
|
||||
"extras": ""
|
||||
},
|
||||
"Qwen-Image-Edit-2509": {
|
||||
"path": "Qwen/Qwen-Image-Edit-2509",
|
||||
"preview": "Qwen--Qwen-Image-Edit.jpg",
|
||||
"desc": "Qwen-Image-Edit, the image editing version of Qwen-Image. Built upon our 20B Qwen-Image model, Qwen-Image-Edit successfully extends Qwen-Image’s unique text rendering capabilities to image editing tasks, enabling precise text editing.",
|
||||
"skip": true,
|
||||
"extras": ""
|
||||
},
|
||||
"Qwen-Image-Lightning": {
|
||||
"path": "vladmandic/Qwen-Lightning",
|
||||
"preview": "vladmandic--Qwen-Lightning.jpg",
|
||||
|
||||
+5
-5
@@ -608,7 +608,7 @@ def check_diffusers():
|
||||
if args.skip_git:
|
||||
install('diffusers')
|
||||
return
|
||||
sha = 'efb7a299af46d739dec6a57a5d2814165fba24b5' # diffusers commit hash
|
||||
sha = '1448b035859dd57bbb565239dcdd79a025a85422' # diffusers commit hash
|
||||
pkg = pkg_resources.working_set.by_key.get('diffusers', None)
|
||||
minor = int(pkg.version.split('.')[1] if pkg is not None else -1)
|
||||
cur = opts.get('diffusers_version', '') if minor > -1 else ''
|
||||
@@ -635,8 +635,8 @@ def check_transformers():
|
||||
target_transformers = '4.52.4'
|
||||
target_tokenizers = '0.21.4'
|
||||
else:
|
||||
target_transformers = '4.56.1'
|
||||
target_tokenizers = '0.22.0'
|
||||
target_transformers = '4.56.2'
|
||||
target_tokenizers = '0.22.1'
|
||||
if (pkg_transformers is None) or ((pkg_transformers.version != target_transformers) or (pkg_tokenizers is None) or ((pkg_tokenizers.version != target_tokenizers) and (not args.experimental))):
|
||||
if pkg_transformers is None:
|
||||
log.info(f'Transformers install: version={target_transformers}')
|
||||
@@ -1273,8 +1273,8 @@ def install_insightface():
|
||||
uninstall('albumentations')
|
||||
install('albumentationsx')
|
||||
else:
|
||||
uninstall('albumentationsx')
|
||||
install('albumentations==1.4.3', ignore=True, quiet=True)
|
||||
uninstall('albumentationsx')
|
||||
install('albumentations==1.4.3', ignore=True, quiet=True)
|
||||
install_pydantic()
|
||||
|
||||
|
||||
|
||||
+6
-2
@@ -5,7 +5,7 @@ from modules import shared
|
||||
def apply_cache_dit(pipe):
|
||||
if not shared.opts.cache_dit_enabled:
|
||||
return
|
||||
install('cache_dit')
|
||||
install('git+https://github.com/vipshop/cache-dit', 'cache_dit')
|
||||
try:
|
||||
import cache_dit
|
||||
except Exception as e:
|
||||
@@ -20,7 +20,9 @@ def apply_cache_dit(pipe):
|
||||
if getattr(pipe, 'has_cache_dit', False):
|
||||
unapply_cache_dir(pipe)
|
||||
|
||||
cache_config = cache_dit.BasicCacheConfig()
|
||||
config_args = {}
|
||||
|
||||
cache_config = cache_dit.BasicCacheConfig(**config_args)
|
||||
if shared.opts.cache_dit_calibrator == "TaylorSeer":
|
||||
calibrator_config = cache_dit.TaylorSeerCalibratorConfig(taylorseer_order=1)
|
||||
elif shared.opts.cache_dit_calibrator == "FoCa":
|
||||
@@ -52,6 +54,8 @@ def unapply_cache_dir(pipe):
|
||||
return
|
||||
try:
|
||||
import cache_dit
|
||||
stats = cache_dit.summary(pipe)
|
||||
shared.log.critical(f'Unapply Cache-DiT: {stats}')
|
||||
cache_dit.disable_cache(pipe)
|
||||
pipe.has_cache_dit = False
|
||||
except Exception:
|
||||
|
||||
@@ -103,9 +103,9 @@ def task_specific_kwargs(p, model):
|
||||
}
|
||||
|
||||
# model specific args
|
||||
if model_cls == 'QwenImageEditPipeline' and len(getattr(p, 'init_images', [])) == 0:
|
||||
if 'QwenImageEdit' in model_cls and len(getattr(p, 'init_images', [])) == 0:
|
||||
task_args['image'] = [Image.new('RGB', (p.width, p.height), (0, 0, 0))] # monkey-patch so qwen-image-edit pipeline does not error-out on t2i
|
||||
if model_cls == 'LatentConsistencyModelPipeline' and hasattr(p, 'init_images') and len(p.init_images) > 0:
|
||||
if 'LatentConsistencyModelPipeline' in model_cls and hasattr(p, 'init_images') and len(p.init_images) > 0:
|
||||
p.ops.append('lcm')
|
||||
init_latents = [processing_vae.vae_encode(image, model=shared.sd_model, vae_type=p.vae_type).squeeze(dim=0) for image in p.init_images]
|
||||
init_latent = torch.stack(init_latents, dim=0).to(shared.device)
|
||||
@@ -116,7 +116,7 @@ def task_specific_kwargs(p, model):
|
||||
'width': p.width if hasattr(p, 'width') else None,
|
||||
'height': p.height if hasattr(p, 'height') else None,
|
||||
}
|
||||
if model_cls == 'BlipDiffusionPipeline':
|
||||
if 'BlipDiffusionPipeline' in model_cls:
|
||||
if len(getattr(p, 'init_images', [])) == 0:
|
||||
shared.log.error('BLiP diffusion requires init image')
|
||||
return task_args
|
||||
@@ -126,9 +126,9 @@ def task_specific_kwargs(p, model):
|
||||
'target_subject_category': getattr(p, 'prompt', '').split()[-1],
|
||||
'output_type': 'pil',
|
||||
}
|
||||
if (model.__class__.__name__ == 'WanImageToVideoPipeline') and (getattr(p, 'init_images', None) is not None) and (len(p.init_images) > 0):
|
||||
if ('WanImageToVideoPipeline' in model_cls) and (getattr(p, 'init_images', None) is not None) and (len(p.init_images) > 0):
|
||||
task_args['image'] = p.init_images[0]
|
||||
if (model.__class__.__name__ == 'WanVACEPipeline') and (getattr(p, 'init_images', None) is not None) and (len(p.init_images) > 0):
|
||||
if ('WanVACEPipeline' in model_cls) and (getattr(p, 'init_images', None) is not None) and (len(p.init_images) > 0):
|
||||
task_args['reference_images'] = p.init_images
|
||||
|
||||
if debug_enabled:
|
||||
|
||||
+13
-2
@@ -12,7 +12,12 @@ def load_qwen(checkpoint_info, diffusers_load_config={}):
|
||||
load_args, _quant_args = model_quant.get_dit_args(diffusers_load_config, module='Model')
|
||||
shared.log.debug(f'Load model: type=Qwen model="{checkpoint_info.name}" repo="{repo_id}" offload={shared.opts.diffusers_offload_mode} dtype={devices.dtype} args={load_args}')
|
||||
|
||||
if 'Edit' in repo_id:
|
||||
if '2509' in repo_id :
|
||||
cls_name = diffusers.QwenImageEditPlusPipeline
|
||||
diffusers.pipelines.auto_pipeline.AUTO_TEXT2IMAGE_PIPELINES_MAPPING["qwen-image"] = diffusers.QwenImageEditPlusPipeline
|
||||
diffusers.pipelines.auto_pipeline.AUTO_IMAGE2IMAGE_PIPELINES_MAPPING["qwen-image"] = diffusers.QwenImageEditPlusPipeline
|
||||
diffusers.pipelines.auto_pipeline.AUTO_INPAINT_PIPELINES_MAPPING["qwen-image"] = diffusers.QwenImageEditPlusPipeline
|
||||
elif 'Edit' in repo_id:
|
||||
cls_name = diffusers.QwenImageEditPipeline
|
||||
diffusers.pipelines.auto_pipeline.AUTO_TEXT2IMAGE_PIPELINES_MAPPING["qwen-image"] = diffusers.QwenImageEditPipeline
|
||||
diffusers.pipelines.auto_pipeline.AUTO_IMAGE2IMAGE_PIPELINES_MAPPING["qwen-image"] = diffusers.QwenImageEditPipeline
|
||||
@@ -36,7 +41,13 @@ def load_qwen(checkpoint_info, diffusers_load_config={}):
|
||||
transformer_subfolder = "transformer"
|
||||
|
||||
if transformer is None:
|
||||
transformer = generic.load_transformer(repo_transformer, subfolder=transformer_subfolder, cls_name=diffusers.QwenImageTransformer2DModel, load_config=diffusers_load_config, modules_dtype_dict={"minimum_6bit": ["pos_embed", "time_text_embed", "img_in", "txt_in", "norm_out", "transformer_blocks.0.img_mod.1.weight"]})
|
||||
transformer = generic.load_transformer(
|
||||
repo_transformer,
|
||||
subfolder=transformer_subfolder,
|
||||
cls_name=diffusers.QwenImageTransformer2DModel,
|
||||
load_config=diffusers_load_config,
|
||||
modules_dtype_dict={"minimum_6bit": ["pos_embed", "time_text_embed", "img_in", "txt_in", "norm_out", "transformer_blocks.0.img_mod.1.weight"]},
|
||||
)
|
||||
|
||||
repo_te = 'Qwen/Qwen-Image'
|
||||
text_encoder = generic.load_text_encoder(repo_te, cls_name=transformers.Qwen2_5_VLForConditionalGeneration, load_config=diffusers_load_config)
|
||||
|
||||
+1
-1
@@ -44,7 +44,7 @@ tqdm==4.67.1
|
||||
accelerate==1.10.1
|
||||
opencv-contrib-python-headless==4.11.0.86
|
||||
einops==0.8.1
|
||||
huggingface_hub==0.34.4
|
||||
huggingface_hub==0.35.0
|
||||
numexpr==2.11.0
|
||||
numpy==2.1.2
|
||||
pandas==2.3.1
|
||||
|
||||
+1
-1
Submodule wiki updated: 76be4e54b2...0172d5d268
Reference in New Issue
Block a user