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