Spaces:
Runtime error
Runtime error
Update worker_runpod.py
Browse files- 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 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
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 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
batch_image1 = ImageBatch.batch(
|
100 |
-
batch_image2 = ImageBatch.batch(
|
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]
|