Closed ahfmrptEkd closed 10 months ago
base code 작성 완료
ControlNet git을 참조 하여 코드 작성함.
ControlNet 관련 git issue를 통해 multi controlnet 적용을 확인
Route POST /controlnet/detect api 를 통해 preprocessor만 가동하게하는것도 가능함. (하지만 setting에서 동시에 설정이 가능할것 같음.)
아직 DW pose를 적용이 가능한지 구현후 실현해봐함. (contorlnet/detect api를 통해 전처리 과정이 필요한지 확인 필요. & 자체 적인 setting에 포함이 되어 있어보임.)
Embedding 의 경우에는 "negative_prompt"에 같이 추가하여 가중치를 적용하면 쓸 수 있음.
override_settings 와 alwayson_scripts 의 차이를 알아봐야 할 듯함. 지금 알아본 바로는
web ui WIKI 와 관련 git 참조함.
model:str='PastelMix.safetensors'
vae:str="vae-ft-ema-560000-ema-pruned.safetensors"
override_settings= {
'sd_model_checkpoint': model,
"sd_vae": vae,
override_payload = {
"override_settings": override_settings
}
payload.update(override_payload)
}
위 코드를 사용해서 모델과 VAE 추가 하여 load 가능
model:str='PastelMix.safetensors'
vae:str="vae-ft-ema-560000-ema-pruned.safetensors"
paylod = {
'sd_model_checkpoint': model,
"sd_vae": vae,
}
git disscusion 을 참조하여 LoRA 적용 & embedding 코드 적용
사진 포즈가 될 참조 input image 빛의 구도를 해줄 가이드 input image
포즈 사진 20개 정도 수집 완료.
선별 & 적용할 코드 준비 중
ControlNet - WARNING - [dw_openpose_full.processor_res] Invalid value(-1), using default value 512.
# for i in r['images']:
# image = Image.open(io.BytesIO(base64.b64decode(i.split(",",1)[0])))
# png_payload = {
# "image": "data:image/png;base64," + i
# }
# response2 = requests.post(url=f'{url}/sdapi/v1/png-info', json=png_payload)
# pnginfo = PngImagePlugin.PngInfo()
# pnginfo.add_text("parameters", response2.json().get("info"))
# image.save(f'{output}.png', pnginfo=pnginfo)
controlnet official git을 통해 base code에서의 파라미터 조정함. 참고
openpose_full
dw openpose
차이가 많이 나옴
resize 의 경우는 생성하는 이미지의 크기와 포즈의 크기가 달라 꾸겨지는 현상이 보임. 그래서 just resize 해서 크기, Envelope은 큰 차원을 맞춤 == 비율 유지됨. 2가 좀 더 비율이 괜찮은 것 같음.
기능 구현을 위한 issue
할 일(Tasks)
base code
Extensions - 추가 기능
선택 조건 구현