import{s as k,n as z,o as A}from"../chunks/scheduler.8c3d61f6.js";import{S as C,i as F,g as u,s as c,r as L,A as j,h as p,f as n,c as f,j as x,u as M,x as O,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/getInferenceSnippets.cd165132.js";function I(b){let a,d,m,g,o,w,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://huggingface.co/papers/2305.13301" rel="nofollow">Training Diffusion Models with Reinforcement Learning</a>, which is implemented in 🤗 TRL with the <code>DDPOTrainer</code>.',D,s,v='For more information, check out the <code>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.',_,l,$,h,P;return o=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=c(),m=u("p"),g=c(),L(o.$$.fragment),w=c(),r=u("p"),r.innerHTML=T,D=c(),s=u("p"),s.innerHTML=v,_=c(),L(l.$$.fragment),$=c(),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=f(e),m=p(e,"P",{}),x(m).forEach(n),g=f(e),M(o.$$.fragment,e),w=f(e),r=p(e,"P",{"data-svelte-h":!0}),O(r)!=="svelte-xh4nvs"&&(r.innerHTML=T),D=f(e),s=p(e,"P",{"data-svelte-h":!0}),O(s)!=="svelte-1x2czau"&&(s.innerHTML=v),_=f(e),M(l.$$.fragment,e),$=f(e),h=p(e,"P",{}),x(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(o,e,t),i(e,w,t),i(e,r,t),i(e,D,t),i(e,s,t),i(e,_,t),R(l,e,t),i(e,$,t),i(e,h,t),P=!0},p:z,i(e){P||(E(o.$$.fragment,e),E(l.$$.fragment,e),P=!0)},o(e){H(o.$$.fragment,e),H(l.$$.fragment,e),P=!1},d(e){e&&(n(d),n(m),n(g),n(w),n(r),n(D),n(s),n(_),n($),n(h)),n(a),S(o,e),S(l,e)}}}const U='{"title":"Reinforcement learning training with DDPO","local":"reinforcement-learning-training-with-ddpo","sections":[],"depth":1}';function Y(b){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};
