Skip to content

Conversation

@sayakpaul
Copy link
Member

What does this PR do?

Fixes huggingface/accelerate#3672

from diffusers import AutoPipelineForText2Image, DiffusionPipeline
import torch

pipe = DiffusionPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()
pipe.load_lora_weights(
    "renderartist/retrocomicflux", 
    weight_name="Retro_Comic_Flux_v1_renderartist.safetensors", 
    adapter_name="test"
)

Fails with:

AttributeError: 'NoneType' object has no attribute '__dict__'. Did you mean: '__dir__'?

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@a-r-r-o-w a-r-r-o-w left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@sayakpaul sayakpaul merged commit 265840a into main Jul 10, 2025
32 checks passed
@sayakpaul sayakpaul deleted the fix-disabling-hooks branch July 10, 2025 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

a bug in remove_hook_from_module

5 participants