jasperai / Flux.1-dev-Controlnet-Upscaler

세부 정보

파일 다운로드

모델 설명

이것은 Jasper 연구팀이 개발한 저해상도 이미지용 Flux.1-dev ControlNet입니다.

사용 방법

이 모델은 diffusers 라이브러리와 직접 사용할 수 있습니다.

import torch
from diffusers.utils import load_image
from diffusers import FluxControlNetModel
from diffusers.pipelines import FluxControlNetPipeline

# 파이프라인 로드
controlnet = FluxControlNetModel.from_pretrained(
  "jasperai/Flux.1-dev-Controlnet-Upscaler",
  torch_dtype=torch.bfloat16
)
pipe = FluxControlNetPipeline.from_pretrained(
  "black-forest-labs/FLUX.1-dev",
  controlnet=controlnet,
  torch_dtype=torch.bfloat16
)
pipe.to("cuda")

# 제어 이미지 로드
control_image = load_image(
  "https://huggingface.co/jasperai/Flux.1-dev-Controlnet-Upscaler/resolve/main/examples/input.jpg"
)

w, h = control_image.size

# 4배 확대
control_image = control_image.resize((w * 4, h * 4))

image = pipe(
    prompt="", 
    control_image=control_image,
    controlnet_conditioning_scale=0.6,
    num_inference_steps=28, 
    guidance_scale=3.5,
    height=control_image.size[1],
    width=control_image.size[0]
).images[0]
image

학습

이 모델은 [1]과 유사한 방식으로, 실사 이미지를 입력으로 받아 이미지 노이징(가우시안, 포아송), 블러링, JPEG 압축 등 여러 가지 왜곡을 조합하여 인공적으로 저화질로 변형한 합성 복합 데이터 손상 스킴으로 학습되었습니다.

[1] Wang, Xintao, et al. "Real-esrgan: Training real-world blind super-resolution with pure synthetic data." Proceedings of the IEEE/CVF international conference on computer vision. 2021.

라이선스

이 모델은 Flux.1-dev 모델 라이선스 하에 제공됩니다.

이 모델로 만든 이미지

이미지를 찾을 수 없습니다.