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

How to use diffpure extension in sd-webui version 1.7 #7

Open
ZhangShao7 opened this issue Mar 14, 2024 · 0 comments
Open

How to use diffpure extension in sd-webui version 1.7 #7

ZhangShao7 opened this issue Mar 14, 2024 · 0 comments

Comments

@ZhangShao7
Copy link

ZhangShao7 commented Mar 14, 2024

Modify /extensions/sd-webui-diffpure/scripts/diffpure.py
At the first
from modules.shared import devices
to
from modules import devices

Then at the end
for pic in tqdm(pics, 'Processing pics'):
# PIL -> Tensor
img = transform((pic)).unsqueeze(0)
add
img = transform((pic)).unsqueeze(0)
img = img[:, :3, :, :] # Keep only the first three channels and discard the fourth channel

Modify /models/DiffPure/imagenet.yml
diffusion_steps and timestep_respacing to 10000
to get better pur img quality

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