Bing-su / adetailer

Auto detecting, masking and inpainting with detection model.
GNU Affero General Public License v3.0
4.09k stars 318 forks source link

[Feature Request]: hires 사용시 디테일러 업스케일러만 변경할수있는 기능 #711

Open kakaruYH03 opened 6 days ago

kakaruYH03 commented 6 days ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

hires 사용시 업스케일링후 -> 디테일러 적용이 되는걸로아는데 hires 강도 0.2, swinlr_4x -> 디테일러 적용을

디테일러 인페이팅 설정에 [별도의 샘플러 사용] 같은 항목 추가로 hires 강도 0.2, swinlr_4x -> 얼굴 영역만 hires 강도 0.4, Latent -> 디테일러 적용 할수 있는 기능 추가가 가능할까요? No response

Describe alternatives you've considered

No response

Additional context

1543
dosubot[bot] commented 6 days ago

@kakaruYH03 안녕하세요! 저는 Dosu라고 합니다. 버그를 해결하고 질문에 답변하며 기여자가 될 수 있도록 도와드리는 봇입니다. 도와드릴 수 있는 점이 있으면 언제든지 말씀해주세요! 🤖

Yes, a feature can be added to allow changing only the detailer upscaler when using hires, such as applying different hires strengths and upscalers to specific areas like the face. The adetailer script already includes mechanisms for dynamic denoise strength and inpainting settings based on bounding box size, which can be extended to support different upscalers for specific areas.

For example, the get_dynamic_denoise_strength function dynamically adjusts the denoise strength based on the bounding box size. Similarly, you can implement a function to dynamically select and apply different upscalers for specific areas.

Here's a conceptual implementation:

def get_dynamic_upscaler(upscaler: str, bbox: Sequence[Any], image_size: tuple[int, int]) -> str:
    # Logic to determine the appropriate upscaler based on bbox and image size
    # For example, use a different upscaler for faces
    if is_face_bbox(bbox):
        return "face_upscaler"
    return upscaler

def is_face_bbox(bbox: Sequence[Any]) -> bool:
    # Placeholder function to determine if the bbox corresponds to a face
    # Implement actual face detection logic here
    return True

# Example usage in the processing pipeline
upscaler = get_dynamic_upscaler(default_upscaler, bbox, image_size)
apply_upscaler(image, upscaler)

This approach allows you to dynamically select and apply different upscalers based on the specific areas of the image, such as the face [1].

To continue talking to Dosu, mention @dosu.

Bing-su commented 1 day ago

한번 알아볼게요