PAG is now supported in core 🤗
Hello folks!
https://github.com/huggingface/diffusers/pull/7944/ introduced support for Perturbed Attention Guidance (PAG) which enhances image generation quality training-free.
| Generated Image without PAG | Generated Image with PAG |
|---|---|
![]() |
![]() |
Check out the PAG guide here: https://huggingface.co/docs/diffusers/main/en/using-diffusers/pag.
Please treat this issue as an announcement instead. Report issues separately.
/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py in _get_task_class(mapping, pipeline_class_name, throw_error_if_not_exist) 183 184 if throw_error_if_not_exist: --> 185 raise ValueError(f"AutoPipeline can't find a pipeline linked to {pipeline_class_name} for {model_name}") 186 187
ValueError: AutoPipeline can't find a pipeline linked to StableDiffusionPAGPipeline for None
@s9anus98a can you open an issue and share the code you used?
@s9anus98a can you open an issue and share the code you used?
i use AutoPipelineForText2Image like in the example link provided
!pip install diffusers
self.pipeline = AutoPipelineForText2Image.from_pretrained(
model_key,
torch_dtype=self.dtype,
enable_pag=True,
pag_applied_layers=["mid"], # You can adjust this as needed
).to(self.device)
Please create a new issue for this.
@s9anus98a
pip install git+https://github.com/huggingface/diffusers
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.
Please note that issues that do not follow the contributing guidelines are likely to be ignored.

