import{s as k,n as j,o as q}from"../chunks/scheduler.8c3d61f6.js";import{S as A,i as C,g as u,s as f,r as O,A as z,h as p,f as n,c as m,j as L,u as x,x as y,k as M,y as F,a as i,v as R,d as E,t as H,w as S}from"../chunks/index.589a98e8.js";import{H as B,E as G}from"../chunks/EditOnGithub.e5a8d9cb.js";function I(T){let a,d,c,g,r,w,o,b='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>.',D,s,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.',P,l,_,h,$;return r=new B({props:{title:"Reinforcement learning training with DDPO",local:"reinforcement-learning-training-with-ddpo",headingTag:"h1"}}),l=new G({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/training/ddpo.md"}}),{c(){a=u("meta"),d=f(),c=u("p"),g=f(),O(r.$$.fragment),w=f(),o=u("p"),o.innerHTML=b,D=f(),s=u("p"),s.innerHTML=v,P=f(),O(l.$$.fragment),_=f(),h=u("p"),this.h()},l(e){const t=z("svelte-u9bgzb",document.head);a=p(t,"META",{name:!0,content:!0}),t.forEach(n),d=m(e),c=p(e,"P",{}),L(c).forEach(n),g=m(e),x(r.$$.fragment,e),w=m(e),o=p(e,"P",{"data-svelte-h":!0}),y(o)!=="svelte-1kjmrxq"&&(o.innerHTML=b),D=m(e),s=p(e,"P",{"data-svelte-h":!0}),y(s)!=="svelte-jwyq5v"&&(s.innerHTML=v),P=m(e),x(l.$$.fragment,e),_=m(e),h=p(e,"P",{}),L(h).forEach(n),this.h()},h(){M(a,"name","hf:doc:metadata"),M(a,"content",U)},m(e,t){F(document.head,a),i(e,d,t),i(e,c,t),i(e,g,t),R(r,e,t),i(e,w,t),i(e,o,t),i(e,D,t),i(e,s,t),i(e,P,t),R(l,e,t),i(e,_,t),i(e,h,t),$=!0},p:j,i(e){$||(E(r.$$.fragment,e),E(l.$$.fragment,e),$=!0)},o(e){H(r.$$.fragment,e),H(l.$$.fragment,e),$=!1},d(e){e&&(n(d),n(c),n(g),n(w),n(o),n(D),n(s),n(P),n(_),n(h)),n(a),S(r,e),S(l,e)}}}const U='{"title":"Reinforcement learning training with DDPO","local":"reinforcement-learning-training-with-ddpo","sections":[],"depth":1}';function Y(T){return q(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Q extends A{constructor(a){super(),C(this,a,Y,I,k,{})}}export{Q as component};
