{"id":115648,"date":"2026-10-12T21:08:55","date_gmt":"2026-10-12T13:08:55","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/115648.html"},"modified":"2026-10-12T21:08:55","modified_gmt":"2026-10-12T13:08:55","slug":"%e6%9c%ac%e5%9c%b0-ai-%e6%bc%ab%e5%89%a7%e6%b5%81%e6%b0%b4%e7%ba%bf%e6%a8%a1%e5%9e%8b%e7%bc%93%e5%ad%98%e4%b8%8e%e7%89%b9%e5%be%81%e5%90%91%e9%87%8f%e6%8c%81%e4%b9%85%e5%8c%96%ef%bc%9aipadapter","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/115648.html","title":{"rendered":"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218"},"content":{"rendered":"<h3>\u6458\u8981<\/h3>\n<p>\u5728 AI \u6f2b\u5267\u672c\u5730\u6279\u91cf\u6e32\u67d3\u6d41\u7a0b\u4e2d&#xff0c;\u89d2\u8272\u53c2\u8003\u56fe\u7684\u91cd\u590d\u7f16\u7801\u662f\u6d41\u6c34\u7ebf\u6027\u80fd\u74f6\u9888\u4e4b\u4e00\u3002\u6bcf\u6b21\u5207\u6362\u5206\u955c\u65f6\u53cd\u590d\u52a0\u8f7d IPAdapter \u7f16\u7801\u5668\u3001\u5bf9\u53c2\u8003\u4eba\u7269\u56fe\u50cf\u91cd\u65b0\u63d0\u53d6\u7279\u5f81\u5411\u91cf&#xff0c;\u4e0d\u4ec5\u5360\u7528\u5927\u91cf GPU \u663e\u5b58&#xff0c;\u8fd8\u4f1a\u5e26\u6765\u6570\u5341\u79d2\u7684\u989d\u5916\u63a8\u7406\u5ef6\u8fdf&#xff0c;\u9891\u7e41\u52a0\u8f7d\u5378\u8f7d\u6a21\u578b\u8fd8\u4f1a\u52a0\u5267\u663e\u5b58\u788e\u7247&#xff0c;\u6781\u6613\u89e6\u53d1 OOM\u3002\u672c\u6587\u9488\u5bf9\u8be5\u75db\u70b9&#xff0c;\u8bbe\u8ba1\u4e00\u5957\u89d2\u8272\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\u7f13\u5b58\u6c60&#xff0c;\u4e00\u6b21\u6027\u63d0\u53d6 IPAdapter embedding \u5e76\u5e8f\u5217\u5316\u4fdd\u5b58\u81f3\u672c\u5730\u78c1\u76d8&#xff0c;\u540e\u7eed\u6240\u6709\u540c\u89d2\u8272\u5206\u955c\u76f4\u63a5\u52a0\u8f7d\u9884\u8ba1\u7b97\u7279\u5f81&#xff0c;\u8df3\u8fc7\u91cd\u590d\u7f16\u7801\u8fc7\u7a0b&#xff1b;\u914d\u5957\u5b9e\u73b0\u5185\u5b58\u6c60\u7ba1\u7406\u673a\u5236&#xff0c;\u52a8\u6001\u63a7\u5236\u5e38\u9a7b GPU \u6a21\u578b\u96c6\u5408&#xff0c;\u6309\u9700\u5378\u8f7d\u95f2\u7f6e\u6a21\u578b\u3002\u6574\u5957\u65b9\u6848\u57fa\u4e8e ComfyUI \u672c\u5730\u90e8\u7f72&#xff0c;\u9002\u7528\u4e8e\u591a\u89d2\u8272\u3001\u957f\u5e8f\u5217\u6f2b\u5267\u9879\u76ee&#xff0c;\u9644\u5e26\u7279\u5f81\u63d0\u53d6\u3001\u5e8f\u5217\u5316\u8bfb\u5199\u3001\u7f13\u5b58\u6c60\u8c03\u5ea6\u3001\u7f13\u5b58\u5931\u6548\u6821\u9a8c\u5b8c\u6574 Python \u4ee3\u7801&#xff0c;\u53ef\u76f4\u63a5\u96c6\u6210\u5230\u73b0\u6709\u6f2b\u5267\u6e32\u67d3\u6d41\u6c34\u7ebf\u3002<\/p>\n<p>\u5b8c\u6574\u8d44\u6e90\u6559\u7a0b\u6587\u7ae0\u8bf7\u770b\u8fd9\u4e00\u7bc7&#xff1a;<\/p>\n<p>\u96f6\u57fa\u7840\u672c\u5730\u90e8\u7f72AI\u6f2b\u5267\u5168\u81ea\u52a8\u751f\u4ea7\u7ebf&#xff1a;Stable Diffusion&#043;ComfyUI&#043;OpenClaw\u73af\u5883\u642d\u5efa\u3001\u4f9d\u8d56\u6392\u9519\u4e0e\u4ece\u96f6\u843d\u5730\u6559\u7a0b-CSDN\u535a\u5ba2<\/p>\n<h3>1 \u539f\u7406\u5206\u6790\u4e0e\u73b0\u5b58\u95ee\u9898<\/h3>\n<p>IPAdapter \u7684\u5de5\u4f5c\u6d41\u7a0b\u5206\u4e3a\u4e24\u6b65&#xff1a;<\/p>\n<li>\u56fe\u50cf\u7f16\u7801\u5668\u8bfb\u53d6\u89d2\u8272\u53c2\u8003\u56fe&#xff0c;\u901a\u8fc7 CLIP \u56fe\u50cf\u7f16\u7801\u5668\u63d0\u53d6\u56fe\u50cf Embedding \u7279\u5f81\u5411\u91cf&#xff1b;<\/li>\n<li>\u5c06\u7279\u5f81\u5411\u91cf\u4f20\u5165 IPAdapter&#xff0c;\u5728\u6269\u6563\u6a21\u578b\u91c7\u6837\u9636\u6bb5\u6ce8\u5165\u89d2\u8272\u8eab\u4efd\u4fe1\u606f&#xff0c;\u4fdd\u8bc1\u8de8\u5e27\u89d2\u8272\u4e00\u81f4\u6027\u3002<\/li>\n<p>\u4f20\u7edf\u6d41\u6c34\u7ebf\u7f3a\u9677&#xff1a;<\/p>\n<li>\u540c\u4e00\u4e2a\u89d2\u8272&#xff0c;\u4e0a\u767e\u4e2a\u5206\u955c\u4f1a\u91cd\u590d\u6267\u884c CLIP \u56fe\u50cf\u7f16\u7801&#xff0c;\u5927\u91cf\u91cd\u590d\u8ba1\u7b97&#xff1b;<\/li>\n<li>CLIP \u56fe\u50cf\u7f16\u7801\u5668\u5e38\u9a7b\u663e\u5b58\u4f1a\u5360\u7528\u989d\u5916\u663e\u5b58&#xff0c;\u9891\u7e41\u52a0\u8f7d \/ \u91ca\u653e\u7f16\u7801\u5668\u9020\u6210\u663e\u5b58\u788e\u7247\u5316&#xff1b;<\/li>\n<li>\u9879\u76ee\u5207\u6362\u3001\u89d2\u8272\u590d\u7528\u573a\u666f\u4e0b&#xff0c;\u65e0\u6cd5\u8de8\u6e32\u67d3\u4f1a\u8bdd\u590d\u7528\u4e4b\u524d\u8ba1\u7b97\u597d\u7684\u89d2\u8272\u7279\u5f81&#xff0c;\u6bcf\u6b21\u91cd\u542f\u6d41\u6c34\u7ebf\u9700\u8981\u91cd\u65b0\u7f16\u7801\u3002<\/li>\n<p>\u89e3\u51b3\u65b9\u6848\u6838\u5fc3\u601d\u8def&#xff1a;<\/p>\n<p>\u9884\u63d0\u53d6\u89d2\u8272 Embedding&#xff0c;\u5e8f\u5217\u5316\u4fdd\u5b58\u4e3a\u672c\u5730\u4e8c\u8fdb\u5236\u6587\u4ef6&#xff0c;\u6784\u5efa\u5168\u5c40\u89d2\u8272\u7279\u5f81\u7f13\u5b58\u6c60\u3002\u6e32\u67d3\u540c\u89d2\u8272\u5206\u955c\u65f6\u76f4\u63a5\u52a0\u8f7d\u9884\u5b58\u5411\u91cf&#xff0c;\u4e0d\u518d\u8c03\u7528 CLIP \u56fe\u50cf\u7f16\u7801\u5668&#xff1b;\u5185\u5b58\u6c60\u8d1f\u8d23\u7ba1\u7406\u5e38\u9a7b\u6a21\u578b&#xff0c;\u95f2\u7f6e\u6a21\u578b\u8d85\u65f6\u81ea\u52a8\u5378\u8f7d\u3002<\/p>\n<h3>2 \u524d\u7f6e\u4f9d\u8d56\u5b89\u88c5\u6307\u4ee4<\/h3>\n<p># \u5b89\u88c5\u5e8f\u5217\u5316\u3001\u56fe\u50cf\u5904\u7406\u3001\u5411\u91cf\u8fd0\u7b97\u4f9d\u8d56<br \/>\npip install torch safetensors pillow numpy pynvml<\/p>\n<h3>3 \u89d2\u8272\u7279\u5f81\u63d0\u53d6\u4e0e\u6301\u4e45\u5316\u5b58\u50a8\u4ee3\u7801<\/h3>\n<p>\u4f7f\u7528 safetensors \u683c\u5f0f\u4fdd\u5b58\u7279\u5f81\u5411\u91cf&#xff0c;\u76f8\u6bd4 pickle \u66f4\u52a0\u5b89\u5168&#xff0c;\u652f\u6301\u5f20\u91cf\u5feb\u901f\u8bfb\u5199&#xff0c;\u9002\u5408\u5b58\u50a8 Embedding\u3002<\/p>\n<p>import torch<br \/>\nimport safetensors.torch<br \/>\nfrom PIL import Image<br \/>\nimport os<\/p>\n<p>class CharacterFeatureExtractor:<br \/>\n    def __init__(self, ip_encoder, device&#061;&#034;cuda&#034;):<br \/>\n        self.encoder &#061; ip_encoder<br \/>\n        self.device &#061; device<\/p>\n<p>    def extract_ref_embedding(self, ref_img_path):<br \/>\n        &#034;&#034;&#034;\u8f93\u5165\u89d2\u8272\u53c2\u8003\u56fe&#xff0c;\u8f93\u51faIPAdapter\u56fe\u50cf\u7279\u5f81\u5411\u91cf&#034;&#034;&#034;<br \/>\n        img &#061; Image.open(ref_img_path).convert(&#034;RGB&#034;)<br \/>\n        with torch.no_grad():<br \/>\n            embedding &#061; self.encoder(img).to(self.device, dtype&#061;torch.float16)<br \/>\n        return embedding<\/p>\n<p>    def save_embedding(self, embedding, save_path, char_meta: dict):<br \/>\n        &#034;&#034;&#034;\u4fdd\u5b58\u7279\u5f81\u5411\u91cf&#043;\u89d2\u8272\u5143\u4fe1\u606f\u5230safetensors\u6587\u4ef6&#034;&#034;&#034;<br \/>\n        save_dict &#061; {<br \/>\n            &#034;embedding&#034;: embedding.cpu(),<br \/>\n            &#034;meta&#034;: char_meta<br \/>\n        }<br \/>\n        safetensors.torch.save_file(save_dict, save_path)<br \/>\n        print(f&#034;\u89d2\u8272\u7279\u5f81\u5df2\u6301\u4e45\u5316\u4fdd\u5b58\u81f3&#xff1a;{save_path}&#034;)<\/p>\n<p>    def load_embedding(self, file_path):<br \/>\n        &#034;&#034;&#034;\u4ece\u672c\u5730\u6587\u4ef6\u52a0\u8f7d\u9884\u8ba1\u7b97\u7279\u5f81\u5411\u91cf&#034;&#034;&#034;<br \/>\n        tensor_dict &#061; safetensors.torch.load_file(file_path)<br \/>\n        embedding &#061; tensor_dict[&#034;embedding&#034;].to(self.device, dtype&#061;torch.float16)<br \/>\n        meta &#061; tensor_dict[&#034;meta&#034;]<br \/>\n        return embedding, meta<\/p>\n<p>if __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    # \u793a\u4f8b&#xff1a;\u4e00\u6b21\u6027\u63d0\u53d6\u89d2\u8272\u7279\u5f81\u5e76\u4fdd\u5b58<br \/>\n    # ip_encoder\u4e3aComfyUI\u52a0\u8f7d\u540e\u7684CLIP\u56fe\u50cf\u7f16\u7801\u5668\u5b9e\u4f8b<br \/>\n    # encoder &#061; load_clip_encoder()<br \/>\n    extractor &#061; CharacterFeatureExtractor(ip_encoder&#061;None)<br \/>\n    char_metadata &#061; {<br \/>\n        &#034;character_name&#034;: &#034;\u7537\u4e3b_\u5c0f\u660e&#034;,<br \/>\n        &#034;style&#034;: &#034;\u6f2b\u5267\u624b\u7ed8&#034;,<br \/>\n        &#034;create_time&#034;: 1765000000,<br \/>\n        &#034;ref_image&#034;: &#034;ref_man.png&#034;<br \/>\n    }<br \/>\n    # emb &#061; extractor.extract_ref_embedding(&#034;.\/ref_man.png&#034;)<br \/>\n    # extractor.save_embedding(emb, &#034;.\/char_cache\/char_man.safetensors&#034;, char_metadata)<br \/>\n    # emb_load, meta_info &#061; extractor.load_embedding(&#034;.\/char_cache\/char_man.safetensors&#034;)<\/p>\n<h3>4 \u5168\u5c40\u89d2\u8272\u7279\u5f81\u7f13\u5b58\u6c60\u5b9e\u73b0<\/h3>\n<p>\u5185\u5b58\u7f13\u5b58\u6c60\u7ba1\u7406\u5df2\u7ecf\u52a0\u8f7d\u5230\u663e\u5b58\u4e2d\u7684 Embedding&#xff0c;\u652f\u6301 LRU \u6700\u8fd1\u6700\u5c11\u4f7f\u7528\u6dd8\u6c70\u7b56\u7565\u3002\u5f53\u7f13\u5b58\u6570\u91cf\u8d85\u8fc7\u4e0a\u9650&#xff0c;\u81ea\u52a8\u91ca\u653e\u957f\u65f6\u95f4\u672a\u4f7f\u7528\u7684\u89d2\u8272\u7279\u5f81&#xff0c;\u91ca\u653e\u663e\u5b58\u3002<\/p>\n<p>import time<br \/>\nfrom collections import OrderedDict<br \/>\nimport torch<\/p>\n<p>class CharEmbeddingCachePool:<br \/>\n    def __init__(self, max_cache_num&#061;4, cache_dir&#061;&#034;.\/char_cache&#034;):<br \/>\n        self.cache_dir &#061; cache_dir<br \/>\n        os.makedirs(self.cache_dir, exist_ok&#061;True)<br \/>\n        self.max_cache_num &#061; max_cache_num<br \/>\n        # LRU\u7f13\u5b58\u5b57\u5178<br \/>\n        self.lru_cache &#061; OrderedDict()<\/p>\n<p>    def get_character_embedding(self, char_id, ref_img_path, encoder):<br \/>\n        &#034;&#034;&#034;\u83b7\u53d6\u89d2\u8272\u7279\u5f81&#xff0c;\u5185\u5b58\u6c60\u6709\u5219\u76f4\u63a5\u53d6&#xff1b;\u65e0\u5219\u4ece\u78c1\u76d8\u52a0\u8f7d&#xff0c;\u78c1\u76d8\u65e0\u5219\u5b9e\u65f6\u7f16\u7801&#034;&#034;&#034;<br \/>\n        if char_id in self.lru_cache:<br \/>\n            # \u66f4\u65b0LRU\u987a\u5e8f&#xff0c;\u6807\u8bb0\u4e3a\u6700\u8fd1\u4f7f\u7528<br \/>\n            self.lru_cache.move_to_end(char_id)<br \/>\n            cache_item &#061; self.lru_cache[char_id]<br \/>\n            return cache_item[&#034;embedding&#034;], cache_item[&#034;meta&#034;]<\/p>\n<p>        cache_file &#061; os.path.join(self.cache_dir, f&#034;{char_id}.safetensors&#034;)<br \/>\n        extractor &#061; CharacterFeatureExtractor(encoder)<br \/>\n        if os.path.exists(cache_file):<br \/>\n            embedding, meta &#061; extractor.load_embedding(cache_file)<br \/>\n        else:<br \/>\n            # \u78c1\u76d8\u4e0d\u5b58\u5728&#xff0c;\u5b9e\u65f6\u7f16\u7801\u5e76\u4fdd\u5b58<br \/>\n            embedding &#061; extractor.extract_ref_embedding(ref_img_path)<br \/>\n            meta &#061; {&#034;char_id&#034;: char_id, &#034;ref&#034;: ref_img_path}<br \/>\n            extractor.save_embedding(embedding, cache_file, meta)<\/p>\n<p>        # LRU\u7f13\u5b58\u6c60\u6ea2\u51fa\u6dd8\u6c70\u903b\u8f91<br \/>\n        if len(self.lru_cache) &gt;&#061; self.max_cache_num:<br \/>\n            old_key, old_data &#061; self.lru_cache.popitem(last&#061;False)<br \/>\n            del old_data[&#034;embedding&#034;]<br \/>\n            torch.cuda.empty_cache()<br \/>\n            print(f&#034;\u7f13\u5b58\u6c60\u5df2\u6ee1&#xff0c;\u6dd8\u6c70\u89d2\u8272\u7f13\u5b58: {old_key}&#xff0c;\u91ca\u653e\u663e\u5b58&#034;)<\/p>\n<p>        self.lru_cache[char_id] &#061; {<br \/>\n            &#034;embedding&#034;: embedding,<br \/>\n            &#034;meta&#034;: meta,<br \/>\n            &#034;last_access&#034;: time.time()<br \/>\n        }<br \/>\n        return embedding, meta<\/p>\n<p>    def clear_all_cache(self):<br \/>\n        self.lru_cache.clear()<br \/>\n        torch.cuda.empty_cache()<br \/>\n        print(&#034;\u5185\u5b58\u7279\u5f81\u7f13\u5b58\u5168\u90e8\u6e05\u7a7a&#034;)<\/p>\n<p># \u4f7f\u7528\u793a\u4f8b<br \/>\nif __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    pool &#061; CharEmbeddingCachePool(max_cache_num&#061;3)<br \/>\n    # emb, meta &#061; pool.get_character_embedding(&#034;char_001&#034;, &#034;.\/ref_man.png&#034;, encoder)<\/p>\n<h3>5 GPU \u6a21\u578b\u5185\u5b58\u6c60&#xff1a;\u52a8\u6001\u5e38\u9a7b\u6a21\u578b\u7ba1\u7406<\/h3>\n<p>\u63a7\u5236 GPU \u4e0a\u5e38\u9a7b\u6a21\u578b&#xff0c;\u533a\u5206\u5e38\u9a7b\u6a21\u578b\u3001\u4e34\u65f6\u6a21\u578b\u3002\u95f2\u7f6e\u6a21\u578b\u8d85\u8fc7\u8d85\u65f6\u65f6\u95f4\u81ea\u52a8\u5378\u8f7d&#xff0c;\u5e73\u8861\u63a8\u7406\u901f\u5ea6\u4e0e\u663e\u5b58\u5360\u7528&#xff0c;\u89e3\u51b3\u591a\u89d2\u8272\u6f2b\u5267\u6e32\u67d3\u663e\u5b58\u788e\u7247\u95ee\u9898\u3002<\/p>\n<p>import torch<br \/>\nimport time<\/p>\n<p>class ModelVRAMPool:<br \/>\n    def __init__(self, idle_timeout&#061;120):<br \/>\n        self.resident_models &#061; dict()<br \/>\n        self.idle_timeout &#061; idle_timeout<\/p>\n<p>    def register_model(self, model_name, model_obj):<br \/>\n        &#034;&#034;&#034;\u6ce8\u518c\u6a21\u578b\u5230\u663e\u5b58\u6c60&#034;&#034;&#034;<br \/>\n        self.resident_models[model_name] &#061; {<br \/>\n            &#034;model&#034;: model_obj,<br \/>\n            &#034;last_used&#034;: time.time()<br \/>\n        }<br \/>\n        print(f&#034;\u6a21\u578b {model_name} \u52a0\u8f7d\u81f3GPU\u5185\u5b58\u6c60\u5e38\u9a7b&#034;)<\/p>\n<p>    def get_model(self, model_name):<br \/>\n        if model_name not in self.resident_models:<br \/>\n            return None<br \/>\n        self.resident_models[model_name][&#034;last_used&#034;] &#061; time.time()<br \/>\n        return self.resident_models[model_name][&#034;model&#034;]<\/p>\n<p>    def clean_idle_models(self):<br \/>\n        &#034;&#034;&#034;\u626b\u63cf\u8d85\u65f6\u95f2\u7f6e\u6a21\u578b&#xff0c;\u5378\u8f7d\u5e76\u91ca\u653e\u663e\u5b58&#034;&#034;&#034;<br \/>\n        now &#061; time.time()<br \/>\n        remove_list &#061; []<br \/>\n        for name, item in self.resident_models.items():<br \/>\n            idle_duration &#061; now &#8211; item[&#034;last_used&#034;]<br \/>\n            if idle_duration &gt; self.idle_timeout:<br \/>\n                remove_list.append(name)<br \/>\n        for name in remove_list:<br \/>\n            del self.resident_models[name][&#034;model&#034;]<br \/>\n            del self.resident_models[name]<br \/>\n            torch.cuda.empty_cache()<br \/>\n            print(f&#034;\u95f2\u7f6e\u6a21\u578b {name} \u5df2\u4ece\u663e\u5b58\u5378\u8f7d&#xff0c;\u91ca\u653e\u663e\u5b58&#034;)<\/p>\n<p># \u5b9a\u65f6\u4efb\u52a1&#xff0c;\u653e\u5728\u4e3b\u5faa\u73af\u91cc\u5b9a\u671f\u6267\u884c<br \/>\nif __name__ &#061;&#061; &#034;__main__&#034;:<br \/>\n    vram_pool &#061; ModelVRAMPool(idle_timeout&#061;180)<br \/>\n    # vram_pool.register_model(&#034;sdxl_base&#034;, loaded_sdxl_pipe)<br \/>\n    # while True:<br \/>\n    #     vram_pool.clean_idle_models()<br \/>\n    #     time.sleep(30)<\/p>\n<h3>6 \u7f13\u5b58\u6821\u9a8c\u4e0e\u54c8\u5e0c\u9632\u7be1\u6539\u903b\u8f91<\/h3>\n<p>\u4e3a\u89d2\u8272\u53c2\u8003\u56fe\u589e\u52a0 sha256 \u54c8\u5e0c\u6821\u9a8c&#xff0c;\u5f53\u539f\u59cb\u53c2\u8003\u56fe\u7247\u53d1\u751f\u4fee\u6539&#xff0c;\u81ea\u52a8\u5224\u5b9a\u7f13\u5b58\u5931\u6548&#xff0c;\u91cd\u65b0\u63d0\u53d6 Embedding&#xff0c;\u907f\u514d\u4f7f\u7528\u65e7\u7279\u5f81\u5411\u91cf\u9020\u6210\u89d2\u8272\u9519\u4e71\u3002<\/p>\n<p>import hashlib<\/p>\n<p>def get_file_sha256(file_path):<br \/>\n    hash_sha256 &#061; hashlib.sha256()<br \/>\n    with open(file_path, &#034;rb&#034;) as f:<br \/>\n        for chunk in iter(lambda: f.read(4096), b&#034;&#034;):<br \/>\n            hash_sha256.update(chunk)<br \/>\n    return hash_sha256.hexdigest()<\/p>\n<p>def check_cache_valid(char_cache_meta, ref_img_path):<br \/>\n    &#034;&#034;&#034;\u6821\u9a8c\u7f13\u5b58\u7684\u7279\u5f81\u662f\u5426\u5339\u914d\u5f53\u524d\u53c2\u8003\u56fe&#034;&#034;&#034;<br \/>\n    current_hash &#061; get_file_sha256(ref_img_path)<br \/>\n    saved_hash &#061; char_cache_meta.get(&#034;ref_img_sha256&#034;, None)<br \/>\n    if saved_hash is None or current_hash !&#061; saved_hash:<br \/>\n        print(&#034;\u53c2\u8003\u56fe\u7247\u5df2\u53d8\u66f4&#xff0c;\u7f13\u5b58\u5931\u6548&#xff0c;\u9700\u8981\u91cd\u65b0\u63d0\u53d6\u7279\u5f81\u5411\u91cf&#034;)<br \/>\n        return False<br \/>\n    return True<\/p>\n<h3>7 ComfyUI \u5de5\u4f5c\u6d41\u6539\u9020&#xff1a;\u9884\u52a0\u8f7d\u7279\u5f81\u6ce8\u5165\u8282\u70b9\u903b\u8f91<\/h3>\n<p>\u539f\u751f IPAdapter \u8282\u70b9\u9700\u8981\u8f93\u5165\u56fe\u7247&#xff0c;\u6539\u9020\u540e\u76f4\u63a5\u4f20\u5165\u9884\u52a0\u8f7d embedding \u5f20\u91cf&#xff0c;\u4e0d\u518d\u7ed1\u5b9a\u56fe\u50cf\u8f93\u5165\u8282\u70b9\u3002<\/p>\n<p>def inject_precomputed_embedding(comfy_workflow, embedding_tensor):<br \/>\n    &#034;&#034;&#034;<br \/>\n    \u4fee\u6539ComfyUI workflow json&#xff0c;\u5c06\u9884\u8ba1\u7b97\u7684\u89d2\u8272\u7279\u5f81\u76f4\u63a5\u9001\u5165IPAdapter\u8282\u70b9<br \/>\n    \u8df3\u8fc7\u56fe\u50cf\u7f16\u7801\u5668\u5206\u652f&#xff0c;\u51cf\u5c11\u56fe\u8ba1\u7b97\u5f00\u9500<br \/>\n    &#034;&#034;&#034;<br \/>\n    # workflow\u4e2dIPAdapter\u8282\u70b9\u8f93\u5165&#xff0c;\u66ff\u6362embedding\u53c2\u6570<br \/>\n    comfy_workflow[&#034;ip_adapter_node_id&#034;][&#034;inputs&#034;][&#034;embedding&#034;] &#061; embedding_tensor<br \/>\n    # \u5173\u95ed\u5185\u90e8\u56fe\u50cf\u7f16\u7801\u5206\u652f<br \/>\n    comfy_workflow[&#034;ip_adapter_node_id&#034;][&#034;inputs&#034;][&#034;use_ref_image&#034;] &#061; False<br \/>\n    return comfy_workflow<\/p>\n<h3>8 \u6279\u91cf\u6e32\u67d3\u4e3b\u8c03\u5ea6\u96c6\u6210\u4ee3\u7801<\/h3>\n<p>def render_scene_with_cache(char_pool:CharEmbeddingCachePool, scene_task_list):<br \/>\n    for task in scene_task_list:<br \/>\n        char_id &#061; task[&#034;char_id&#034;]<br \/>\n        ref_img &#061; task[&#034;ref_img&#034;]<br \/>\n        prompt &#061; task[&#034;prompt&#034;]<br \/>\n        # \u4ece\u7f13\u5b58\u6c60\u83b7\u53d6\u9884\u8ba1\u7b97\u89d2\u8272\u7279\u5f81<br \/>\n        emb, meta &#061; char_pool.get_character_embedding(char_id, ref_img, encoder&#061;None)<br \/>\n        workflow &#061; build_comfy_workflow(prompt, emb)<br \/>\n        submit_prompt_to_comfy(workflow)<br \/>\n        # \u5b9a\u671f\u6e05\u7406\u95f2\u7f6e\u6a21\u578b<br \/>\n        model_pool.clean_idle_models()<\/p>\n<h3>9 FFmpeg \u6279\u91cf\u5206\u7247\u5bfc\u51fa\u6f2b\u5267\u7247\u6bb5&#xff08;\u591a\u89d2\u8272\u5206\u573a\u666f\u8f93\u51fa&#xff09;<\/h3>\n<p># \u5c06\u4e0d\u540c\u89d2\u8272\u573a\u666f\u5206\u522b\u5bfc\u51fa\u72ec\u7acb\u7247\u6bb5&#xff0c;\u65b9\u4fbf\u540e\u671f\u526a\u8f91\u5408\u6210<br \/>\nffmpeg -framerate 24 -i .\/scene_man\/frame_%04d.png -c:v libx264 -crf 18 scene_man.mp4<br \/>\nffmpeg -framerate 24 -i .\/scene_girl\/frame_%04d.png -c:v libx264 -crf 18 scene_girl.mp4<\/p>\n<p># \u5408\u5e76\u591a\u4e2a\u573a\u666f\u7247\u6bb5&#xff0c;\u751f\u6210\u5b8c\u6574\u4e00\u96c6\u6f2b\u5267<br \/>\nffmpeg -f concat -safe 0 -i scene_list.txt -c copy full_episode.mp4<\/p>\n<p>scene_list.txt \u5185\u5bb9\u793a\u4f8b&#xff1a;<\/p>\n<p>file &#039;scene_man.mp4&#039;<br \/>\nfile &#039;scene_girl.mp4&#039;<\/p>\n<h3>10 \u6027\u80fd\u6d4b\u8bd5\u4e0e\u5de5\u7a0b\u5751\u70b9\u8bf4\u660e<\/h3>\n<li>\u901f\u5ea6\u6536\u76ca&#xff1a;\u9996\u6b21\u52a0\u8f7d\u89d2\u8272\u9700\u8981\u7f16\u7801\u53c2\u8003\u56fe&#xff1b;\u540e\u7eed\u51e0\u767e\u4e2a\u5206\u955c\u4e0d\u518d\u7f16\u7801&#xff0c;\u5355\u5e27\u63a8\u7406\u8017\u65f6\u53ef\u964d\u4f4e 25%~40%&#xff1b;<\/li>\n<li>\u663e\u5b58\u6536\u76ca&#xff1a;\u53ef\u4ee5\u76f4\u63a5\u5378\u8f7d CLIP \u56fe\u50cf\u7f16\u7801\u5668&#xff0c;\u91ca\u653e 1~2GB \u663e\u5b58&#xff0c;8G \u663e\u5361\u6536\u76ca\u975e\u5e38\u660e\u663e&#xff1b;<\/li>\n<li>\u7f13\u5b58\u7248\u672c\u7ba1\u7406&#xff1a;\u4fee\u6539\u53c2\u8003\u56fe\u753b\u98ce\u3001\u8c03\u6574\u89d2\u8272\u7ec6\u8282\u540e&#xff0c;\u4e00\u5b9a\u8981\u89e6\u53d1\u7f13\u5b58\u5931\u6548\u6821\u9a8c&#xff0c;\u5426\u5219\u89d2\u8272\u7279\u5f81\u4e0d\u4f1a\u66f4\u65b0&#xff1b;<\/li>\n<li>\u7cbe\u5ea6\u9009\u62e9&#xff1a;Embedding \u4fdd\u5b58\u63a8\u8350 float16&#xff0c;\u964d\u4f4e\u5b58\u50a8\u4f53\u79ef&#xff0c;\u4e0d\u5f71\u54cd\u89d2\u8272\u4e00\u81f4\u6027&#xff1b;float32 \u6587\u4ef6\u4f53\u79ef\u7ffb\u500d&#xff0c;\u6536\u76ca\u5f88\u5c0f&#xff1b;<\/li>\n<li>\u78c1\u76d8 IO \u74f6\u9888&#xff1a;\u89d2\u8272\u6570\u91cf\u6781\u591a\u7684\u65f6\u5019&#xff0c;\u5927\u91cf safetensors \u6587\u4ef6\u8bfb\u5199\u4f1a\u6709\u78c1\u76d8\u5f00\u9500&#xff0c;\u53ef\u589e\u52a0\u5185\u5b58\u9884\u70ed\u673a\u5236&#xff0c;\u6e32\u67d3\u524d\u9884\u52a0\u8f7d\u9ad8\u9891\u89d2\u8272\u7f13\u5b58\u3002<\/li>\n<h3>11 \u603b\u7ed3<\/h3>\n<p>\u672c\u6587\u5b9e\u73b0\u7684\u89d2\u8272\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\u7f13\u5b58\u6c60\u4e0e GPU \u5185\u5b58\u6c60&#xff0c;\u4ece\u7279\u5f81\u63d0\u53d6\u6e90\u5934\u524a\u51cf AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u7684\u91cd\u590d\u8ba1\u7b97\u3002\u901a\u8fc7\u5e8f\u5217\u5316\u5b58\u50a8 IPAdapter embedding&#xff0c;\u8de8\u5206\u955c\u3001\u8de8\u6e32\u67d3\u4f1a\u8bdd\u590d\u7528\u89d2\u8272\u7279\u5f81&#xff0c;LRU \u7b56\u7565\u81ea\u52a8\u7ba1\u7406\u663e\u5b58\u5185\u7f13\u5b58&#xff0c;\u95f2\u7f6e\u6a21\u578b\u8d85\u65f6\u81ea\u52a8\u5378\u8f7d&#xff0c;\u6709\u6548\u7f13\u89e3 8G\/12G \u663e\u5361\u663e\u5b58\u788e\u7247\u95ee\u9898\u3002\u8be5\u65b9\u6848\u548c\u4e0a\u4e00\u7bc7\u5f02\u6b65\u4efb\u52a1\u8c03\u5ea6\u7cfb\u7edf\u53ef\u4ee5\u65e0\u7f1d\u96c6\u6210&#xff0c;\u7ec4\u5408\u5b9e\u73b0\u300c\u4efb\u52a1\u6392\u961f &#043; \u7279\u5f81\u7f13\u5b58 &#043; \u81ea\u52a8\u753b\u8d28\u6821\u9a8c\u300d\u7684\u5b8c\u6574\u672c\u5730 AI \u6f2b\u5267\u81ea\u52a8\u5316\u751f\u4ea7\u7ebf&#xff0c;\u5927\u5e45\u63d0\u5347\u957f\u7bc7\u6f2b\u5267\u9879\u76ee\u7684\u672c\u5730\u6e32\u67d3\u6548\u7387\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6458\u8981<br \/>\n\u5728 AI \u6f2b\u5267\u672c\u5730\u6279\u91cf\u6e32\u67d3\u6d41\u7a0b\u4e2d&#xff0c;\u89d2\u8272\u53c2\u8003\u56fe\u7684\u91cd\u590d\u7f16\u7801\u662f\u6d41\u6c34\u7ebf\u6027\u80fd\u74f6\u9888\u4e4b\u4e00\u3002\u6bcf\u6b21\u5207\u6362\u5206\u955c\u65f6\u53cd\u590d\u52a0\u8f7d IPAdapter \u7f16\u7801\u5668\u3001\u5bf9\u53c2\u8003\u4eba\u7269\u56fe\u50cf\u91cd\u65b0\u63d0\u53d6\u7279\u5f81\u5411\u91cf&#xff0c;\u4e0d\u4ec5\u5360\u7528\u5927\u91cf GPU \u663e\u5b58&#xff0c;\u8fd8\u4f1a\u5e26\u6765\u6570\u5341\u79d2\u7684\u989d\u5916\u63a8\u7406\u5ef6\u8fdf&#xff0c;\u9891\u7e41\u52a0\u8f7d\u5378\u8f7d\u6a21\u578b\u8fd8\u4f1a\u52a0\u5267\u663e\u5b58\u788e\u7247&#xff0c;\u6781\u6613\u89e6\u53d1 OOM\u3002\u672c\u6587\u9488\u5bf9\u8be5\u75db\u70b9&#xff0c;\u8bbe\u8ba1\u4e00\u5957\u89d2\u8272\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\u7f13\u5b58\u6c60&#xff0c;\u4e00\u6b21\u6027\u63d0\u53d6 IPAdapter embedding \u5e76<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[10554,6962,9341,50,398],"topic":[],"class_list":["post-115648","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-comfyui","tag-9341","tag-50","tag-398"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/115648.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6458\u8981 \u5728 AI \u6f2b\u5267\u672c\u5730\u6279\u91cf\u6e32\u67d3\u6d41\u7a0b\u4e2d&#xff0c;\u89d2\u8272\u53c2\u8003\u56fe\u7684\u91cd\u590d\u7f16\u7801\u662f\u6d41\u6c34\u7ebf\u6027\u80fd\u74f6\u9888\u4e4b\u4e00\u3002\u6bcf\u6b21\u5207\u6362\u5206\u955c\u65f6\u53cd\u590d\u52a0\u8f7d IPAdapter \u7f16\u7801\u5668\u3001\u5bf9\u53c2\u8003\u4eba\u7269\u56fe\u50cf\u91cd\u65b0\u63d0\u53d6\u7279\u5f81\u5411\u91cf&#xff0c;\u4e0d\u4ec5\u5360\u7528\u5927\u91cf GPU \u663e\u5b58&#xff0c;\u8fd8\u4f1a\u5e26\u6765\u6570\u5341\u79d2\u7684\u989d\u5916\u63a8\u7406\u5ef6\u8fdf&#xff0c;\u9891\u7e41\u52a0\u8f7d\u5378\u8f7d\u6a21\u578b\u8fd8\u4f1a\u52a0\u5267\u663e\u5b58\u788e\u7247&#xff0c;\u6781\u6613\u89e6\u53d1 OOM\u3002\u672c\u6587\u9488\u5bf9\u8be5\u75db\u70b9&#xff0c;\u8bbe\u8ba1\u4e00\u5957\u89d2\u8272\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\u7f13\u5b58\u6c60&#xff0c;\u4e00\u6b21\u6027\u63d0\u53d6 IPAdapter embedding \u5e76\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/115648.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-12T13:08:55+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115648.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/115648.html\",\"name\":\"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-12T13:08:55+00:00\",\"dateModified\":\"2026-10-12T13:08:55+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/115648.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/115648.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/115648.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/115648.html","og_locale":"zh_CN","og_type":"article","og_title":"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6458\u8981 \u5728 AI \u6f2b\u5267\u672c\u5730\u6279\u91cf\u6e32\u67d3\u6d41\u7a0b\u4e2d&#xff0c;\u89d2\u8272\u53c2\u8003\u56fe\u7684\u91cd\u590d\u7f16\u7801\u662f\u6d41\u6c34\u7ebf\u6027\u80fd\u74f6\u9888\u4e4b\u4e00\u3002\u6bcf\u6b21\u5207\u6362\u5206\u955c\u65f6\u53cd\u590d\u52a0\u8f7d IPAdapter \u7f16\u7801\u5668\u3001\u5bf9\u53c2\u8003\u4eba\u7269\u56fe\u50cf\u91cd\u65b0\u63d0\u53d6\u7279\u5f81\u5411\u91cf&#xff0c;\u4e0d\u4ec5\u5360\u7528\u5927\u91cf GPU \u663e\u5b58&#xff0c;\u8fd8\u4f1a\u5e26\u6765\u6570\u5341\u79d2\u7684\u989d\u5916\u63a8\u7406\u5ef6\u8fdf&#xff0c;\u9891\u7e41\u52a0\u8f7d\u5378\u8f7d\u6a21\u578b\u8fd8\u4f1a\u52a0\u5267\u663e\u5b58\u788e\u7247&#xff0c;\u6781\u6613\u89e6\u53d1 OOM\u3002\u672c\u6587\u9488\u5bf9\u8be5\u75db\u70b9&#xff0c;\u8bbe\u8ba1\u4e00\u5957\u89d2\u8272\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\u7f13\u5b58\u6c60&#xff0c;\u4e00\u6b21\u6027\u63d0\u53d6 IPAdapter embedding \u5e76","og_url":"https:\/\/www.wsisp.com\/helps\/115648.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-12T13:08:55+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"5 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/115648.html","url":"https:\/\/www.wsisp.com\/helps\/115648.html","name":"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-12T13:08:55+00:00","dateModified":"2026-10-12T13:08:55+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/115648.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/115648.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/115648.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u672c\u5730 AI \u6f2b\u5267\u6d41\u6c34\u7ebf\u6a21\u578b\u7f13\u5b58\u4e0e\u7279\u5f81\u5411\u91cf\u6301\u4e45\u5316\uff1aIPAdapter \u9884\u7f16\u7801\u3001\u7279\u5f81\u6c60\u590d\u7528\u4e0e\u5185\u5b58\u6c60\u7ba1\u7406\u5b9e\u6218"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115648","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=115648"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/115648\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=115648"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=115648"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=115648"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=115648"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}