import{s as O,n as M,o as x}from"../chunks/scheduler.182ea377.js";import{S as y,i as R,g as f,s as h,r as H,A as S,h as m,f as n,c as p,j as $,u as E,x as b,k as L,y as k,a as i,v as z,d as A,t as C,w as j}from"../chunks/index.abf12888.js";import{H as q}from"../chunks/Heading.16916d63.js";function F(_){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/v0.7.2/en/trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a>.',D,l,v='For more information, check out the <a href="https://huggingface.co/docs/trl/v0.7.2/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.',w,c,P;return r=new q({props:{title:"Reinforcement learning training with DDPO",local:"reinforcement-learning-training-with-ddpo",headingTag:"h1"}}),{c(){a=f("meta"),u=h(),s=f("p"),d=h(),H(r.$$.fragment),g=h(),o=f("p"),o.innerHTML=T,D=h(),l=f("p"),l.innerHTML=v,w=h(),c=f("p"),this.h()},l(e){const t=S("svelte-u9bgzb",document.head);a=m(t,"META",{name:!0,content:!0}),t.forEach(n),u=p(e),s=m(e,"P",{}),$(s).forEach(n),d=p(e),E(r.$$.fragment,e),g=p(e),o=m(e,"P",{"data-svelte-h":!0}),b(o)!=="svelte-fn9psq"&&(o.innerHTML=T),D=p(e),l=m(e,"P",{"data-svelte-h":!0}),b(l)!=="svelte-j6avdz"&&(l.innerHTML=v),w=p(e),c=m(e,"P",{}),$(c).forEach(n),this.h()},h(){L(a,"name","hf:doc:metadata"),L(a,"content",B)},m(e,t){k(document.head,a),i(e,u,t),i(e,s,t),i(e,d,t),z(r,e,t),i(e,g,t),i(e,o,t),i(e,D,t),i(e,l,t),i(e,w,t),i(e,c,t),P=!0},p:M,i(e){P||(A(r.$$.fragment,e),P=!0)},o(e){C(r.$$.fragment,e),P=!1},d(e){e&&(n(u),n(s),n(d),n(g),n(o),n(D),n(l),n(w),n(c)),n(a),j(r,e)}}}const B='{"title":"Reinforcement learning training with DDPO","local":"reinforcement-learning-training-with-ddpo","sections":[],"depth":1}';function I(_){return x(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class J extends y{constructor(a){super(),R(this,a,I,F,O,{})}}export{J as component};
