camenduru commited on
Commit
179e920
1 Parent(s): c54dc03

Update worker_runpod.py

Browse files
Files changed (1) hide show
  1. worker_runpod.py +14 -14
worker_runpod.py CHANGED
@@ -61,14 +61,14 @@ def generate(input):
61
 
62
  input_image = values['input_image']
63
  input_image = download_file(url=input_image, save_dir='/content/ComfyUI/input', file_name='input_image')
64
- style_imag1 = values['style_imag1']
65
- style_imag1 = download_file(url=style_imag1, save_dir='/content/ComfyUI/input', file_name='style_imag1')
66
- style_imag2 = values['style_imag2']
67
- style_imag2 = download_file(url=style_imag2, save_dir='/content/ComfyUI/input', file_name='style_imag2')
68
- style_imag3 = values['style_imag3']
69
- style_imag3 = download_file(url=style_imag3, save_dir='/content/ComfyUI/input', file_name='style_imag3')
70
- style_imag4 = values['style_imag4']
71
- style_imag4 = download_file(url=style_imag4, save_dir='/content/ComfyUI/input', file_name='style_imag4')
72
  positive_prompt = values['positive_prompt']
73
  negative_prompt = values['negative_prompt']
74
  seed = values['seed']
@@ -92,12 +92,12 @@ def generate(input):
92
  caption_length = values['caption_length']
93
  low_vram = values['low_vram']
94
  positive_prompt = Joy_caption_two.generate(joy_two_pipeline, input_image, caption_type, caption_length, low_vram)[0]
95
- style_imag1 = LoadImage.load_image(style_imag1)[0]
96
- style_imag2 = LoadImage.load_image(style_imag2)[0]
97
- style_imag3 = LoadImage.load_image(style_imag3)[0]
98
- style_imag4 = LoadImage.load_image(style_imag4)[0]
99
- batch_image1 = ImageBatch.batch(style_imag1, style_imag2)[0]
100
- batch_image2 = ImageBatch.batch(style_imag3, style_imag4)[0]
101
  batch_image3 = ImageBatch.batch(batch_image1, batch_image2)[0]
102
  ip_unet = AV_IPAdapter.apply_ip_adapter("ip-adapter_sdxl_vit-h.safetensors", "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", lora_unet, batch_image3, weight=1.5, weight_type="style transfer", start_at=0, end_at=1)[0]
103
  canny_image = AV_ControlNetPreprocessor.detect_controlnet(input_image, preprocessor="canny", sd_version="sdxl", resolution=640, preprocessor_override="None")[0]
 
61
 
62
  input_image = values['input_image']
63
  input_image = download_file(url=input_image, save_dir='/content/ComfyUI/input', file_name='input_image')
64
+ style_image1 = values['style_image1']
65
+ style_image1 = download_file(url=style_image1, save_dir='/content/ComfyUI/input', file_name='style_image1')
66
+ style_image2 = values['style_image2']
67
+ style_image2 = download_file(url=style_image2, save_dir='/content/ComfyUI/input', file_name='style_image2')
68
+ style_image3 = values['style_image3']
69
+ style_image3 = download_file(url=style_image3, save_dir='/content/ComfyUI/input', file_name='style_image3')
70
+ style_image4 = values['style_image4']
71
+ style_image4 = download_file(url=style_image4, save_dir='/content/ComfyUI/input', file_name='style_image4')
72
  positive_prompt = values['positive_prompt']
73
  negative_prompt = values['negative_prompt']
74
  seed = values['seed']
 
92
  caption_length = values['caption_length']
93
  low_vram = values['low_vram']
94
  positive_prompt = Joy_caption_two.generate(joy_two_pipeline, input_image, caption_type, caption_length, low_vram)[0]
95
+ style_image1 = LoadImage.load_image(style_image1)[0]
96
+ style_image2 = LoadImage.load_image(style_image2)[0]
97
+ style_image3 = LoadImage.load_image(style_image3)[0]
98
+ style_image4 = LoadImage.load_image(style_image4)[0]
99
+ batch_image1 = ImageBatch.batch(style_image1, style_image2)[0]
100
+ batch_image2 = ImageBatch.batch(style_image3, style_image4)[0]
101
  batch_image3 = ImageBatch.batch(batch_image1, batch_image2)[0]
102
  ip_unet = AV_IPAdapter.apply_ip_adapter("ip-adapter_sdxl_vit-h.safetensors", "CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", lora_unet, batch_image3, weight=1.5, weight_type="style transfer", start_at=0, end_at=1)[0]
103
  canny_image = AV_ControlNetPreprocessor.detect_controlnet(input_image, preprocessor="canny", sd_version="sdxl", resolution=640, preprocessor_override="None")[0]