Buckets:

mishig's picture
download
raw
67.1 kB
<meta charset="utf-8" /><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;واجهة سطر الأوامر&quot;,&quot;local&quot;:&quot;command-line-interface&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;الأوامر المتاحة&quot;,&quot;local&quot;:&quot;available-commands&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;env&quot;,&quot;local&quot;:&quot;env&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;مخطط&quot;,&quot;local&quot;:&quot;schema&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;تشغيل&quot;,&quot;local&quot;:&quot;run&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;تمرير حِجج خط الأنابيب&quot;,&quot;local&quot;:&quot;passing-pipeline-arguments&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;جارٍ التحميل&quot;,&quot;local&quot;:&quot;loading&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;التحسينات&quot;,&quot;local&quot;:&quot;optimizations&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;خطوط أنابيب معيارية&quot;,&quot;local&quot;:&quot;modular-pipelines&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;المخرجات&quot;,&quot;local&quot;:&quot;outputs&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;التنفيذ عن بُعد ( --remote )&quot;,&quot;local&quot;:&quot;remote-execution----remote-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;custom_blocks&quot;,&quot;local&quot;:&quot;customblocks&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;fp16_safetensors&quot;,&quot;local&quot;:&quot;fp16safetensors&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;المهارات&quot;,&quot;local&quot;:&quot;skills&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/>
<link href="/docs/diffusers/main/en/_app/immutable/entry/start.0S0_iEoG.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/I9eooN77.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/Bupkjr9f.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/CyvZ3FS5.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/l0QnnOED.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/DnVIJfC5.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/DsnmJJEf.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/nodes/0.DteTvmQZ.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/CoSrdQax.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/nodes/388.Cww0re_K.js" rel="modulepreload">
<link href="/docs/diffusers/main/en/_app/immutable/chunks/DSPDl1gz.js" rel="modulepreload">
<!--1wkohmy--><meta name="hf:doc:metadata" content="{&quot;title&quot;:&quot;Command line interface&quot;,&quot;local&quot;:&quot;command-line-interface&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Available commands&quot;,&quot;local&quot;:&quot;available-commands&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;env&quot;,&quot;local&quot;:&quot;env&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;schema&quot;,&quot;local&quot;:&quot;schema&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;run&quot;,&quot;local&quot;:&quot;run&quot;,&quot;sections&quot;:[{&quot;title&quot;:&quot;Passing pipeline arguments&quot;,&quot;local&quot;:&quot;passing-pipeline-arguments&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Loading&quot;,&quot;local&quot;:&quot;loading&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Optimizations&quot;,&quot;local&quot;:&quot;optimizations&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Modular pipelines&quot;,&quot;local&quot;:&quot;modular-pipelines&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Outputs&quot;,&quot;local&quot;:&quot;outputs&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3},{&quot;title&quot;:&quot;Remote execution ( --remote )&quot;,&quot;local&quot;:&quot;remote-execution----remote-&quot;,&quot;sections&quot;:[],&quot;depth&quot;:3}],&quot;depth&quot;:2},{&quot;title&quot;:&quot;custom_blocks&quot;,&quot;local&quot;:&quot;customblocks&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;fp16_safetensors&quot;,&quot;local&quot;:&quot;fp16safetensors&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2},{&quot;title&quot;:&quot;skills&quot;,&quot;local&quot;:&quot;skills&quot;,&quot;sections&quot;:[],&quot;depth&quot;:2}],&quot;depth&quot;:1}"/><!---->
<link href="/docs/diffusers/main/en/_app/immutable/assets/0.tn0RQdqM.css" rel="modulepreload"> <!--[--><!--[0--><!--[--><!--[0--><!--[--><p></p> <div class="items-center shrink-0 min-w-[100px] max-sm:min-w-[50px] justify-end ml-auto flex" style="float: inline-end; margin-inline-start: 10px; display: inline-flex; position: relative; z-index: 10;"><div dir="ltr" class="inline-flex rounded-md max-sm:rounded-sm"><button class="inline-flex items-center gap-1 h-7 max-sm:h-7 px-2 max-sm:px-1.5 text-sm font-medium text-gray-800 border border-r-0 rounded-l-md max-sm:rounded-l-sm border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-live="polite"><span class="inline-flex items-center justify-center rounded-md p-0.5 max-sm:p-0 hover:text-gray-800 dark:hover:text-gray-200"><svg class="sm:size-3.5 size-3" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----></span> <span dir="auto">Copy page</span></button> <button class="inline-flex items-center justify-center w-6 max-sm:w-5 h-7 max-sm:h-7 disabled:pointer-events-none text-sm text-gray-500 hover:text-gray-700 dark:hover:text-white rounded-r-md max-sm:rounded-r-sm border border-l transition border-gray-200 bg-white hover:shadow-inner dark:border-gray-850 dark:bg-gray-950 dark:text-gray-200 dark:hover:bg-gray-800" aria-haspopup="menu" aria-expanded="false" aria-label="Open copy menu"><svg class="transition-transform text-gray-400 overflow-visible sm:size-3.5 size-3 rotate-0" width="1em" height="1em" viewBox="0 0 12 7" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="currentColor"></path></svg><!----></button></div> <!--[-1--><!--]--></div><!----> <!--[0--><h1 class="relative group"><a id="command-line-interface" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#command-line-interface"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->واجهة سطر الأوامر<!----></span></h1><!--]--><!----> <p><code>diffusers-cli</code> هو عميل سطر أوامر لتشغيل خطوط أنابيب Diffusers وفحصها وتغليفها.</p> <!--[1--><h2 class="relative group"><a id="available-commands" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#available-commands"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->الأوامر المتاحة<!----></span></h2><!--]--><!----> <table><thead><tr><th>أمر</th><th>الغرض</th></tr></thead><tbody><tr><td><a href="#env"><code>env</code></a></td><td>اطبع معلومات البيئة لتقارير الأخطاء.</td></tr><tr><td><a href="#schema"><code>schema</code></a></td><td>افحص توقيع <code>__call__</code> لخط الأنابيب دون تنزيل الأوزان.</td></tr><tr><td><a href="#run"><code>run</code></a></td><td>شغّل خط أنابيب محليًا أو في بيئة Hugging Face Sandbox.</td></tr><tr><td><a href="#customblocks"><code>custom_blocks</code></a></td><td>تغليف فئة فرعية محلية من <code>ModularPipelineBlocks</code> للمركز (Hub).</td></tr><tr><td><a href="#fp16safetensors"><code>fp16_safetensors</code></a></td><td>تحويل نقطة التفتيش إلى <code>.safetensors</code> بصيغة fp16</td></tr><tr><td><a href="#skills"><code>skills</code></a></td><td>قم بتثبيت حزم المهارات الجاهزة في وكيل البرمجة الذكي الخاص بك.</td></tr></tbody></table> <blockquote class="tip"><p>لا توفر هذه الصفحة تفاصيل لجميع الخيارات تحت كل أمر فرعي. للحصول على قائمة كاملة ودائمة التحديث بالخيارات لأي أمر فرعي، نفّذ <code>diffusers-cli &lt;command> --help</code> (<code>diffusers-cli run --help</code>).</p></blockquote> <!--[1--><h2 class="relative group"><a id="env" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#env"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->env<!----></span></h2><!--]--><!----> <p>يطبع إصدارات Python وPyTorch وDiffusers، ومعلومات CUDA، والتبعيات الاختيارية المثبتة. استخدمه عند فتح مشكلة حتى يتمكن المسؤولون عن المشروع من إعادة إنشاء إعدادك.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli <span class="hljs-built_in">env</span><!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="schema" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#schema"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->مخطط<!----></span></h2><!--]--><!----> <p>يعيد المدخلات المقبولة في خط الأنابيب دون تنزيل الأوزان. استخدمه عند بناء <code>--pipeline-kwargs</code> لـ <a href="#run"><code>run</code></a>.</p> <p>يتم جلب ملف الفهرس فقط. تقرأ خطوط الأنابيب القياسية <code>model_index.json</code>. وتقرأ خطوط الأنابيب المعيارية <code>modular_model_index.json</code>. وتقرأ المستودعات ذات الكتل المخصصة <code>modular_config.json</code> وتحتاج إلى <code>--trust-remote-code</code>، لأن تحميلها يشغّل كود Hub.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli --format json schema --model black-forest-labs/FLUX.1-dev
diffusers-cli schema --model my-org/my-custom-blocks --trust-remote-code<!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="run" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#run"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->تشغيل<!----></span></h2><!--]--><!----> <p>شغّل خط أنابيب من البداية إلى النهاية. يكتشف سطر الأوامر تلقائيًا ما إذا كان المستودع قياسي أم معياري. كما يحمّل مدخلات الوسائط تلقائيًا من عناوين URL أو مسارات محلية، ويحفظ المخرجات بناءً على نوع الإرجاع الخاص بخط الأنابيب، ويمكنه التشغيل عن بُعد على Hugging Face Sandbox عبر <code>--remote</code>.</p> <p>مثال مبسّط:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \
--model black-forest-labs/FLUX.1-dev \
--dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;an astronaut riding a horse&quot;}&#x27;</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="passing-pipeline-arguments" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#passing-pipeline-arguments"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->تمرير حِجج خط الأنابيب<!----></span></h3><!--]--><!----> <p><code>--pipeline-kwargs</code> يتلقى كائن JSON يُمرَّر إلى <code>pipeline(**kwargs)</code>. القيم النصية عند مفاتيح إدخال الوسائط المعروفة تُحمَّل تلقائيًا:</p> <ul><li>الصور (<code>image</code>، <code>last_image</code>، <code>mask_image</code>، <code>control_image</code>، <code>ip_adapter_image</code>، <code>image_2</code>) → <code>PIL.Image</code> عبر <code>load_image</code>.</li> <li>الفيديوهات (<code>video</code>، <code>control_video</code>) → <code>list[PIL.Image]</code> عبر <code>load_video</code>.</li> <li>الصوت (<code>initial_audio_waveforms</code>، <code>reference_audio</code>، <code>src_audio</code>) → <code>torch.Tensor</code> عبر <code>torchaudio.load</code>.</li></ul> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \
--model black-forest-labs/FLUX.2-klein-9B --dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;make the fur grey&quot;, &quot;image&quot;: &quot;https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png&quot;, &quot;strength&quot;: 0.6}&#x27;</span><!----></pre></div><!----> <p>تقبل مفاتيح الوسائط ومفاتيح النص على حد سواء مصفوفة JSON لتشغيل دفعة كاملة عبر استدعاء واحد لخط المعالجة. يتم تحميل كل عنصر في قائمة الوسائط بشكل فردي (رابط URL، مسار محلي، أو مسار موصول بوعاء التخزين)، بينما يعالج Diffusers القائمة بأكملها في تمريرة أمامية واحدة على وحدة معالجة الرسوميات (GPU):</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \
--model black-forest-labs/FLUX.1-Kontext-dev --dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{
&quot;prompt&quot;: [&quot;make it grey&quot;, &quot;make it pink&quot;, &quot;make it blue&quot;],
&quot;image&quot;: [
&quot;https://.../cat1.png&quot;,
&quot;https://.../cat2.png&quot;,
&quot;https://.../cat3.png&quot;
]
}&#x27;</span><!----></pre></div><!----> <!--[2--><h3 class="relative group"><a id="loading" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#loading"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->جارٍ التحميل<!----></span></h3><!--]--><!----> <p>اضبط كيفية تحميل أوزان النموذج ورمز خط المعالجة المخصص بواسطة واجهة سطر الأوامر.</p> <ul><li><p><code>--dtype {auto, bfloat16, bf16, float16, fp16, float32, fp32}</code> — نوع dtype للأوزان.</p></li> <li><p><code>--device-map &lt;value></code> — توزيع المكونات. يقبل سلسلة جهاز torch (<code>cuda</code>، <code>cuda:0</code>، <code>cpu</code>، <code>mps</code>)، أو <code>balanced</code> (يقسم المكونات تلقائيًا عبر وحدات معالجة الرسوميات المرئية)، أو قاموس JSON لتوزيع المكونات بشكل صريح لكل مكوّن.
يتم اكتشافه تلقائيًا إذا تم حذفه. راجع <a href="../optimization/device_map">device_map</a> لمزيد من التفاصيل.</p></li> <li><p><code>--variant fp16</code> — اختر نسخة الأوزان.</p></li> <li><p><code>--revision &lt;sha></code> — تثبيت إصدار محدد من النموذج.</p></li> <li><p><code>--trust-remote-code</code> — السماح بالكود المخصص من Hub (مطلوب للمستودعات التي تتضمن فئات pipeline مخصصة أو كتل modulare). راجع <a href="../using-diffusers/custom_pipeline_overview">خطوط أنابيب المجتمع</a> لخطوط الأنابيب المخصصة القياسية و<a href="../modular_diffusers/overview">Modular Diffusers</a>.</p></li> <li><p><code>--lora &lt;spec></code> — إرفاق مُكيّف LoRA بعد التحميل. كل قيمة هي قاموس JSON. كرر العلم لتكديس عدة مُكيّفات. <code>lora_id</code> مطلوب لكل إدخال، و<code>lora_scale</code> افتراضيًا <code>1.0</code>، و<code>adapter_name</code> اختياري (يُولَّد تلقائيًا على شكل <code>lora_&lt;i></code> عند التكديس).</p> <ul><li>فردية: <code>--lora '{"lora_id": "alvdansen/flux-koda", "lora_scale": 0.8}'</code></li> <li>متعددة: <code>--lora '{"lora_id": "alvdansen/flux-koda", "lora_scale": 0.6, "adapter_name": "koda"}' --lora '{"lora_id": "Shakker-Labs/FLUX.1-dev-LoRA-AntiBlur", "lora_scale": 0.4}'</code></li></ul> <p>تُحمَّل جميع المواصفات بواسطة <code>pipeline.load_lora_weights(...)</code>، ثم تُفعَّل معًا عبر استدعاء واحد لـ <code>pipeline.set_adapters(names, adapter_weights=scales)</code>. راجع <a href="../tutorials/using_peft_for_inference">LoRA</a> للحصول على شرح أعمق حول تجميع المُكيِّفات، وجدولة المقياس، والتبديل الفوري.</p></li></ul> <!--[2--><h3 class="relative group"><a id="optimizations" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#optimizations"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->التحسينات<!----></span></h3><!--]--><!----> <ul><li><code>--cpu-offload {model, group, auto}</code> — يأتي هدف التحميل من <code>--device-map</code> (سلسلة جهاز عادية مطلوبة للترحيل). model — تفعيل enable_model_cpu_offload للأنابيب القياسية. راجع ترحيل النموذج. group — تفعيل enable_group_offload(offload_type="leaf_level", use_stream=True) للأنابيب القياسية. راجع ترحيل المجموعة. auto — خاص بالأنابيب المودولية مع ComponentsManager فقط. تثير الأوضاع القياسية استثناءً في الأنابيب المودولية، وتثير auto استثناءً في الأنابيب القياسية. <ul><li><code>model</code> — <code>enable_model_cpu_offload</code> للأنابيب القياسية. راجع <a href="../optimization/memory#model-offloading">إزاحة النموذج</a>.</li> <li><code>group</code> — <code>enable_group_offload(offload_type="leaf_level", use_stream=True)</code> للأنابيب القياسية. راجع <a href="../optimization/memory#group-offloading">إخلاء المجموعات</a>.</li> <li><code>auto</code> — يعمل مع الأنماط المعيارية فقط عند استخدام <a href="../modular_diffusers/components_manager"><code>ComponentsManager</code></a>. تثير الأنماط المعيارية استثناءً عند التعامل مع خطوط الأنابيب المعيارية. يثير <code>auto</code> استثناءً عند التعامل مع خطوط الأنابيب المعيارية.</li></ul></li> <li><code>--offload-margin &lt;size></code> — مساحة ذاكرة الجهاز التي تُبقيها فارغة للتفعيلات عند استخدام <code>--cpu-offload auto</code>، وتُمرَّر إلى <code>enable_auto_cpu_offload</code> باسم <code>memory_reserve_margin</code> (الافتراضي <code>3GB</code>). ارفع هذه القيمة عندما تنفد ذاكرة بطاقة كبيرة أثناء تنفيذ الأمامي. يحتفظ المُحمِّل بالمكونات مقيمة طالما كانت تتسع، لذا على بطاقة ذاكرة عالية السعة قد تترك الهامش الافتراضي مساحة غير كافية لتفعيلات فيديو طويل.</li> <li><code>--attention-backend</code> — نواة انتباه مستضافة على Hub، يتم تنزيلها تلقائيًا عند الاستخدام الأول. الخيارات هي <code>default</code> بالإضافة إلى واجهات Hub المسجلة في Diffusers (مثل <code>flash_hub</code>، <code>flash_varlen_hub</code>، <code>flash_4_hub</code>، <code>sage_hub</code>، <code>sage_blackwell_hub</code>). شغّل <code>diffusers-cli run --help</code> للحصول على القائمة الحالية. يدعم خطوط الأنابيب المبنية على Transformer فقط، ويتم تجاهله مع تحذير في خطوط الأنابيب القديمة UNet. راجع <a href="../optimization/attention_backends">واجهات الانتباه</a>.</li> <li><code>--vae-tiling</code> / <code>--vae-slicing</code> — لتقليل ذاكرة VRAM المستخدمة في فك ترميز VAE. راجع <a href="../optimization/memory#vae-tiling">تقسيم VAE</a> و <a href="../optimization/memory#vae-slicing">تقطيع VAE</a>.</li> <li><code>--compile [JSON]</code> — تجميع وحدات مُزيل الضوضاء باستخدام <a href="../optimization/fp16#torchcompile">torch.compile</a>. تفضّل واجهة سطر الأوامر <a href="../optimization/fp16#regional-compilation">التجميع الإقليمي</a> للوحدات التي تحتوي على كتل متكررة. استخدام <code>--compile</code> بمفرده يعتمد <code>fullgraph=true</code>. يُمرَّر كائن JSON إلى <code>torch.compile</code>. غير مدعوم مع <code>--context-parallel</code>.</li> <li><code>--context-parallel</code> — توازٍ سياقي بنمط Ulysses على خط أنابيب يعتمد على DiT. يتطلب محليًا استخدام torchrun، لكن عند استخدام <code>--remote</code> يقوم سطر الأوامر بتغليف <code>torchrun --nproc-per-node=gpu</code> نيابةً عنك. راجع <a href="../optimization/context_parallelism">التوازي السياقي</a>.</li></ul> <!--[2--><h3 class="relative group"><a id="modular-pipelines" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#modular-pipelines"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->خطوط أنابيب معيارية<!----></span></h3><!--]--><!----> <p>يكتشف <code>run</code> <a href="../modular_diffusers/overview">مستودعًا معياريًا</a> تلقائيًا — إما لأنه يتضمن <code>modular_model_index.json</code>، أو لأن <code>model_index.json</code> الخاص به يحدد فئة فرعية من <code>ModularPipeline</code> — لذا لا حاجة إلى أي علم (flag) للانضمام.</p> <p>تعرف بعض المستودعات المعيارية على عدة <em>مسارات عمل</em> تشبه المهام المسماة، حيث تتشارك في المكونات لكنها تختلف في الكتل التي تُنفَّذ والمدخلات التي تتلقاها. على سبيل المثال، يوفر <a href="../api/pipelines/minimax_h3">MiniMax-H3</a> مسارات <code>t2va</code> (من نص إلى فيديو وصوت)، و<code>fl2va</code> (إطار مفتاحي أول و/أو أخير)، و<code>ref2va</code> (مزيج مرتب من مراجع الصور والفيديو والصوت). مرر <code>--workflow</code> لاختيار أحدها:</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \
--model MiniMaxAI/MiniMax-H3 --workflow fl2va \
--pipeline-kwargs <span class="hljs-string">&#x27;{
&quot;prompt&quot;: &quot;the camera pushes in slowly as rain falls&quot;,
&quot;image&quot;: &quot;opening-frame.png&quot;,
&quot;last_image&quot;: &quot;closing-frame.png&quot;,
&quot;num_frames&quot;: 124
}&#x27;</span> \
--output-key videos --output-key audio \
--fps 24 --sampling-rate 32000 \
--cpu-offload auto --dtype bf16<!----></pre></div><!----> <p>يؤدي اختيار سير عمل إلى الاحتفاظ بمكاتب المهمة المعنية فقط، بحيث تعلن خط الأنابيب عن المكونات التي تحتاجها فقط، ويجلب <code>load_components</code> مجلداتها الفرعية فقط. احذف <code>--workflow</code> للاحتفاظ بجميع سلاسل العمل المتاحة ودع خط الأنابيب يختار لكل استدعاء من المدخلات المقدمة إليه.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli --format json schema --model MiniMaxAI/MiniMax-H3 --trust-remote-code<!----></pre></div><!----> <p><code>--workflow</code> ينطبق على خطوط الأنابيب المعيارية فقط. يتم تجاهله مع تحذير في خطوط الأنابيب القياسية.</p> <p>يعيد خط أنابيب معياري كائن <a href="../modular_diffusers/modular_pipeline"><code>PipelineState</code></a> بدلاً من كائن مخرجات واحد، لذا يحدد <code>--output-key</code> اسم العنصر الوسيط الذي يجب حفظه.</p> <!--[2--><h3 class="relative group"><a id="outputs" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#outputs"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->المخرجات<!----></span></h3><!--]--><!----> <p><code>run</code> يكتشف نوع مخرجات خط الأنابيب:</p> <ul><li><code>PIL.Image</code>/list → <code>&lt;NNNN>.png</code> (مؤشر مُكمّل بالأصفار، مثل <code>0000.png</code>)</li> <li>تسلسل الصور → <code>0000.mp4</code> (يتحكم <code>--fps</code> في معدل الإطارات، الافتراضي 8)</li> <li>مصفوفة الصوت → <code>0000.wav</code> (يتحكم <code>--sampling-rate</code> في المعدل)</li> <li>أي شيء آخر → إخراج JSON</li></ul> <p>تنسيق مخرج الدليل الافتراضي هو <code>~/.diffusers/cli/run/outputs/diffusers-run-&lt;YYYYMMDDTHHMMSS>-&lt;uuid>/</code>. يحصل كل تشغيل على دليل فرعي خاص به حتى لا تتجاوز الاستدعاءات المتتالية بعضها بعضًا.</p> <p>يمكنك تجاوز ذلك باستخدام <code>--output &lt;path></code>. يعتمد توسيع المسار على شكله وحجم الدفعة:</p> <table><thead><tr><th><code>--output</code></th><th>1 مخرجات</th><th>N مخرجات</th></tr></thead><tbody><tr><td><em>مُستثنى</em></td><td>المجلد الافتراضي → <code>0000.png</code></td><td>المجلد الافتراضي → <code>0000.png</code>، <code>0001.png</code>، <code>0002.png</code>، …</td></tr><tr><td><code>./results/</code> (بعلامة <code>/</code> في النهاية أو دليل موجود مسبقًا)</td><td><code>./results/0000.png</code></td><td><code>./results/0000.png</code>, <code>./results/0001.png</code>, …</td></tr><tr><td><code>my-cat.png</code> (مسار الملف)</td><td><code>my-cat.png</code> (يُستخدم كما هو)</td><td><code>my-cat-0000.png</code>, <code>my-cat-0001.png</code>, …</td></tr></tbody></table> <p>تستخدم مخرجات المجلد دائمًا أسماءً مبطّنة عارية (<code>0000</code>، <code>0001</code>، …). أما مسارات الملفات الصريحة فتحتفظ بالجذر الذي اخترته، ويُضاف إليه الفهرس المبطّن عندما ينتج عن الدفعة عدة مخرجات.</p> <p>استخدم <code>--push-to</code> لرفع المخرجات إلى <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">حاوية تخزين Hugging Face</a>. يقبل:</p> <ul><li>معرّف دلو HF (<code>&lt;namespace>/&lt;name></code>)</li> <li><code>hf://buckets/&lt;namespace>/&lt;name>[/&lt;subpath>]</code> <a href="https://huggingface.co/docs/huggingface_hub/main/en/package_reference/hf_uris" rel="nofollow">URI الخاص بـ HF</a></li> <li>عنوان المتصفح</li></ul> <p>يُستخدم المسار الفرعي كبادئة للمجلد. يتم إنشاء الدلو إذا لم يكن موجودًا، وتُحفظ الكائنات تحت <code>[&lt;subpath>/]&lt;run_id>/&lt;filename></code>.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># HF bucket id — files at hf://buckets/alice/edit-outputs/&lt;run_id&gt;/&lt;file&gt;</span>
--push-to alice/edit-outputs
<span class="hljs-comment"># URI with subpath — files at hf://buckets/alice/edit-outputs/greyscale/2026-07/&lt;run_id&gt;/&lt;file&gt;</span>
--push-to hf://buckets/alice/edit-outputs/greyscale/2026-07
<span class="hljs-comment"># Browser URL copy-paste from the Hub also works.</span>
--push-to https://huggingface.co/buckets/alice/edit-outputs/tree/greyscale/2026-07<!----></pre></div><!----> <p>تصف الجدول أدناه عمليات التشغيل عن بُعد. أما في عمليات التشغيل المحلية، فإن <code>--push-to</code> يرفع المخرجات المحفوظة محليًا. ولا يمنع إنشاء الملفات محليًا.</p> <table><thead><tr><th>هل تم تعيين <code>--push-to</code>؟</th><th>هل تم تعيين <code>--output</code>؟</th><th>النتيجة</th></tr></thead><tbody><tr><td>لا</td><td>لا</td><td>تنزيل إلى المجلد المحلي الافتراضي</td></tr><tr><td>لا</td><td>نعم</td><td>تنزيل إلى <code>--output</code></td></tr><tr><td>نعم</td><td>لا</td><td>دلو فقط، بدون تنزيل محلي</td></tr><tr><td>نعم</td><td>نعم</td><td>bucket و <code>--output</code></td></tr></tbody></table> <p><code>--format</code> يحدد شكل بيانات الوصف في الإخراج القياسي (المسارات، التوقيت، معلومات بيئة العزل). لا يغيّر هذا الخيار صيغة الملف الخاصة بالوسائط نفسها. الصور المكتوبة تكون دائمًا بصيغة PNG، والفيديوهات بصيغة MP4، والصوت بصيغة WAV.</p> <!--[2--><h3 class="relative group"><a id="remote-execution----remote-" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#remote-execution----remote-"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->التنفيذ عن بُعد ( --remote )<!----></span></h3><!--]--><!----> <p>نفّذ نفس الاستدعاء داخل <a href="https://huggingface.co/docs/huggingface_hub/en/guides/sandbox" rel="nofollow">Hugging Face Sandbox</a> — وهو جهاز افتراضي سحابي معزول تتحكم فيه أداة CLI عبر HTTP: يقوم برفع المدخلات، وتنفيذ خط المعالجة، وتنزيل المخرجات، ثم إنهاء بيئة العزل. يتطلب <code>huggingface_hub>=1.23</code>.</p> <p>تُشغَّل بيئة العزل من <a href="https://hub.docker.com/r/diffusers/diffusers-cli-cuda" rel="nofollow"><code>diffusers/diffusers-cli-cuda</code></a>، وهو صورة جاهزة مسبقاً تتضمن بالفعل torch وCUDA والتبعيات الخاصة بأداة سطر الأوامر، مما يعني أن التشغيل البارد يبدأ في التوليد مباشرة بدلاً من التثبيت أولاً.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!---->diffusers-cli run \
--model black-forest-labs/FLUX.1-dev --dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;an astronaut riding a horse&quot;}&#x27;</span> \
--remote --flavor a100-large<!----></pre></div><!----> <p>أعلام عن بُعد:</p> <ul><li><code>--flavor &lt;name></code> — عتاد بيئة العزل (على سبيل المثال، <code>a10g-small</code>، <code>h200</code>، <code>rtx-pro-6000</code>).</li> <li><code>--timeout &lt;duration></code> — الحد الأقصى للوقت الفعلي لأمر التشغيل داخل بيئة العزل (الافتراضي <code>10m</code>).</li> <li><code>--dependencies &lt;pkg></code> — تبعيات pip إضافية (قابلة للتكرار)، تُثبَّت فوق الصورة. مفيدة لتثبيت فرع tarball لـ diffusers أو لإضافة إضافات خاصة بخط أنابيب معين.</li> <li><code>--namespace &lt;name></code> — إنشاء بيئة العزل تحت منظمة/حساب HF مختلف.</li> <li><code>--image &lt;ref></code> — تجاوز صورة بيئة العزل. يجب أن تتضمن <code>--flavor</code> المتوافق مع محرك التشغيل الخاص بك. ثم يقوم سطر الأوامر بتثبيت تبعياته الخاصة فوقها في كل بيئة عزل باردة، وهو ما تتجنبه الصورة الافتراضية.</li> <li><code>--volume &lt;bucket-id>[:&lt;mount-path>]</code> — يُثبّت <a href="https://huggingface.co/docs/hub/en/storage-buckets" rel="nofollow">حاوية تخزين HF</a> داخل بيئة العزل كمجلد قابل للقراءة والكتابة (يمكن تكراره). مسار التثبيت الافتراضي هو <code>/mnt/buckets/&lt;bucket-id></code>. يمكن الإشارة إلى الملفات المثبتة من <code>--pipeline-kwargs</code> كما لو كانت مسارات محلية أخرى.
يُطبَّق هذا الخيار فقط عند إنشاء بيئة عزل جديدة ويُتجاهل عند إعادة الاتصال عبر <code>--sandbox-id</code>.</li></ul> <p>بشكل افتراضي، كل تشغيل لـ <code>--remote</code> مؤقت (إنشاء ← تشغيل ← تنزيل ← إنهاء). لإعادة استخدام بيئة اختبار دافئة عبر
التشغيلات — مع الحفاظ على التبعيات، وكاش أوزان النموذج، وكاش <code>torch.compile</code> على قرصها — أبقِها نشطة
وأعد الاتصال بها:</p> <ul><li><code>--keep-alive</code> — لا تُنهِ بيئة العزل بعد انتهاء التشغيل. يتم طباعته معرّفها.</li> <li><code>--sandbox-id &lt;id></code> — إعادة الاتصال ببيئة رملية محفوظة بدلاً من إنشاء بيئة جديدة.</li> <li><code>--idle-timeout &lt;duration></code> — إيقاف تلقائي بعد هذه المدة من عدم النشاط (الافتراضي <code>10m</code>). يُطبَّق فقط عند إنشاء صندوق رمل جديد ويُتجاهل عند إعادة الاتصال عبر <code>--sandbox-id</code>.</li></ul> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># First run keeps the sandbox alive and prints sandbox_id=&lt;id&gt;.</span>
diffusers-cli run -m black-forest-labs/FLUX.1-dev --dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;a cat&quot;}&#x27;</span> --remote --flavor a100-large --keep-alive
<span class="hljs-comment"># Reconnect for the next run — the model is already cached, so only inference runs.</span>
diffusers-cli run -m black-forest-labs/FLUX.1-dev --dtype bf16 \
--pipeline-kwargs <span class="hljs-string">&#x27;{&quot;prompt&quot;: &quot;a dog&quot;}&#x27;</span> --remote --flavor a100-large --sandbox-id &lt;<span class="hljs-built_in">id</span>&gt;
<span class="hljs-comment"># Stop it when done (or let it timeout).</span>
hf sandbox <span class="hljs-built_in">kill</span> &lt;<span class="hljs-built_in">id</span>&gt;<!----></pre></div><!----> <!--[1--><h2 class="relative group"><a id="customblocks" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#customblocks"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->custom_blocks<!----></span></h2><!--]--><!----> <p>تغليف فئة فرعية محلية من <code>ModularPipelineBlocks</code> للرفع إلى Hub. يقرأ ملف Python، ويفحصه باستخدام AST بحثاً عن فئات مشتقة من <code>ModularPipelineBlocks</code> أو إحدى فئاتها الفرعية المركبة (<code>SequentialPipelineBlocks</code>، <code>AutoPipelineBlocks</code>، <code>ConditionalPipelineBlocks</code>، <code>LoopSequentialPipelineBlocks</code>)، ثم يولّد مثيلاً للفئة المختارة، ويستدعي <code>save_pretrained</code> في مجلد العمل الحالي.</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># Package the first block found in ./block.py</span>
diffusers-cli custom_blocks
<span class="hljs-comment"># Point at a different file / pick a specific class</span>
diffusers-cli custom_blocks --block_module_name my_block.py --block_class_name MyDenoiseBlock<!----></pre></div><!----> <p>يجب أن يكون من الممكن إنشاء كائن من فئة الكتلة دون أي معاملات في مُنشئها، مع ترميز القيم الافتراضية بشكل ثابت في <code>__init__</code> أو قراءة الإعدادات من <code>state</code> الخاص بالخط الأنابيب عند وقت الاستدعاء.</p> <!--[1--><h2 class="relative group"><a id="fp16safetensors" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#fp16safetensors"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->fp16_safetensors<!----></span></h2><!--]--><!----> <blockquote class="caution"><p>أصبح هذا الأمر غير مدعوم وسيتم إزالته في إصدار مستقبلي.</p></blockquote> <p>تحويل نقطة تفتيش على Hub إلى <code>.safetensors</code> بصيغة fp16 ودفع النتيجة. مفيد لتقليل حجم الأوزان في المستودع لتحميل أسرع. راجع <code>diffusers-cli fp16_safetensors --help</code> لمعرفة الحجة الدقيقة.</p> <!--[1--><h2 class="relative group"><a id="skills" class="header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full" href="#skills"><span><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 256"><path d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z" fill="currentColor"></path></svg><!----></span></a> <span><!---->المهارات<!----></span></h2><!--]--><!----> <p>قم بتثبيت المهارات من مستودع diffusers (<a href="https://github.com/huggingface/diffusers/tree/main/.ai/skills" rel="nofollow"><code>.ai/skills/</code></a>).</p> <div class="code-block relative "><div class="absolute top-2.5 right-4"><button class="inline-flex items-center relative text-sm focus:text-green-500 cursor-pointer focus:outline-none transition duration-200 ease-in-out opacity-0 mx-0.5 text-gray-600 " title="code excerpt" type="button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg><!----> <div class=" absolute pointer-events-none transition-opacity bg-black text-white py-1 px-2 leading-tight rounded font-normal shadow left-1/2 top-full transform -translate-x-1/2 translate-y-2 opacity-0 "><div class="absolute bottom-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-black border-4 border-t-0" style="border-left-color: transparent; border-right-color: transparent;"></div> تم النسخ</div><!----></button><!----></div> <pre class="language-bash "><!----><span class="hljs-comment"># Install a single skill</span>
diffusers-cli skills add <span class="hljs-string">&quot;&lt;skill name&gt;&quot;</span>
<span class="hljs-comment"># Install every skill in the registry</span>
diffusers-cli skills add --all
<span class="hljs-comment"># List available skills with a one-line summary of each</span>
diffusers-cli skills list
<span class="hljs-comment"># Preview a skill&#x27;s SKILL.md without installing</span>
diffusers-cli skills preview diffusers-cli
<span class="hljs-comment"># Refetch and reinstall every managed skill</span>
diffusers-cli skills update
<span class="hljs-comment"># Install to the user-level directory instead of the current project</span>
diffusers-cli skills add diffusers-cli --global
<span class="hljs-comment"># Install for one agent instead of detecting it from the environment</span>
diffusers-cli skills add --all --claude <span class="hljs-comment"># or --codex / --cursor</span><!----></pre></div><!----> <p>بدون علم الهدف، يثبّت سطر الأوامر (CLI) للوك الذي أطلقه، أو لكل الوكلاء عندما لا يستطيع التمييز. يحصل Claude Code على حزمة إضافات تحت <code>.claude/skills/diffusers/</code> (بمساحة أسماء <code>/diffusers:&lt;skill name></code>). يحصل Codex وCursor على <code>.agents/skills/&lt;skill name>/</code>.</p> <a class="!text-gray-400 !no-underline text-sm flex items-center not-prose mt-4" href="https://github.com/huggingface/diffusers/blob/main/docs/source/en/using-diffusers/cli.md" target="_blank"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M31,16l-7,7l-1.41-1.41L28.17,16l-5.58-5.59L24,9l7,7z"></path><path d="M1,16l7-7l1.41,1.41L3.83,16l5.58,5.59L8,23l-7-7z"></path><path d="M12.419,25.484L17.639,6.552l1.932,0.518L14.351,26.002z"></path></svg><!----> <span><span class="underline">Update</span> on GitHub</span></a><!----> <p></p><!--]--><!----><!--]--><!--]--><!--]--> <!--[-1--><!--]--><!--]-->
<script>
{
__sveltekit_1qsdbwf = {
base: "/docs/diffusers/main/en",
assets: "/docs/diffusers/main/en"
};
const element = document.currentScript.parentElement;
Promise.all([
import("/docs/diffusers/main/en/_app/immutable/entry/start.0S0_iEoG.js"),
import("/docs/diffusers/main/en/_app/immutable/entry/app.CPdOxCbw.js")
]).then(([kit, app]) => {
kit.start(app, element, {
node_ids: [0, 388],
data: [null,null],
form: null,
error: null
});
});
}
</script>

Xet Storage Details

Size:
67.1 kB
·
Xet hash:
06d87d604b62cfeb021af7db15ac5555bf14023aa35efa36ae9f90a7bf4d0273

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.