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

✨ Add hr_option (Both, High res only, Low res only) #2379

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

huchenlei
Copy link
Collaborator

Closes #2378.

This PR removes global option control_net_no_high_res_fix, and adds the radio selection for hr option per ControlNet unit.

🎨 Only show when relevant

✅ Add unit test
@huchenlei
Copy link
Collaborator Author

Previously disabling highres pass was available so I guess there is sufficient usecases being explored. Here just some novel uses enabled by this PR.

Now you can use tile model to control highres pass.

ControlNet input image:
download (2)

Step1: non-highres generation, with canny edge unit:
00008-1924817058

Step2: Reuse seed. Highres generation with 2 units:

  • canny edge (set to lowres pass only)
  • tile (input is the generation result from step1) (set to highres pass only)
    00009-1924817058_hires

I am not sure whether this method is superior than the img2img upscale method (tile + SD Ultimate upscale script), but at least there is another option now 😄.

@huchenlei
Copy link
Collaborator Author

Tile + SD Ultimate upscale script with same seed:
00001-1924817058_img2img

The highres fix method seem to generate less noisy irrelevant details.

@huchenlei
Copy link
Collaborator Author

image

@huchenlei
Copy link
Collaborator Author

This feature is also requested in #2249.

@huchenlei huchenlei merged commit 7aaf263 into Mikubill:main Jan 1, 2024
1 check passed
@huchenlei huchenlei deleted the hires branch January 1, 2024 05:41
@huchenlei
Copy link
Collaborator Author

Direct t2i with tile model, 2x size (1024x1536) and same seed:

00000-1924817058_t2i

Hires result has some slight difference in details, probably because added noise during diffusion process. Conclusion is probably not worth doing tile with hires fix?

@dark-edgelord
Copy link

I don't see this option at all in the UI anywhere, even with hiresfix enabled.

@huchenlei
Copy link
Collaborator Author

You need A1111 1.7.0+ for the UI to work properly.

@dark-edgelord
Copy link

I have that, but I found out what the issue is. It only shows up when clicking the hires fix check box, not the accordion (that also ticks the box automatically).

image

Clicking green works, red doesn't.

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.

[Feature Request] More hires fix options
2 participants