import{s as k,n as A,o as C}from"../chunks/scheduler.8c3d61f6.js";import{S as z,i as F,g as u,s as f,r as O,A as j,h as p,f as n,c,j as L,u as M,x,k as y,y as q,a as i,v as R,d as E,t as H,w as S}from"../chunks/index.da70eac4.js";import{H as B,E as G}from"../chunks/EditOnGithub.1e64e623.js";function I(T){let a,d,m,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/v0.13.0/en/ddpo_trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a>.',D,s,v='For more information, check out the <a href="https://huggingface.co/docs/trl/v0.13.0/en/ddpo_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.',_,l,P,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(),m=u("p"),g=f(),O(r.$$.fragment),w=f(),o=u("p"),o.innerHTML=b,D=f(),s=u("p"),s.innerHTML=v,_=f(),O(l.$$.fragment),P=f(),h=u("p"),this.h()},l(e){const t=j("svelte-u9bgzb",document.head);a=p(t,"META",{name:!0,content:!0}),t.forEach(n),d=c(e),m=p(e,"P",{}),L(m).forEach(n),g=c(e),M(r.$$.fragment,e),w=c(e),o=p(e,"P",{"data-svelte-h":!0}),x(o)!=="svelte-1u2wr8d"&&(o.innerHTML=b),D=c(e),s=p(e,"P",{"data-svelte-h":!0}),x(s)!=="svelte-1lkauvc"&&(s.innerHTML=v),_=c(e),M(l.$$.fragment,e),P=c(e),h=p(e,"P",{}),L(h).forEach(n),this.h()},h(){y(a,"name","hf:doc:metadata"),y(a,"content",U)},m(e,t){q(document.head,a),i(e,d,t),i(e,m,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,_,t),R(l,e,t),i(e,P,t),i(e,h,t),$=!0},p:A,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(m),n(g),n(w),n(o),n(D),n(s),n(_),n(P),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 C(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Q extends z{constructor(a){super(),F(this,a,Y,I,k,{})}}export{Q as component};
