diff --git a/CHANGELOG.md b/CHANGELOG.md index 621f65daf..9d07d45ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ - remove concurrent preview requests - hires batch - sdxl refiner + - kandinsky ## Update for 2024-12-24 diff --git a/modules/processing_args.py b/modules/processing_args.py index 4b1765e85..244948530 100644 --- a/modules/processing_args.py +++ b/modules/processing_args.py @@ -233,9 +233,11 @@ def set_pipeline_args(p, model, prompts:list, negative_prompts:list, prompts_2:t args['latents'] = p.init_latent if 'output_type' in possible: if not hasattr(model, 'vae'): - args['output_type'] = 'np' # only set latent if model has vae + kwargs['output_type'] = 'np' # only set latent if model has vae - # stable cascade + # model specific + if 'Kandinsky' in model.__class__.__name__: + kwargs['output_type'] = 'np' # only set latent if model has vae if 'StableCascade' in model.__class__.__name__: kwargs.pop("guidance_scale") # remove kwargs.pop("num_inference_steps") # remove diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index c9894739d..4f8125d4f 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -194,7 +194,7 @@ def process_hires(p: processing.StableDiffusionProcessing, output): if p.hr_force: shared.state.job_count = 2 * p.n_iter shared.sd_model = sd_models.set_diffuser_pipe(shared.sd_model, sd_models.DiffusersTaskType.IMAGE_2_IMAGE) - if 'Upscale' in shared.sd_model.__class__.__name__ or 'Flux' in shared.sd_model.__class__.__name__: + if 'Upscale' in shared.sd_model.__class__.__name__ or 'Flux' in shared.sd_model.__class__.__name__ or 'Kandinsky' in shared.sd_model.__class__.__name__: output.images = processing_vae.vae_decode(latents=output.images, model=shared.sd_model, full_quality=p.full_quality, output_type='pil', width=p.width, height=p.height) if p.is_control and hasattr(p, 'task_args') and p.task_args.get('image', None) is not None: if hasattr(shared.sd_model, "vae") and output.images is not None and len(output.images) > 0: @@ -283,7 +283,7 @@ def process_refine(p: processing.StableDiffusionProcessing, output): image = output.images[i] noise_level = round(350 * p.denoising_strength) output_type='latent' - if 'Upscale' in shared.sd_refiner.__class__.__name__ or 'Flux' in shared.sd_refiner.__class__.__name__: + if 'Upscale' in shared.sd_refiner.__class__.__name__ or 'Flux' in shared.sd_refiner.__class__.__name__ or 'Kandinsky' in shared.sd_refiner.__class__.__name__: image = processing_vae.vae_decode(latents=image, model=shared.sd_model, full_quality=p.full_quality, output_type='pil', width=p.width, height=p.height) p.extra_generation_params['Noise level'] = noise_level output_type = 'np' diff --git a/modules/sd_models.py b/modules/sd_models.py index 99e821667..a3b6874c8 100644 --- a/modules/sd_models.py +++ b/modules/sd_models.py @@ -1325,6 +1325,8 @@ def set_diffusers_attention(pipe): module.set_attn_processor(p.HunyuanAttnProcessor2_0()) elif module.__class__.__name__ in ['AuraFlowTransformer2DModel']: module.set_attn_processor(p.AuraFlowAttnProcessor2_0()) + elif 'KandinskyCombinedPipeline' in pipe.__class__.__name__: + pass elif 'Transformer' in module.__class__.__name__: pass # unknown transformer so probably dont want to force attention processor else: