{"id":20109,"date":"2024-09-18T11:13:47","date_gmt":"2024-09-18T03:13:47","guid":{"rendered":"https:\/\/www.1ai.net\/?p=20109"},"modified":"2024-09-18T11:13:47","modified_gmt":"2024-09-18T03:13:47","slug":"coze%e5%85%8d%e8%b4%b9%e4%bd%bf%e7%94%a8flux%ef%bc%8c%e6%89%8b%e6%8a%8a%e6%89%8b%e6%95%99%e4%bd%a0%e7%94%a8coze%e8%b0%83%e7%94%a8flux%e6%a8%a1%e5%9e%8b","status":"publish","type":"post","link":"https:\/\/www.1ai.net\/en\/20109.html","title":{"rendered":"Coze free to use FLUX, hand to teach you to call FLUX model with coze"},"content":{"rendered":"<p>I don't know if you have used BizyAir cloud node, this is the Siliconflow team open source plugin dedicated to ComfyUI, you need the API key on the siliconflow website to use.<\/p>\n<p>But since it's an API, you can use their functionality wherever you can run code.<\/p>\n<p>After playing with the coze platform for a long time, you may feel that the current raw map model doesn't meet your needs, isn't it?<\/p>\n<p>Even if some of you will have various workflow builds, you may not have enough graphics card resources locally, so what should you do?<\/p>\n<p>Today, we'll take a look at how coze calls<a href=\"https:\/\/www.1ai.net\/en\/tag\/flux\" title=\"_OTHER ORGANISER\" target=\"_blank\" >FLUX<\/a>The model is an example of how to use the API for silicon-based flows, so you can follow along and try it out if you haven't practiced it yet.<\/p>\n<p>Here to say the benefits of using api, equivalent to others in their own platform to the model are deployed, you can call their API to generate graphs, do not need their own local arithmetic, do not need to rent cloud platforms according to the hour, only according to the generation of the consumption of arithmetic to billing, more flexible.<\/p>\n<p>1\u3001Use your cell phone number to register for an account with Silicon Mobility<\/p>\n<p>https:\/\/account.siliconflow.cn\/<\/p>\n<p>2, after logging in to the web page, there is an API key on the left side, this is the pass that can be used in other platforms to invoke the silicon-based mobility services, you can create an api key for subsequent use.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20110\" title=\"27c7569bj00sjznij0018d000u000pzm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/27c7569bj00sjznij0018d000u000pzm.jpg\" alt=\"27c7569bj00sjznij0018d000u000pzm\" width=\"1080\" height=\"935\" \/><\/p>\n<p>3, here in fact to use the silicon-based flow API on coze, then it involves API call code, you need to look at the API manual, there is a document button on the upper part of the page<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20111\" title=\"584ee43fj00sjznij000ed000u0005rm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/584ee43fj00sjznij000ed000u0005rm.jpg\" alt=\"584ee43fj00sjznij000ed000u0005rm\" width=\"1080\" height=\"207\" \/><\/p>\n<p>The Documentation Center has a description of how to use the API<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20113\" title=\"23881be0j00sjznij0022d000u000oem\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/23881be0j00sjznij0022d000u000oem.jpg\" alt=\"23881be0j00sjznij0022d000u000oem\" width=\"1080\" height=\"878\" \/><\/p>\n<p>As you can see here, it is possible to go directly to the API manual and use the API-key to select the target language and generate code for the corresponding language.<\/p>\n<p>Students who do not know the code do not need to panic, first familiar with where it can be, follow the steps.<\/p>\n<p>4, open the API manual, in the right-hand directory, select Text To Image, you can see that there are SD models and<a href=\"https:\/\/www.1ai.net\/en\/tag\/flux%e6%a8%a1%e5%9e%8b\" title=\"_Other Organiser\" target=\"_blank\" >Flux Model<\/a><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20112\" title=\"51ff93a3j00sjznij000kd0008000ewm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/51ff93a3j00sjznij000kd0008000ewm.jpg\" alt=\"51ff93a3j00sjznij000kd0008000ewm\" width=\"288\" height=\"536\" \/><\/p>\n<p>This time, we take the flux model as an example, which is the best current model for graph generation.<\/p>\n<p>Here you can fill in the key just now, you can see that the corresponding code is generated, this demonstration uses the python language.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20114\" title=\"5db407cbj00sjznij0029d000u000ogm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/5db407cbj00sjznij0029d000u000ogm.jpg\" alt=\"5db407cbj00sjznij0029d000u000ogm\" width=\"1080\" height=\"880\" \/><\/p>\n<p>5. Find the Plugins page in coze and select New Plugin:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20115\" title=\"8464c7a7j00sjznij0009d000u0004fm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/8464c7a7j00sjznij0009d000u0004fm.jpg\" alt=\"8464c7a7j00sjznij0009d000u0004fm\" width=\"1080\" height=\"159\" \/><\/p>\n<p>Select cloud side plugin, plugin url use api use in base url: https:\/\/api.siliconflow.cn\/v1<\/p>\n<p>The authorization to select Service, the location selection Header, corresponds to the code part of step 4, and a closer look at the api document shows a headers, so the next Parameter name needs to write \"authorzation\", Service token fills out the \"Bearer sk-\" key series\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20116\" title=\"5d355760j00sjznik003dd000fy010qm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/5d355760j00sjznik003dd000fy010qm.jpg\" alt=\"5d355760j00sjznik003dd000fy010qm\" width=\"574\" height=\"1322\" \/><\/p>\n<p>6, plug-ins created successfully, click on the creation tool, start doing the first plug-in function<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20117\" title=\"00d08aeaj00sjznij000gd000jp00hxm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/00d08aeaj00sjznij000gd000jp00hxm.jpg\" alt=\"00d08aeaj00sjznij000gd000jp00hxm\" width=\"709\" height=\"645\" \/><\/p>\n<p>7, fill in the tool information, here you need to fill in the tool path and request method, you can look at the api documentation to find the answer:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20120\" title=\"b1282455j00sjznij0012d000g500hxm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/b1282455j00sjznij0012d000g500hxm.jpg\" alt=\"b1282455j00sjznij0012d000g500hxm\" width=\"581\" height=\"645\" \/><\/p>\n<p>You can see his address in the picture, as well as the monochrome text block in front of it stating that it's the POST method, so fill it out as follows and save it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20119\" title=\"fbb2d133j00sjznij000md000ks00i2m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/fbb2d133j00sjznij000md000ks00i2m.jpg\" alt=\"fbb2d133j00sjznij000md000ks00i2m\" width=\"748\" height=\"650\" \/><\/p>\n<p>8, the next need to fill in the parameter name, or find the API documentation, looking for body params section:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20118\" title=\"3213671cj00sjznij000kd000fc009fm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/3213671cj00sjznij000kd000fc009fm.jpg\" alt=\"3213671cj00sjznij000kd000fc009fm\" width=\"552\" height=\"339\" \/><\/p>\n<p>You can see that several parameters, except seed must be filled in, but does not mean that you must select it as a required field when configuring the tool.<\/p>\n<p>We can set some default values for all of them, taking care to configure the input parameter types and incoming methods without selecting required, which is very convenient when testing the node.<\/p>\n<p>Fill in the following according to the api documentation, click save and continue.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20121\" title=\"bccf0571j00sjznij0013d000tb00gpm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/bccf0571j00sjznij0013d000tb00gpm.jpg\" alt=\"bccf0571j00sjznij0013d000tb00gpm\" width=\"1055\" height=\"601\" \/><\/p>\n<p>9, the following need to configure the output parameters, here you can not need to fill in manually, click on the upper right corner of the automatic parsing, fill in the input parameters, automatic parsing.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20122\" title=\"0ca0b0caj00sjznij000ud000u000h4m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/0ca0b0caj00sjznij000ud000u000h4m.jpg\" alt=\"0ca0b0caj00sjznij000ud000u000h4m\" width=\"1080\" height=\"616\" \/><\/p>\n<p>If the output parameters appear normally, the run is successful.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20123\" title=\"18c11bd1j00sjznij000qd000lp00gqm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/18c11bd1j00sjznij000qd000lp00gqm.jpg\" alt=\"18c11bd1j00sjznij000qd000lp00gqm\" width=\"781\" height=\"602\" \/><\/p>\n<p>Save, the next step can continue to debug, if the response appears to image the url, open it will automatically download the run out of the map, the output here is a man, if you also use seed 0, you will run out and I have the same image.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20124\" title=\"9495d0baj00sjznij0011d000u000gim\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/9495d0baj00sjznij0011d000u000gim.jpg\" alt=\"9495d0baj00sjznij0011d000u000gim\" width=\"1080\" height=\"594\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20126\" title=\"b634ef4cj00sjznij001id000sg00sgm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/b634ef4cj00sjznij001id000sg00sgm.jpg\" alt=\"b634ef4cj00sjznij001id000sg00sgm\" width=\"1024\" height=\"1024\" \/><\/p>\n<p>This proves that the api is tuned, and completes the configuration of the tool.<\/p>\n<p>10. Publish the plug-in so that it can be invoked in the workflow, because there is no information involved in collecting users here, just publish it directly.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20125\" title=\"9858ce65j00sjznij000md000qm00a6m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/9858ce65j00sjznij000md000qm00a6m.jpg\" alt=\"9858ce65j00sjznij000md000qm00a6m\" width=\"958\" height=\"366\" \/><\/p>\n<p>11, preliminary test plug-ins, open the workflow, try to call just configured plug-ins:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20127\" title=\"b9ee1b58j00sjznij000vd000u000fym\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/b9ee1b58j00sjznij000vd000u000fym.jpg\" alt=\"b9ee1b58j00sjznij000vd000u000fym\" width=\"1080\" height=\"574\" \/><\/p>\n<p>After adding directly do not fill in any parameters to test, configure the content of the answer, you can see the success of the output url:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20129\" title=\"55c65547j00sjznij000jd000u0008sm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/55c65547j00sjznij000jd000u0008sm.jpg\" alt=\"55c65547j00sjznij000jd000u0008sm\" width=\"1080\" height=\"316\" \/><\/p>\n<p>When using bot generation, the image can be successfully seen:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20128\" title=\"1f13a6f2j00sjznij000pd000u000d8m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/1f13a6f2j00sjznij000pd000u000d8m.jpg\" alt=\"1f13a6f2j00sjznij000pd000u000d8m\" width=\"1080\" height=\"476\" \/><\/p>\n<p>12. Configure some nodes that automatically generate parameters according to the parameters to be entered.<\/p>\n<p>We have just generated the image using the default parameters, now we need to go ahead and change the incoming content.<\/p>\n<p>For example, seed, you can find a plugin that generates random numbers to generate seed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20131\" title=\"72f60148j00sjznij001id000u000n4m\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/72f60148j00sjznij001id000u000n4m.jpg\" alt=\"72f60148j00sjznij001id000u000n4m\" width=\"1080\" height=\"832\" \/><\/p>\n<p>Here I choose to use:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20130\" title=\"0271b570j00sjznij000td000u000dwm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/0271b570j00sjznij000td000u000dwm.jpg\" alt=\"0271b570j00sjznij000td000u000dwm\" width=\"1080\" height=\"500\" \/><\/p>\n<p>Configure the maximum and minimum values and test the node:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20132\" title=\"54d6961fj00sjznij000od000pz00asm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/54d6961fj00sjznij000od000pz00asm.jpg\" alt=\"54d6961fj00sjznij000od000pz00asm\" width=\"935\" height=\"388\" \/><\/p>\n<p>For the cue word generation section, a large model was used to augment the cue words.<\/p>\n<p>Here some students may want to recover the content of the image, they need to keep the seed of the image, the cue word, you can keep these parameters in the output for output in bot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20133\" title=\"2b8a0984j00sjznij000rd000u000bmm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/2b8a0984j00sjznij000rd000u000bmm.jpg\" alt=\"2b8a0984j00sjznij000rd000u000bmm\" width=\"1080\" height=\"418\" \/><\/p>\n<p>Testing in bot:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20134\" title=\"0f8f5b63j00sjznij0010d000u000etm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/0f8f5b63j00sjznij0010d000u000etm.jpg\" alt=\"0f8f5b63j00sjznij0010d000u000etm\" width=\"1080\" height=\"533\" \/><\/p>\n<p>If you want to change the size of the image, remember to set it according to the api documentation, here are some fixed sizes:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20135\" title=\"bca8d5e6j00sjznij000ed000e6005dm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/bca8d5e6j00sjznij000ed000e6005dm.jpg\" alt=\"bca8d5e6j00sjznij000ed000e6005dm\" width=\"510\" height=\"193\" \/><\/p>\n<p>the sizes cannot be set at will, and the api has already been set, and can eventually select a fixed size or a change of intelligence according to the task of the workflow. it is important to note that \u201c1024 x 1024\u201d contains a small x-link, not *\u3002<\/p>\n<p>13. Finally, a word about costs<\/p>\n<p>Here you can look at the cost bill to see the breakdown of their own use, now siliconflow product is also just out soon, some models are still in the stage of free use.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20136\" title=\"52b82d36j00sjznij001ed000s400nkm\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/52b82d36j00sjznij001ed000s400nkm.jpg\" alt=\"52b82d36j00sjznij001ed000s400nkm\" width=\"1012\" height=\"848\" \/><\/p>\n<p>The account is now gifted $14 per person with a little free credit, like the flux model just used, which is still free to call at the moment.<\/p>\n<p>Of course this platform can not only use the raw map model, there are a lot of text big language model, image generation side of the instantid model is also available, you can refer to the facial features, you can make up for some coze on the raw map algorithms do not have.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-20137\" title=\"2d2f3fa5j00sjznij001kd000t300hom\" src=\"https:\/\/www.1ai.net\/wp-content\/uploads\/2024\/09\/2d2f3fa5j00sjznij001kd000t300hom.jpg\" alt=\"2d2f3fa5j00sjznij001kd000t300hom\" width=\"1047\" height=\"636\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>I don't know if you've all used BizyAir Cloud Node yet, but it's an open source plugin dedicated to ComfyUI by the Siliconflow team, and it requires the API key on the siliconflow website to use it. But since it's an API, you can use their functionality wherever you can run code. After playing with the coze platform for a long time, you may feel that the current raw model doesn't fulfill your needs, isn't it? Even if there are partners will be a variety of workflow building, but the local may not have enough graphics card resources, what should be done? Today to coze how to call FLUX model as an example of how to use the silicon flow API, if you have not practiced, you can follow along to try. Here are the benefits of using the api, which are equivalent to<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[149,144],"tags":[726,3853,3878],"collection":[],"class_list":["post-20109","post","type-post","status-publish","format-standard","hentry","category-jiaocheng","category-baike","tag-coze","tag-flux"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/20109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/comments?post=20109"}],"version-history":[{"count":0,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/posts\/20109\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/media?parent=20109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/categories?post=20109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/tags?post=20109"},{"taxonomy":"collection","embeddable":true,"href":"https:\/\/www.1ai.net\/en\/wp-json\/wp\/v2\/collection?post=20109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}