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 A,d as C,t as q,w as z}from"../chunks/index.abf12888.js";import{H as F}from"../chunks/Heading.16916d63.js";function j(_){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.4/en/trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a>.',w,l,v='For more information, check out the <a href="https://huggingface.co/docs/trl/v0.7.4/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 F({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,w=h(),l=f("p"),l.innerHTML=v,D=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-ugeawc"&&(o.innerHTML=T),w=p(e),l=m(e,"P",{"data-svelte-h":!0}),b(l)!=="svelte-g1nq61"&&(l.innerHTML=v),D=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),A(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:M,i(e){P||(C(r.$$.fragment,e),P=!0)},o(e){q(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),z(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,j,O,{})}}export{J as component};
