Lifeinhockey commited on
Commit
3cdcbbb
·
verified ·
1 Parent(s): 9762b68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -71,7 +71,7 @@ def preprocess_image(image, target_width, target_height): # Преобразуе
71
  return image
72
 
73
  pipe_default = get_lora_sd_pipeline(lora_dir='./lora_man_animestyle', base_model_name_or_path=model_default, dtype=torch_dtype).to(device)
74
- #pipe_controlnet = StableDiffusionControlNetPipeline.from_pretrained(
75
  # pipe_controlnet = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
76
  # model_default,
77
  # controlnet=controlnet,
@@ -104,7 +104,8 @@ def infer(
104
 
105
  # Генерация с Ip_Adapter
106
  if use_ip_adapter and ip_source_image is not None and ip_adapter_image is not None:
107
- pipe_ip_adapter = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
 
108
  model_default,
109
  controlnet=controlnet,
110
  torch_dtype=torch_dtype
 
71
  return image
72
 
73
  pipe_default = get_lora_sd_pipeline(lora_dir='./lora_man_animestyle', base_model_name_or_path=model_default, dtype=torch_dtype).to(device)
74
+ # pipe_controlnet = StableDiffusionControlNetPipeline.from_pretrained(
75
  # pipe_controlnet = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
76
  # model_default,
77
  # controlnet=controlnet,
 
104
 
105
  # Генерация с Ip_Adapter
106
  if use_ip_adapter and ip_source_image is not None and ip_adapter_image is not None:
107
+ pipe_ip_adapter = StableDiffusionControlNetPipeline.from_pretrained(
108
+ #pipe_ip_adapter = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
109
  model_default,
110
  controlnet=controlnet,
111
  torch_dtype=torch_dtype