import{s as k,n as A,o as F}from"../chunks/scheduler.53228c21.js";import{S as j,i as q,e as h,s as m,c as x,h as B,a as d,d as n,b as c,f as S,g as v,j as C,k as z,l as G,m as i,n as L,t as y,o as M,p as O}from"../chunks/index.100fac89.js";import{C as I}from"../chunks/CopyLLMTxtMenu.b0ff86f3.js";import{H as U,E as Y}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.136ef3fd.js";function J(R){let a,g,p,$,o,w,r,D,s,E='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>.',_,l,H='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.',P,f,b,u,T;return o=new I({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),r=new U({props:{title:"Reinforcement learning training with DDPO",local:"reinforcement-learning-training-with-ddpo",headingTag:"h1"}}),f=new Y({props:{source:"https://github.com/huggingface/diffusers/blob/main/docs/source/en/training/ddpo.md"}}),{c(){a=h("meta"),g=m(),p=h("p"),$=m(),x(o.$$.fragment),w=m(),x(r.$$.fragment),D=m(),s=h("p"),s.innerHTML=E,_=m(),l=h("p"),l.innerHTML=H,P=m(),x(f.$$.fragment),b=m(),u=h("p"),this.h()},l(e){const t=B("svelte-u9bgzb",document.head);a=d(t,"META",{name:!0,content:!0}),t.forEach(n),g=c(e),p=d(e,"P",{}),S(p).forEach(n),$=c(e),v(o.$$.fragment,e),w=c(e),v(r.$$.fragment,e),D=c(e),s=d(e,"P",{"data-svelte-h":!0}),C(s)!=="svelte-xh4nvs"&&(s.innerHTML=E),_=c(e),l=d(e,"P",{"data-svelte-h":!0}),C(l)!=="svelte-1x2czau"&&(l.innerHTML=H),P=c(e),v(f.$$.fragment,e),b=c(e),u=d(e,"P",{}),S(u).forEach(n),this.h()},h(){z(a,"name","hf:doc:metadata"),z(a,"content",K)},m(e,t){G(document.head,a),i(e,g,t),i(e,p,t),i(e,$,t),L(o,e,t),i(e,w,t),L(r,e,t),i(e,D,t),i(e,s,t),i(e,_,t),i(e,l,t),i(e,P,t),L(f,e,t),i(e,b,t),i(e,u,t),T=!0},p:A,i(e){T||(y(o.$$.fragment,e),y(r.$$.fragment,e),y(f.$$.fragment,e),T=!0)},o(e){M(o.$$.fragment,e),M(r.$$.fragment,e),M(f.$$.fragment,e),T=!1},d(e){e&&(n(g),n(p),n($),n(w),n(D),n(s),n(_),n(l),n(P),n(b),n(u)),n(a),O(o,e),O(r,e),O(f,e)}}}const K='{"title":"Reinforcement learning training with DDPO","local":"reinforcement-learning-training-with-ddpo","sections":[],"depth":1}';function N(R){return F(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Z extends j{constructor(a){super(),q(this,a,N,J,k,{})}}export{Z as component};
