Skip to content

'BitDiffusion' object has no attribute 'scheduler' #9111

Description

@BioGeek

Describe the bug

Running the Bit Diffusion example code from the Community Pipeline Examples fails

Reproduction

from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained("google/ddpm-cifar10-32", custom_pipeline="bit_diffusion")
image = pipe().images[0]

Logs

AttributeError Traceback (most recent call last)
<ipython-input-2-3d32a9d66392>in<cell line: 2>()
1 from diffusers import DiffusionPipeline
----> 2 pipe = DiffusionPipeline.from_pretrained("google/ddpm-cifar10-32", custom_pipeline="bit_diffusion")
3 image = pipe().images[0]
/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py in _inner_fn(*args, **kwargs)
112 kwargs = smoothly_deprecate_use_auth_token(fn_name=fn.__name__, has_token=has_token, kwargs=kwargs)
113 --> 114 return fn(*args, **kwargs)
115 116 return _inner_fn # type: ignore
/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/pipeline_utils.py in from_pretrained(cls, pretrained_model_name_or_path, **kwargs)
964 965 # 10. Instantiate the pipeline
--> 966 model = pipeline_class(**init_kwargs)
967 968 # 11. Save where the model was instantiated from~/.cache/huggingface/modules/diffusers_modules/git/bit_diffusion.py in __init__(self, unet, scheduler, bit_scale)
220 super().__init__()
221 self.bit_scale = bit_scale
--> 222 self.scheduler.step = (
223 ddim_bit_scheduler_step if isinstance(scheduler, DDIMScheduler) else ddpm_bit_scheduler_step
224 )
/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py in __getattr__(self, name)
141 return self._internal_dict[name]
142 --> 143 raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
144 145 def save_config(self, save_directory: Union[str, os.PathLike], push_to_hub: bool = False, **kwargs):
AttributeError: 'BitDiffusion' object has no attribute 'scheduler'

System Info

  • 🤗 Diffusers version: 0.30.0
  • Platform: Linux-6.1.85+-x86_64-with-glibc2.35
  • Running on Google Colab?: Yes
  • Python version: 3.10.12
  • PyTorch version (GPU?): 2.3.1+cu121 (False)
  • Flax version (CPU?/GPU?/TPU?): 0.8.4 (cpu)
  • Jax version: 0.4.26
  • JaxLib version: 0.4.26
  • Huggingface_hub version: 0.23.5
  • Transformers version: 4.42.4
  • Accelerate version: 0.32.1
  • PEFT version: not installed
  • Bitsandbytes version: not installed
  • Safetensors version: 0.4.3
  • xFormers version: not installed
  • Accelerator: NA
  • Using GPU in script?: no
  • Using distributed or parallel set-up in script?: no

Who can help?

@patrickvonplaten (78a6eed) @kingstut (#971)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingstaleIssues that haven't received updates

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions