mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
@@ -22,6 +22,7 @@
|
||||
- remove concurrent preview requests
|
||||
- hires batch
|
||||
- sdxl refiner
|
||||
- kandinsky
|
||||
|
||||
## Update for 2024-12-24
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user