You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am launching your notebook prompt-to-prompt_stable.ipynb.
I would like to be able to load the weights of a fine-tuned diffusion model into the pipeline. A reproducible section of the code I try to execute is the following:
device = "cuda:0"
# load model
model_path = "/local/path/to/checkpoint-100/"
pipe = StableDiffusionPipeline.from_pretrained(
"runwayml/stable-diffusion-v1-5",
torch_dtype=torch.float16,
safety_checker=None,
feature_extractor=None,
requires_safety_checker=False
)
# load weights from fine-tuned model
pipe.unet.load_attn_procs(pretrained_model_name_or_path_or_dict=model_path, subfolder="checkpoint-100", weight_name="pytorch_model.bin")
pipe.to(device)
Here is the error: AttributeError: 'UNet2DConditionModel' object has no attribute 'load_attn_procs'
which is triggered by the line: pipe.unet.load_attn_procs(pretrained_model_name_or_path_or_dict=model_path, subfolder="checkpoint-100", weight_name="pytorch_model.bin")
FYI, the code works perfectly for diffusers version 0.19.0, however, fails for the version 0.8.0 which is used by your code.
Could you update your code so that it works for later versions, or guide me for a fix?
Thanks in advance~
The text was updated successfully, but these errors were encountered:
Hi,
I am launching your notebook
prompt-to-prompt_stable.ipynb
.I would like to be able to load the weights of a fine-tuned diffusion model into the pipeline. A reproducible section of the code I try to execute is the following:
Here is the error:
AttributeError: 'UNet2DConditionModel' object has no attribute 'load_attn_procs'
which is triggered by the line:
pipe.unet.load_attn_procs(pretrained_model_name_or_path_or_dict=model_path, subfolder="checkpoint-100", weight_name="pytorch_model.bin")
FYI, the code works perfectly for diffusers version 0.19.0, however, fails for the version 0.8.0 which is used by your code.
Could you update your code so that it works for later versions, or guide me for a fix?
Thanks in advance~
The text was updated successfully, but these errors were encountered: