import{s as O,n as x,o as y}from"../chunks/scheduler.182ea377.js";import{S as M,i as R,g as f,s as m,r as H,A as S,h,f as n,c as p,j as $,u as k,x as b,k as L,y as E,a as i,v as j,d as q,t as A,w as C}from"../chunks/index.1ea56653.js";import{H as z,g as F}from"../chunks/Heading.71ac6e9f.js";function B(_){let a,u,s,d,r,g,o,T='You can fine-tune Stable Diffusion on a reward function via reinforcement learning with the 🤗 TRL library and 🤗 Diffusers. This is done with the Denoising Diffusion Policy Optimization (DDPO) algorithm introduced by Black et al. in <a href="https://arxiv.org/abs/2305.13301" rel="nofollow">Training Diffusion Models with Reinforcement Learning</a>, which is implemented in 🤗 TRL with the <a href="https://huggingface.co/docs/trl/main/en/trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a>.',w,l,v='For more information, check out the <a href="https://huggingface.co/docs/trl/main/en/trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a> API reference and the <a href="https://huggingface.co/blog/trl-ddpo" rel="nofollow">Finetune Stable Diffusion Models with DDPO via TRL</a> blog post.',D,c,P;return r=new z({props:{title:"Reinforcement learning training with DDPO",local:"reinforcement-learning-training-with-ddpo",headingTag:"h1"}}),{c(){a=f("meta"),u=m(),s=f("p"),d=m(),H(r.$$.fragment),g=m(),o=f("p"),o.innerHTML=T,w=m(),l=f("p"),l.innerHTML=v,D=m(),c=f("p"),this.h()},l(e){const t=S("svelte-u9bgzb",document.head);a=h(t,"META",{name:!0,content:!0}),t.forEach(n),u=p(e),s=h(e,"P",{}),$(s).forEach(n),d=p(e),k(r.$$.fragment,e),g=p(e),o=h(e,"P",{"data-svelte-h":!0}),b(o)!=="svelte-1kjmrxq"&&(o.innerHTML=T),w=p(e),l=h(e,"P",{"data-svelte-h":!0}),b(l)!=="svelte-jwyq5v"&&(l.innerHTML=v),D=p(e),c=h(e,"P",{}),$(c).forEach(n),this.h()},h(){L(a,"name","hf:doc:metadata"),L(a,"content",G)},m(e,t){E(document.head,a),i(e,u,t),i(e,s,t),i(e,d,t),j(r,e,t),i(e,g,t),i(e,o,t),i(e,w,t),i(e,l,t),i(e,D,t),i(e,c,t),P=!0},p:x,i(e){P||(q(r.$$.fragment,e),P=!0)},o(e){A(r.$$.fragment,e),P=!1},d(e){e&&(n(u),n(s),n(d),n(g),n(o),n(w),n(l),n(D),n(c)),n(a),C(r,e)}}}const G='{"title":"Reinforcement learning training with DDPO","local":"reinforcement-learning-training-with-ddpo","sections":[],"depth":1}';function I(_){return y(()=>{new URLSearchParams(window.location.search).get("fw"),window.hfDocGoto=F}),[]}class K extends M{constructor(a){super(),R(this,a,I,B,O,{})}}export{K as component};
