1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7254],{21593:(e,s,t)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/guide/advanced-parameters/steps",function(){return t(22942)}])},22942:(e,s,t)=>{"use strict";t.r(s),t.d(s,{default:()=>x});var a=t(6029),l=t(34494),i=t(92505),r=t(47724),n=t(26758),d=t(56266),m=t(27835),o=t(92907),c=t(78138),u=t(55729);let h=e=>{var s,t,l,i;let{prompt:r,selectedModel:m}=e,[o,c]=(0,u.useState)((null==m||null==(s=m.parameters)?void 0:s.steps)||8),h=(0,u.useMemo)(()=>{var e;return(0,n.$Z)({modelName:(null==m||null==(e=m.modelName)?void 0:e.toLowerCase())||"schnell"})},[m.modelName]),p=(0,u.useMemo)(()=>{var e;let s=(null==m||null==(e=m.limits)?void 0:e.maxSteps)||10;return Array.from({length:s},(e,t)=>s-t).map(e=>({...h,parameters:{...h.parameters,steps:e,prompt:r}}))},[r,m,h]),{fetchingJobs:x,completedJobs:g}=(0,n.J6)({inferenceJobs:p}),b=JSON.stringify({...h,parameters:{...h.parameters,steps:o,prompt:r}}),v=g[b],j=x[b],f=(null==v||null==(t=v.prediction_images)?void 0:t.map(e=>e.image))||[],N=(0,u.useCallback)(e=>{c(e)},[m]);return(0,a.jsxs)("div",{className:"my-8",children:[(0,a.jsx)("h3",{className:"text-xl font-semibold mb-4",children:r}),(0,a.jsx)("div",{className:"relative aspect-square w-full max-w-2xl mx-auto bg-gray-100 rounded-lg overflow-hidden",children:j?(0,a.jsxs)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50",children:[(0,a.jsx)(d.a,{className:"w-8 h-8 animate-spin text-blue-500"}),(0,a.jsxs)("span",{className:"ml-2 text-gray-600",children:["Generating ",o," steps... ",m.modelName]})]}):f.length>0?(0,a.jsx)("img",{src:f[0],alt:"".concat(r," at step ").concat(o),className:"w-full h-full object-cover"}):(0,a.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-gray-50",children:(0,a.jsx)("span",{className:"text-gray-600",children:"No image generated yet"})})}),(0,a.jsxs)("div",{className:"w-full mt-6",children:[(0,a.jsxs)("div",{className:"flex justify-between mb-2",children:[(0,a.jsxs)("span",{className:"text-sm text-gray-600",children:["Step: ",o]}),(0,a.jsxs)("span",{className:"text-sm text-gray-600",children:["Max: ",(null==m||null==(l=m.limits)?void 0:l.maxSteps)||10]})]}),(0,a.jsx)("input",{type:"range",value:o,onChange:e=>N(Number(e.target.value)),min:"1",max:(null==m||null==(i=m.limits)?void 0:i.maxSteps)||10,className:"w-full"})]})]})},p=()=>{let[e,s]=(0,u.useState)(l.$b[0]),t=(0,n._X)();return(0,a.jsxs)("div",{className:"max-w-4xl mx-auto px-4 py-8",children:[(0,a.jsx)(m.A,{title:"Steps Guide - AI Image Generation",description:"Get started with AI image generation. Learn how steps parameter affects the generated image",url:"".concat(o._g.frontendUrl).concat(c.J.aieasypic.guideAdvancedParametersSteps)}),(0,a.jsx)(i.yt,{slug:"steps"}),(0,a.jsx)("h1",{className:"text-2xl font-bold mb-6",children:"Guide to Steps Parameter"}),(0,a.jsx)("p",{className:"text-lg mb-4",children:"Navigate the steps parameter with ease using our guide. Find out how the number of steps affects image quality and adjust it accordingly."}),(0,a.jsx)(r.w,{children:"This parameter is not available in AIEasyPic's Basic mode, which generates good results without adjustable parameters."}),(0,a.jsxs)("div",{className:"prose max-w-none",children:[(0,a.jsx)("h2",{className:"text-xl font-semibold mt-8 mb-4",children:"What do sampling steps mean?"}),(0,a.jsx)("p",{children:"First, let's briefly introduce the steps parameter and diffusion models in general. Generally speaking, using more steps can improve the image quality, but there's no need to always max them out."}),(0,a.jsx)("p",{className:"mt-4",children:"Our models are iterative processesâa repeated cycle that starts with random noise generated from text input. Some noise is removed with each step, resulting in a higher-quality image over time. The repetition stops when the desired number of steps is completed."}),(0,a.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4 my-6",children:[(0,a.jsx)("p",{className:"font-semibold text-green-800",children:"Recommendation:"}),(0,a.jsx)("p",{className:"text-green-700",children:"Use steps set by default in AIEasyPic tools. Increase when you believe the quality is low. But remember that more steps mean more time for each generation"})]}),(0,a.jsxs)("h2",{className:"text-2xl font-semibold mt-8 mb-4",children:["Sampling steps comparison for ",e.modelName]}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,a.jsx)(h,{prompt:"'puppy on a mountain'",selectedModel:e}),(0,a.jsx)(h,{prompt:"'photo of a beautiful woman'",selectedModel:e})]}),(0,a.jsx)("h2",{className:"text-2xl font-semibold mt-8 mb-4",children:"Frequently Asked Questions"}),(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"border-b border-gray-200 pb-4",children:[(0,a.jsx)("h3",{className:"font-semibold text-lg",children:"What are the sampling steps in Stable Diffusion?"}),(0,a.jsx)("p",{className:"mt-2",children:"Sampling steps control how many times the model refines an image. It starts with rough noise and gradually turns it into something clear."})]}),(0,a.jsxs)("div",{className:"border-b border-gray-200 pb-4",children:[(0,a.jsx)("h3",{className:"font-semibold text-lg",children:"How many sampling steps should I use?"}),(0,a.jsx)("p",{className:"mt-2",children:"By default each model has a preset good balance between quality and speed."}),(0,a.jsx)("ul",{className:"list-disc list-inside mt-2",children:t.map(e=>{var s;return(0,a.jsxs)("li",{children:["Version ",e.version,": ",null==e||null==(s=e.parameters)?void 0:s.steps," steps"]},e.version)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"font-semibold text-lg",children:"Will more steps make my image better?"}),(0,a.jsxs)("p",{className:"mt-2",children:["Not necessarily. After ",e.limits.maxSteps," steps with"," ",e.modelName,", any extra improvement is usually very small and might not be worth the extra time."]})]})]})]})]})},x=()=>(0,a.jsx)(i.dW,{children:(0,a.jsx)(p,{})})},26758:(e,s,t)=>{"use strict";t.d(s,{$Z:()=>d,J6:()=>n,_X:()=>m});var a=t(34494),l=t(1751),i=t(58943),r=t(55729);let n=e=>{let{inferenceJobs:s}=e,[t,a]=(0,r.useState)({}),[i,n]=(0,r.useState)({}),{mutate:d}=(0,l.V82)({request:{baseURL:"https://1aieasypic_go.aieasypic.com/go-api/proxy"}});return(0,r.useEffect)(()=>{let e=!0,l=0;n({});let r=()=>{if(!e||l>=s.length)return;let m=s.slice(l,l+1);l+=1,m.forEach(s=>{var l,m;let o=JSON.stringify(s);(null==(m=i[o])||null==(l=m.prediction_images)?void 0:l.length)||t[o]||(a(e=>({...e,[o]:!0})),d({data:s},{onSuccess:s=>{var t;e&&((null==(t=s.prediction_images)?void 0:t.length)&&n(e=>({...e,[o]:s})),a(e=>({...e,[o]:!1})),r())},onError:e=>{console.error("Error creating or finding inference job",e),a(e=>({...e,[o]:!1})),r()}}))})};return r(),()=>{e=!1}},[s]),{fetchingJobs:t,completedJobs:i}},d=e=>{var s;let{modelName:t,seed:l}=e,r=null===a.Po||void 0===a.Po?void 0:a.Po.find(e=>{var s,a;return null==e||null==(a=e.modelName)||null==(s=a.toLowerCase())?void 0:s.includes(t)});return{model:(null==r?void 0:r.replacementModelId)||(null==r?void 0:r.value),show_public:!0,id:0,created_at:"",prediction_images:[],status:i.e3.P,parameters:{...null==r?void 0:r.parameters,id:0,prompt:"test",width:512,height:512,controlnet_parameters:[],model:null==r||null==(s=r.value)?void 0:s.toString(),seed:null!=l?l:100}}},m=()=>{let e={};return a.$b.forEach(s=>{var t;!e[s.version]&&(null==(t=s.label)?void 0:t.includes("Photo"))&&(e[s.version]={...s,limits:{...s.limits,maxSteps:s.limits.maxSteps>30?30:s.limits.maxSteps}})}),Object.values(e)}},47724:(e,s,t)=>{"use strict";t.d(s,{w:()=>i});var a=t(6029),l=t(50016);let i=e=>{let{children:s,type:t="info"}=e;return(0,a.jsxs)("div",{className:"border rounded-lg p-4 my-4 flex items-start ".concat({info:"bg-blue-50 border-blue-200 text-blue-800",tip:"bg-green-50 border-green-200 text-green-800"}[t]),children:["info"===t?(0,a.jsx)(l._TA,{className:"w-5 h-5 mt-0.5 mr-3 flex-shrink-0"}):(0,a.jsx)(l.xZp,{className:"w-5 h-5 mt-0.5 mr-3 flex-shrink-0"}),(0,a.jsx)("div",{children:s})]})}},92505:(e,s,t)=>{"use strict";t.d(s,{Ay:()=>h,dW:()=>c,dw:()=>m,yt:()=>u});var a=t(6029),l=t(50016),i=t(78138),r=t(82203),n=t.n(r),d=t(55729);let m=[{title:"Basic Parameters",icon:l.toq,slug:"parameters",subLinks:[{title:"Prompt",slug:"prompt",icon:l.c11,description:"Learn how to write effective prompts that generate your desired images accurately."},{title:"Aspect Ratio",slug:"aspect-ratio",icon:l.Bak,description:"Understand how to set and work with different image dimensions and ratios."}]}],o=e=>{let{isOpen:s,onClose:t}=e;return(0,a.jsx)("div",{className:"\n fixed inset-y-0 left-0 transform \n md:sticky md:top-14 md:translate-x-0 \n transition duration-200 ease-in-out\n py-20 md:py-4 bg-white \n ".concat(s?"translate-x-0":"-translate-x-full","\n z-30 w-64 max-h-screen\n "),children:(0,a.jsxs)("nav",{className:"h-screenborder-r border-gray-200 p-4",children:[(0,a.jsxs)("div",{className:"flex justify-between items-center mb-6 md:hidden",children:[(0,a.jsx)("h2",{className:"text-xl font-bold",children:"Guide"}),(0,a.jsx)("button",{onClick:t,className:"p-1 hover:bg-gray-100 rounded-md",children:(0,a.jsx)(l.raE,{className:"w-5 h-5"})})]}),(0,a.jsx)("div",{className:"h-full overflow-y-auto py-2",children:m.map(e=>(0,a.jsxs)("div",{className:"mb-6",children:[(0,a.jsx)("h3",{className:"text-lg font-semibold mb-2",children:e.title}),(0,a.jsx)("div",{className:"space-y-2",children:e.subLinks.map(s=>(0,a.jsx)(n(),{href:"/guide/".concat(e.slug,"/").concat(s.slug),children:(0,a.jsxs)("div",{className:"flex items-center space-x-2 px-2 py-1 rounded-md hover:bg-gray-100 cursor-pointer",children:[(0,a.jsx)(s.icon,{className:"w-4 h-4 text-gray-500"}),(0,a.jsx)("span",{className:"text-sm text-gray-700",children:s.title})]},s.slug)},e.slug))})]}))})]})})},c=e=>{let{children:s}=e,[t,i]=(0,d.useState)(!1);return(0,a.jsxs)("div",{className:"relative min-h-screen",children:[t&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 z-20 md:hidden",onClick:()=>i(!1)}),(0,a.jsxs)("div",{className:"flex",children:[(0,a.jsx)(o,{isOpen:t,onClose:()=>i(!1)}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"md:hidden p-4 border-b border-gray-200 sticky top-0 bg-white z-10",children:(0,a.jsx)("button",{onClick:()=>i(!0),className:"p-1 hover:bg-gray-100 rounded-md",children:(0,a.jsx)(l.sKQ,{className:"w-6 h-6"})})}),(0,a.jsx)("div",{className:"p-4",children:s})]})]})]})},u=e=>{let{slug:s}=e,t=m.find(e=>e.subLinks.some(e=>e.slug===s)),r=null==t?void 0:t.subLinks.find(e=>e.slug===s);return(0,a.jsxs)("div",{className:"flex items-center text-sm text-gray-600 mb-8",children:[(0,a.jsx)(n(),{href:i.J.aieasypic.guide,children:(0,a.jsx)("span",{children:"Guide"})}),(0,a.jsx)(l.vKP,{className:"w-4 h-4 mx-1"}
1),(0,a.jsx)("span",{children:null==t?void 0:t.title}),(0,a.jsx)(l.vKP,{className:"w-4 h-4 mx-1"}),(0,a.jsx)("span",{children:null==r?void 0:r.title})]})},h=c}},e=>{e.O(0,[4494,636,6593,8792],()=>e(e.s=21593)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.