import{s as k,n as z,o as A}from"../chunks/scheduler.182ea377.js";import{S as C,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.abf12888.js";import{H as B,E as G}from"../chunks/EditOnGithub.9b8e78e4.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.8.6/en/trainer#trl.DDPOTrainer" rel="nofollow">DDPOTrainer</a>.',D,s,v='For more information, check out the <a href="https://huggingface.co/docs/trl/v0.8.6/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(),m=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=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-e4cfkz"&&(o.innerHTML=b),D=c(e),s=p(e,"P",{"data-svelte-h":!0}),x(s)!=="svelte-1nlrrga"&&(s.innerHTML=v),P=c(e),M(l.$$.fragment,e),_=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,P,t),R(l,e,t),i(e,_,t),i(e,h,t),$=!0},p:z,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(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 A(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Q extends C{constructor(a){super(),F(this,a,Y,I,k,{})}}export{Q as component};
