Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing PEFT causes generated images to become blurry #148

Open
kazuya-bros opened this issue May 26, 2024 · 0 comments
Open

Installing PEFT causes generated images to become blurry #148

kazuya-bros opened this issue May 26, 2024 · 0 comments

Comments

@kazuya-bros
Copy link

※this may not be a bug

After running pip install peft, the previously sharp and clear generated images suddenly become blurry.
I have attached images before and after installing PEFT for comparison. Running pip uninstall peft restores the image quality to the pre-installation state.
When running the Screen feature of StreamDiffusion, the following message is displayed in the command line:

[stream diffusion install path]\.venv\lib\site-packages\diffusers\loaders\lora.py:952: FutureWarning: `fuse_text_encoder_lora` is deprecated and will be removed in version 0.25. You are using an old version of LoRA backend. This will be deprecated in the next releases in favor of PEFT make sure to install the latest PEFT and transformers packages in the future.
  deprecate("fuse_text_encoder_lora", "0.25", LORA_DEPRECATION_MESSAGE)
[stream diffusion install path]\.venv\lib\site-packages\diffusers\loaders\lora.py:708: FutureWarning: `_modify_text_encoder` is deprecated and will be removed in version 0.25. You are using an old version of LoRA backend. This will be deprecated in the next releases in favor of PEFT make sure to install the latest PEFT and transformers packages in the future.
  deprecate("_modify_text_encoder", "0.25", LORA_DEPRECATION_MESSAGE)
[stream diffusion install path]\.venv\lib\site-packages\diffusers\loaders\lora.py:679: FutureWarning: `_remove_text_encoder_monkey_patch_classmethod` is deprecated and will be removed in version 0.25. You are using an old version of LoRA backend. This will be deprecated in the next releases in favor of PEFT make sure to install the latest PEFT and transformers packages in the future.

I suspect that introducing PEFT causes diffusers to switch to a recommended processing method, which may be the cause of this blurriness issue.
While I anticipate that this problem might be resolved by updating diffusers to accommodate changes related to PEFT, I would appreciate your confirmation and assistance.

Steps to Reproduce:

Generate sharp and clear images using diffusers (without PEFT installed).
Install PEFT via pip install peft.
Generate images again using the same parameters and settings.

Expected Behavior:
The generated images should remain sharp and clear, with no degradation in quality after installing PEFT.
Actual Behavior:
After installing PEFT, the generated images become noticeably blurry and lose detail compared to the previous outputs.

Attachments:
■ before install peft
before

■ after install peft
after

Please let me know if you need any further information or if I can provide additional details to assist in resolving this issue.

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

No branches or pull requests

1 participant