diff --git a/404.html b/404.html index f2549785..10b553b3 100644 --- a/404.html +++ b/404.html @@ -7,13 +7,13 @@ - +
Skip to main content

Page Not Found

We could not find what you were looking for.

Please contact the owner of the site that linked you to the original URL and let them know their link is broken.

- + \ No newline at end of file diff --git a/assets/js/e2fc4889.2876b1e4.js b/assets/js/e2fc4889.2876b1e4.js deleted file mode 100644 index 026066e4..00000000 --- a/assets/js/e2fc4889.2876b1e4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkastria_docs_2=self.webpackChunkastria_docs_2||[]).push([[6995],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var l=r.createContext({}),p=function(e){var t=r.useContext(l),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(l.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,l=e.parentName,u=s(e,["components","mdxType","originalType","parentName"]),c=p(n),d=a,g=c["".concat(l,".").concat(d)]||c[d]||m[d]||i;return n?r.createElement(g,o(o({ref:t},u),{},{components:n})):r.createElement(g,o({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var s={};for(var l in t)hasOwnProperty.call(t,l)&&(s[l]=t[l]);s.originalType=e,s[c]="string"==typeof e?e:a,o[1]=s;for(var p=2;p{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>s,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const i={title:"Multi-Person"},o="Multi-Person inference",s={unversionedId:"features/multiperson",id:"features/multiperson",title:"Multi-Person",description:"BETA",source:"@site/docs/features/multiperson.md",sourceDirName:"features",slug:"/features/multiperson",permalink:"/docs/features/multiperson",draft:!1,tags:[],version:"current",frontMatter:{title:"Multi-Person"},sidebar:"tutorialSidebar",previous:{title:"LoRA",permalink:"/docs/features/lora"},next:{title:"Prompt Masking",permalink:"/docs/features/prompt-masking"}},l={},p=[{value:"Overview",id:"overview",level:2},{value:"Step 1: Training",id:"step-1-training",level:3},{value:"Step 2 - Inference",id:"step-2---inference",level:3},{value:"Examples",id:"examples",level:2},{value:"1. Without an input image",id:"1-without-an-input-image",level:3},{value:"3. Prompt with input image as a background",id:"3-prompt-with-input-image-as-a-background",level:3}],u={toc:p},c="wrapper";function m(e){let{components:t,...i}=e;return(0,a.kt)(c,(0,r.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"multi-person-inference"},"Multi-Person inference"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"BETA")),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"1fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"generated.png",src:n(6917).Z,width:"1360",height:"768"})))),(0,a.kt)("p",null,"See example prompts in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/gallery?is_multiperson=true&branch=flux1"},"gallery")),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"Multi-person inference is a feature that allows you to generate images with multiple people in them.\nSee example prompts in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/gallery?is_multiperson=true"},"gallery")," or in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/community?is_multiperson=true"},"community feed"),"."),(0,a.kt)("p",null,"See ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/pricing"},"pricing")," for the cost of this feature."),(0,a.kt)("h3",{id:"step-1-training"},"Step 1: Training"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/tunes/new"},"Create a fine-tune")," for each person. Model can be either lora or a checkpoint."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"img.png",src:n(368).Z,width:"751",height:"563"})),(0,a.kt)("h3",{id:"step-2---inference"},"Step 2 - Inference"),(0,a.kt)("p",null,"Provide an ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"controlnet=pose")," so that the generation has a solid image composition to start with.\nIf no ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," is given, a constant pose input image (with arms crossed) will be used for each person."),(0,a.kt)("p",null,"The prompt is divided by the ",(0,a.kt)("inlineCode",{parentName:"p"},"BREAK")," keyword such as:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"1st ",(0,a.kt)("strong",{parentName:"li"},"base prompt")," used to generate the background and scene."),(0,a.kt)("li",{parentName:"ul"},"2nd ",(0,a.kt)("strong",{parentName:"li"},"common prompt")," that's concatenated to each person prompt and the base prompt to avoid repetition."),(0,a.kt)("li",{parentName:"ul"},"3+ each person and its LoRA syntax reference (even for checkpoint)")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"1-without-an-input-image"},"1. Without an input image"),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"0.5fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"generated.png",src:n(6917).Z,width:"1360",height:"768"})))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"Dramatic 1940s film noir scene. Couple standing together aiming guns, wooden paneled background.\nBREAK\n ohwx woman with determined expression, retro updo hairstyle, bright red lipstick, black and yellow color-blocked dress, aiming revolver with right hand\nBREAK\n ohwx man with serious face, grey fedora hat, brown suit with patterned tie, white shirt, aiming pistol with left hand\nnum_images=4\nnegative_prompt=\nseed=\nsteps=\ncfg_scale=\ncontrolnet=\ninput_image_url=\nmask_image_url=\ndenoising_strength=\ncontrolnet_conditioning_scale=\ncontrolnet_txt2img=false\nsuper_resolution=false\ninpaint_faces=false\nface_correct=false\nfilm_grain=false\nface_swap=false\nhires_fix=false\nbackend_version=1\nar=1:1\nscheduler=euler_a\ncolor_grading=\nuse_lpw=false\nw=1024\nh=576\n")),(0,a.kt)("h3",{id:"3-prompt-with-input-image-as-a-background"},"3. Prompt with input image as a background"),(0,a.kt)("p",null,"In some cases it might be desired to keep the exact same background as the input image, and only change the people in the image. To do this, add an ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," and keep the base prompt empty, i.e: start the prompt with ",(0,a.kt)("inlineCode",{parentName:"p"},"BREAK BREAK")," to keep both the base and common prompts empty."),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"0.5fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Pose input image"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"multiperson-txt2img-pose.jpg",src:n(840).Z,width:"863",height:"863"}))),(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"multiperson-txt2img-pose.jpg",src:n(1193).Z,width:"948",height:"947"})))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"BREAK \nBREAK ohwx woman, red blouse jeans, and belt, holding a rifle \nBREAK ohwx man, dark vest \nnum_images=4\nnegative_prompt=\nseed=43\nsteps=30\ncfg_scale=\ncontrolnet=\ninput_image_url=https://sdbooth2-production.s3.amazonaws.com/4j0pej570oosmbj22xx6igf3gfi2\nmask_image_url=\ndenoising_strength=\ncontrolnet_conditioning_scale=\ncontrolnet_txt2img=false\nsuper_resolution=true\ninpaint_faces=true\nface_correct=false\nfilm_grain=false\nface_swap=true\nhires_fix=true\nar=1:1\nscheduler=dpm++sde_karras\ncolor_grading=\nuse_lpw=true\nw=\nh=\n")))}m.isMDXComponent=!0},368:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-training-4568726f76653fd3e79915b003dbb259.png"},6917:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-29433c8b0c0b9d8b7265517605a54c1d.jpg"},1193:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-no-base-prompt-aec03b14af49a52e88ae822b1afe5905.jpg"},840:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-pose-back-to-back-45b9a68c860ba481eeaf646f27e82bc8.webp"}}]); \ No newline at end of file diff --git a/assets/js/e2fc4889.4a9662fe.js b/assets/js/e2fc4889.4a9662fe.js new file mode 100644 index 00000000..b0b2ef29 --- /dev/null +++ b/assets/js/e2fc4889.4a9662fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkastria_docs_2=self.webpackChunkastria_docs_2||[]).push([[6995],{3905:(e,t,n)=>{n.d(t,{Zo:()=>u,kt:()=>g});var r=n(7294);function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s=r.createContext({}),p=function(e){var t=r.useContext(s),n=t;return e&&(n="function"==typeof e?e(t):o(o({},t),e)),n},u=function(e){var t=p(e.components);return r.createElement(s.Provider,{value:t},e.children)},c="mdxType",m={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},d=r.forwardRef((function(e,t){var n=e.components,a=e.mdxType,i=e.originalType,s=e.parentName,u=l(e,["components","mdxType","originalType","parentName"]),c=p(n),d=a,g=c["".concat(s,".").concat(d)]||c[d]||m[d]||i;return n?r.createElement(g,o(o({ref:t},u),{},{components:n})):r.createElement(g,o({ref:t},u))}));function g(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var i=n.length,o=new Array(i);o[0]=d;var l={};for(var s in t)hasOwnProperty.call(t,s)&&(l[s]=t[s]);l.originalType=e,l[c]="string"==typeof e?e:a,o[1]=l;for(var p=2;p{n.r(t),n.d(t,{assets:()=>s,contentTitle:()=>o,default:()=>m,frontMatter:()=>i,metadata:()=>l,toc:()=>p});var r=n(7462),a=(n(7294),n(3905));const i={title:"Multi-Person"},o="Multi-Person inference",l={unversionedId:"features/multiperson",id:"features/multiperson",title:"Multi-Person",description:"BETA",source:"@site/docs/features/multiperson.md",sourceDirName:"features",slug:"/features/multiperson",permalink:"/docs/features/multiperson",draft:!1,tags:[],version:"current",frontMatter:{title:"Multi-Person"},sidebar:"tutorialSidebar",previous:{title:"LoRA",permalink:"/docs/features/lora"},next:{title:"Prompt Masking",permalink:"/docs/features/prompt-masking"}},s={},p=[{value:"Overview",id:"overview",level:2},{value:"Step 1: Training",id:"step-1-training",level:3},{value:"Step 2 - Inference",id:"step-2---inference",level:3},{value:"Examples",id:"examples",level:2},{value:"1. Without an input image",id:"1-without-an-input-image",level:3},{value:"3. Prompt with input image as a background",id:"3-prompt-with-input-image-as-a-background",level:3}],u={toc:p},c="wrapper";function m(e){let{components:t,...i}=e;return(0,a.kt)(c,(0,r.Z)({},u,i,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"multi-person-inference"},"Multi-Person inference"),(0,a.kt)("p",null,(0,a.kt)("strong",{parentName:"p"},"BETA")),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"1fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"generated.png",src:n(6917).Z,width:"1360",height:"768"})))),(0,a.kt)("p",null,"See example prompts in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/gallery?is_multiperson=true&branch=flux1"},"gallery")),(0,a.kt)("h2",{id:"overview"},"Overview"),(0,a.kt)("p",null,"Multi-person inference is a feature that allows you to generate images with multiple people in them.\nSee example prompts in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/gallery?is_multiperson=true&branch=flux1"},"gallery")," or in the ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/community?is_multiperson=true&branch=flux1"},"community feed"),"."),(0,a.kt)("p",null,"See ",(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/pricing"},"pricing")," for the cost of this feature."),(0,a.kt)("h3",{id:"step-1-training"},"Step 1: Training"),(0,a.kt)("p",null,(0,a.kt)("a",{parentName:"p",href:"https://www.astria.ai/tunes/new"},"Create a fine-tune")," for each person. Model can be either lora or a checkpoint."),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"img.png",src:n(368).Z,width:"751",height:"563"})),(0,a.kt)("h3",{id:"step-2---inference"},"Step 2 - Inference"),(0,a.kt)("p",null,"Provide an ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," and ",(0,a.kt)("inlineCode",{parentName:"p"},"controlnet=pose")," so that the generation has a solid image composition to start with.\nIf no ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," is given, a constant pose input image (with arms crossed) will be used for each person."),(0,a.kt)("p",null,"The prompt is divided by the ",(0,a.kt)("inlineCode",{parentName:"p"},"BREAK")," keyword such as:"),(0,a.kt)("ul",null,(0,a.kt)("li",{parentName:"ul"},"1st ",(0,a.kt)("strong",{parentName:"li"},"base prompt")," used to generate the background and scene."),(0,a.kt)("li",{parentName:"ul"},"2nd ",(0,a.kt)("strong",{parentName:"li"},"common prompt")," that's concatenated to each person prompt and the base prompt to avoid repetition."),(0,a.kt)("li",{parentName:"ul"},"3+ each person and its LoRA syntax reference (even for checkpoint)")),(0,a.kt)("h2",{id:"examples"},"Examples"),(0,a.kt)("h3",{id:"1-without-an-input-image"},"1. Without an input image"),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"0.5fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"generated.png",src:n(6917).Z,width:"1360",height:"768"})))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"Dramatic 1940s film noir scene. Couple standing together aiming guns, wooden paneled background.\nBREAK\n ohwx woman with determined expression, retro updo hairstyle, bright red lipstick, black and yellow color-blocked dress, aiming revolver with right hand\nBREAK\n ohwx man with serious face, grey fedora hat, brown suit with patterned tie, white shirt, aiming pistol with left hand\nnum_images=4\nnegative_prompt=\nseed=\nsteps=\ncfg_scale=\ncontrolnet=\ninput_image_url=\nmask_image_url=\ndenoising_strength=\ncontrolnet_conditioning_scale=\ncontrolnet_txt2img=false\nsuper_resolution=false\ninpaint_faces=false\nface_correct=false\nfilm_grain=false\nface_swap=false\nhires_fix=false\nbackend_version=1\nar=1:1\nscheduler=euler_a\ncolor_grading=\nuse_lpw=false\nw=1024\nh=576\n")),(0,a.kt)("h3",{id:"3-prompt-with-input-image-as-a-background"},"3. Prompt with input image as a background"),(0,a.kt)("p",null,"In some cases it might be desired to keep the exact same background as the input image, and only change the people in the image. To do this, add an ",(0,a.kt)("inlineCode",{parentName:"p"},"input_image")," and keep the base prompt empty, i.e: start the prompt with ",(0,a.kt)("inlineCode",{parentName:"p"},"BREAK BREAK")," to keep both the base and common prompts empty."),(0,a.kt)("div",{style:{display:"grid","grid-template-columns":"0.5fr 1fr",gap:"1.5rem"}},(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Pose input image"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"multiperson-txt2img-pose.jpg",src:n(840).Z,width:"863",height:"863"}))),(0,a.kt)("div",null,(0,a.kt)("figcaption",null,"Multiperson result"),(0,a.kt)("p",null,(0,a.kt)("img",{alt:"multiperson-txt2img-pose.jpg",src:n(1193).Z,width:"948",height:"947"})))),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-text"},"BREAK \nBREAK ohwx woman, red blouse jeans, and belt, holding a rifle \nBREAK ohwx man, dark vest \nnum_images=4\nnegative_prompt=\nseed=43\nsteps=30\ncfg_scale=\ncontrolnet=\ninput_image_url=https://sdbooth2-production.s3.amazonaws.com/4j0pej570oosmbj22xx6igf3gfi2\nmask_image_url=\ndenoising_strength=\ncontrolnet_conditioning_scale=\ncontrolnet_txt2img=false\nsuper_resolution=true\ninpaint_faces=true\nface_correct=false\nfilm_grain=false\nface_swap=true\nhires_fix=true\nar=1:1\nscheduler=dpm++sde_karras\ncolor_grading=\nuse_lpw=true\nw=\nh=\n")))}m.isMDXComponent=!0},368:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-training-4568726f76653fd3e79915b003dbb259.png"},6917:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-29433c8b0c0b9d8b7265517605a54c1d.jpg"},1193:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-no-base-prompt-aec03b14af49a52e88ae822b1afe5905.jpg"},840:(e,t,n)=>{n.d(t,{Z:()=>r});const r=n.p+"assets/images/multiperson-pose-back-to-back-45b9a68c860ba481eeaf646f27e82bc8.webp"}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.2dca7d09.js b/assets/js/runtime~main.edbc5049.js similarity index 70% rename from assets/js/runtime~main.2dca7d09.js rename to assets/js/runtime~main.edbc5049.js index 56253f42..88f989f7 100644 --- a/assets/js/runtime~main.2dca7d09.js +++ b/assets/js/runtime~main.edbc5049.js @@ -1 +1 @@ -(()=>{"use strict";var e,f,a,c,b,d={},t={};function r(e){var f=t[e];if(void 0!==f)return f.exports;var a=t[e]={id:e,loaded:!1,exports:{}};return d[e].call(a.exports,a,a.exports,r),a.loaded=!0,a.exports}r.m=d,r.c=t,e=[],r.O=(f,a,c,b)=>{if(!a){var d=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](a[o])))?a.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[a,c,b]},r.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return r.d(f,{a:f}),f},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,c){if(1&c&&(e=this(e)),8&c)return e;if("object"==typeof e&&e){if(4&c&&e.__esModule)return e;if(16&c&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var d={};f=f||[null,a({}),a([]),a(a)];for(var t=2&c&&e;"object"==typeof t&&!~f.indexOf(t);t=a(t))Object.getOwnPropertyNames(t).forEach((f=>d[f]=()=>e[f]));return d.default=()=>e,r.d(b,d),b},r.d=(e,f)=>{for(var a in f)r.o(f,a)&&!r.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:f[a]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((f,a)=>(r.f[a](e,f),f)),[])),r.u=e=>"assets/js/"+({53:"85848f58",111:"85356aeb",180:"203b99fb",293:"0770fcbe",492:"61744cd4",674:"6ff77412",738:"35a689f5",1073:"2052cc0c",1124:"d3225ce8",1213:"dae0e962",1293:"d1f3e2f8",1433:"76161ddb",1599:"c231ecf4",1716:"f2bb83c3",1777:"233522bf",1807:"d46b3c8b",1929:"397ab8ba",1960:"5e544de0",2062:"b83527cb",2197:"935f2afb",2247:"3ee62890",2255:"82dff655",2276:"7c7bf7c7",2366:"d537b4da",2499:"72ea4575",2532:"41484b8f",2656:"7f726b58",2747:"b2a96a7b",2831:"7b50a5fa",2912:"318e8f3b",2923:"351982cc",2956:"228c0e9a",3085:"1f391b9e",3186:"3a5c991a",3198:"05fe89fc",3237:"1df93b7f",3358:"874195bf",3443:"38faaa9d",3469:"1dc92360",3731:"6e98b2b4",3751:"3720c009",3911:"57d2d9a8",4046:"2c5729fd",4071:"2880056d",4121:"55960ee5",4158:"a06d9ba5",4353:"2ad457a3",4653:"b4b29f2e",4694:"20b43957",4762:"96713d40",4786:"55d868c3",4820:"944a3ab9",4868:"9fda4f55",4930:"501cbb42",5139:"97179b4d",5653:"c2e19196",6095:"bb6383b9",6158:"73eac7f9",6194:"9ec5805d",6346:"d2543681",6450:"e8766d5f",6468:"eeb7a3e9",6471:"7e146cad",6547:"be959570",6567:"9cceef76",6577:"85dffb37",6599:"c6576fc4",6614:"f994835d",6667:"18678e9e",6688:"0036dbab",6708:"c97295c9",6861:"e0403869",6868:"989eb559",6995:"e2fc4889",7018:"14200528",7076:"c438833c",7414:"393be207",7721:"084d163f",7723:"87a50603",7757:"eb3f1c80",7918:"17896441",8154:"fac6c085",8500:"cfcbef4e",8772:"e4fcfa79",8824:"91b5ff9c",8946:"fb723fd6",8999:"d0ae32ce",9075:"6540dd0c",9211:"38b454c5",9410:"3b57aab9",9418:"96b27e6a",9493:"988781e2",9514:"1be78505",9558:"6f719c7f",9611:"dc0d6ca4",9694:"d361fb24",9706:"b8f8227f",9743:"67a124c0",9748:"d351f0f4",9817:"14eb3368",9924:"df203c0f"}[e]||e)+"."+{53:"ec2da5c3",111:"51c30b7d",180:"c4b2ef4c",293:"b43ff5b6",492:"7ddb38d4",674:"ac5c324e",738:"e4b07cd0",1073:"8a330d1c",1124:"849d6a0f",1213:"935ba3c6",1293:"f4bbcfd5",1433:"1f6c53ce",1599:"8a7e9576",1716:"15e57691",1777:"7d062dc5",1807:"77feefcd",1929:"cd7434f1",1960:"9af138a9",2062:"58c1d2c7",2197:"a596b0be",2247:"4e7b9698",2255:"765a28c8",2276:"3a3a5707",2366:"eca3fa6f",2499:"c4ef8e6a",2532:"6875d757",2656:"ab515e84",2747:"f6f8be79",2831:"4d9a039c",2912:"4ada5e94",2923:"6f796142",2956:"513bd56b",3085:"d85d8b14",3186:"64bf0be6",3198:"b2813528",3237:"2bff9ad8",3358:"9dd1e81d",3443:"036b1be3",3469:"c9031861",3731:"27e4146d",3751:"d43ced20",3911:"266f9b21",4046:"73df3a45",4071:"9ce6d3a9",4121:"c03c2586",4158:"e9982c5d",4353:"26298e33",4653:"3807a61f",4694:"2cf26acd",4762:"fb397960",4786:"1da66400",4820:"a16051f8",4868:"760a0d02",4930:"f65a5a26",4972:"de96bb75",5139:"8d01bd1f",5653:"6a89cc2d",6095:"b6785253",6158:"16f527f8",6194:"a57b3e4c",6346:"e1e2dddc",6450:"f7387663",6468:"bb8bfa16",6471:"adcd9d3b",6547:"9d81b693",6567:"f520c83a",6577:"c986542b",6599:"b16e7a94",6614:"33f6ac24",6667:"43f7305f",6688:"c9d75e43",6708:"11a99e6a",6861:"7d2a6e00",6868:"98a16893",6995:"2876b1e4",7018:"a72e2b73",7076:"7d337511",7414:"01e16d5a",7721:"baddb63f",7723:"feb52d97",7757:"ac93c413",7918:"c126ddaf",8154:"9585ed13",8500:"2a7c1b15",8772:"7aaaa9e1",8824:"0465ed5f",8946:"c74cdc7c",8999:"c59dddaa",9075:"f8679019",9211:"db576d9c",9410:"09053492",9418:"e587a187",9455:"f28b2ed9",9493:"965a9b5a",9514:"cd0faa7e",9558:"58aeaaf5",9611:"733f0dd6",9694:"23fe34df",9706:"f6e37d1b",9743:"1a71604e",9748:"9c157cc5",9817:"fc6d9e20",9924:"02a737be"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),c={},b="astria-docs-2:",r.l=(e,f,a,d)=>{if(c[e])c[e].push(f);else{var t,o;if(void 0!==a)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=c[e];if(delete c[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(a))),f)return f(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14200528:"7018",17896441:"7918","85848f58":"53","85356aeb":"111","203b99fb":"180","0770fcbe":"293","61744cd4":"492","6ff77412":"674","35a689f5":"738","2052cc0c":"1073",d3225ce8:"1124",dae0e962:"1213",d1f3e2f8:"1293","76161ddb":"1433",c231ecf4:"1599",f2bb83c3:"1716","233522bf":"1777",d46b3c8b:"1807","397ab8ba":"1929","5e544de0":"1960",b83527cb:"2062","935f2afb":"2197","3ee62890":"2247","82dff655":"2255","7c7bf7c7":"2276",d537b4da:"2366","72ea4575":"2499","41484b8f":"2532","7f726b58":"2656",b2a96a7b:"2747","7b50a5fa":"2831","318e8f3b":"2912","351982cc":"2923","228c0e9a":"2956","1f391b9e":"3085","3a5c991a":"3186","05fe89fc":"3198","1df93b7f":"3237","874195bf":"3358","38faaa9d":"3443","1dc92360":"3469","6e98b2b4":"3731","3720c009":"3751","57d2d9a8":"3911","2c5729fd":"4046","2880056d":"4071","55960ee5":"4121",a06d9ba5:"4158","2ad457a3":"4353",b4b29f2e:"4653","20b43957":"4694","96713d40":"4762","55d868c3":"4786","944a3ab9":"4820","9fda4f55":"4868","501cbb42":"4930","97179b4d":"5139",c2e19196:"5653",bb6383b9:"6095","73eac7f9":"6158","9ec5805d":"6194",d2543681:"6346",e8766d5f:"6450",eeb7a3e9:"6468","7e146cad":"6471",be959570:"6547","9cceef76":"6567","85dffb37":"6577",c6576fc4:"6599",f994835d:"6614","18678e9e":"6667","0036dbab":"6688",c97295c9:"6708",e0403869:"6861","989eb559":"6868",e2fc4889:"6995",c438833c:"7076","393be207":"7414","084d163f":"7721","87a50603":"7723",eb3f1c80:"7757",fac6c085:"8154",cfcbef4e:"8500",e4fcfa79:"8772","91b5ff9c":"8824",fb723fd6:"8946",d0ae32ce:"8999","6540dd0c":"9075","38b454c5":"9211","3b57aab9":"9410","96b27e6a":"9418","988781e2":"9493","1be78505":"9514","6f719c7f":"9558",dc0d6ca4:"9611",d361fb24:"9694",b8f8227f:"9706","67a124c0":"9743",d351f0f4:"9748","14eb3368":"9817",df203c0f:"9924"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(f,a)=>{var c=r.o(e,f)?e[f]:void 0;if(0!==c)if(c)a.push(c[2]);else if(/^(1303|532)$/.test(f))e[f]=0;else{var b=new Promise(((a,b)=>c=e[f]=[a,b]));a.push(c[2]=b);var d=r.p+r.u(f),t=new Error;r.l(d,(a=>{if(r.o(e,f)&&(0!==(c=e[f])&&(e[f]=void 0),c)){var b=a&&("load"===a.type?"missing":a.type),d=a&&a.target&&a.target.src;t.message="Loading chunk "+f+" failed.\n("+b+": "+d+")",t.name="ChunkLoadError",t.type=b,t.request=d,c[1](t)}}),"chunk-"+f,f)}},r.O.j=f=>0===e[f];var f=(f,a)=>{var c,b,d=a[0],t=a[1],o=a[2],n=0;if(d.some((f=>0!==e[f]))){for(c in t)r.o(t,c)&&(r.m[c]=t[c]);if(o)var i=o(r)}for(f&&f(a);n{"use strict";var e,f,c,a,b,d={},t={};function r(e){var f=t[e];if(void 0!==f)return f.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return d[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=d,r.c=t,e=[],r.O=(f,c,a,b)=>{if(!c){var d=1/0;for(i=0;i=b)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[c,a,b]},r.n=e=>{var f=e&&e.__esModule?()=>e.default:()=>e;return r.d(f,{a:f}),f},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var d={};f=f||[null,c({}),c([]),c(c)];for(var t=2&a&&e;"object"==typeof t&&!~f.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((f=>d[f]=()=>e[f]));return d.default=()=>e,r.d(b,d),b},r.d=(e,f)=>{for(var c in f)r.o(f,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:f[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((f,c)=>(r.f[c](e,f),f)),[])),r.u=e=>"assets/js/"+({53:"85848f58",111:"85356aeb",180:"203b99fb",293:"0770fcbe",492:"61744cd4",674:"6ff77412",738:"35a689f5",1073:"2052cc0c",1124:"d3225ce8",1213:"dae0e962",1293:"d1f3e2f8",1433:"76161ddb",1599:"c231ecf4",1716:"f2bb83c3",1777:"233522bf",1807:"d46b3c8b",1929:"397ab8ba",1960:"5e544de0",2062:"b83527cb",2197:"935f2afb",2247:"3ee62890",2255:"82dff655",2276:"7c7bf7c7",2366:"d537b4da",2499:"72ea4575",2532:"41484b8f",2656:"7f726b58",2747:"b2a96a7b",2831:"7b50a5fa",2912:"318e8f3b",2923:"351982cc",2956:"228c0e9a",3085:"1f391b9e",3186:"3a5c991a",3198:"05fe89fc",3237:"1df93b7f",3358:"874195bf",3443:"38faaa9d",3469:"1dc92360",3731:"6e98b2b4",3751:"3720c009",3911:"57d2d9a8",4046:"2c5729fd",4071:"2880056d",4121:"55960ee5",4158:"a06d9ba5",4353:"2ad457a3",4653:"b4b29f2e",4694:"20b43957",4762:"96713d40",4786:"55d868c3",4820:"944a3ab9",4868:"9fda4f55",4930:"501cbb42",5139:"97179b4d",5653:"c2e19196",6095:"bb6383b9",6158:"73eac7f9",6194:"9ec5805d",6346:"d2543681",6450:"e8766d5f",6468:"eeb7a3e9",6471:"7e146cad",6547:"be959570",6567:"9cceef76",6577:"85dffb37",6599:"c6576fc4",6614:"f994835d",6667:"18678e9e",6688:"0036dbab",6708:"c97295c9",6861:"e0403869",6868:"989eb559",6995:"e2fc4889",7018:"14200528",7076:"c438833c",7414:"393be207",7721:"084d163f",7723:"87a50603",7757:"eb3f1c80",7918:"17896441",8154:"fac6c085",8500:"cfcbef4e",8772:"e4fcfa79",8824:"91b5ff9c",8946:"fb723fd6",8999:"d0ae32ce",9075:"6540dd0c",9211:"38b454c5",9410:"3b57aab9",9418:"96b27e6a",9493:"988781e2",9514:"1be78505",9558:"6f719c7f",9611:"dc0d6ca4",9694:"d361fb24",9706:"b8f8227f",9743:"67a124c0",9748:"d351f0f4",9817:"14eb3368",9924:"df203c0f"}[e]||e)+"."+{53:"ec2da5c3",111:"51c30b7d",180:"c4b2ef4c",293:"b43ff5b6",492:"7ddb38d4",674:"ac5c324e",738:"e4b07cd0",1073:"8a330d1c",1124:"849d6a0f",1213:"935ba3c6",1293:"f4bbcfd5",1433:"1f6c53ce",1599:"8a7e9576",1716:"15e57691",1777:"7d062dc5",1807:"77feefcd",1929:"cd7434f1",1960:"9af138a9",2062:"58c1d2c7",2197:"a596b0be",2247:"4e7b9698",2255:"765a28c8",2276:"3a3a5707",2366:"eca3fa6f",2499:"c4ef8e6a",2532:"6875d757",2656:"ab515e84",2747:"f6f8be79",2831:"4d9a039c",2912:"4ada5e94",2923:"6f796142",2956:"513bd56b",3085:"d85d8b14",3186:"64bf0be6",3198:"b2813528",3237:"2bff9ad8",3358:"9dd1e81d",3443:"036b1be3",3469:"c9031861",3731:"27e4146d",3751:"d43ced20",3911:"266f9b21",4046:"73df3a45",4071:"9ce6d3a9",4121:"c03c2586",4158:"e9982c5d",4353:"26298e33",4653:"3807a61f",4694:"2cf26acd",4762:"fb397960",4786:"1da66400",4820:"a16051f8",4868:"760a0d02",4930:"f65a5a26",4972:"de96bb75",5139:"8d01bd1f",5653:"6a89cc2d",6095:"b6785253",6158:"16f527f8",6194:"a57b3e4c",6346:"e1e2dddc",6450:"f7387663",6468:"bb8bfa16",6471:"adcd9d3b",6547:"9d81b693",6567:"f520c83a",6577:"c986542b",6599:"b16e7a94",6614:"33f6ac24",6667:"43f7305f",6688:"c9d75e43",6708:"11a99e6a",6861:"7d2a6e00",6868:"98a16893",6995:"4a9662fe",7018:"a72e2b73",7076:"7d337511",7414:"01e16d5a",7721:"baddb63f",7723:"feb52d97",7757:"ac93c413",7918:"c126ddaf",8154:"9585ed13",8500:"2a7c1b15",8772:"7aaaa9e1",8824:"0465ed5f",8946:"c74cdc7c",8999:"c59dddaa",9075:"f8679019",9211:"db576d9c",9410:"09053492",9418:"e587a187",9455:"f28b2ed9",9493:"965a9b5a",9514:"cd0faa7e",9558:"58aeaaf5",9611:"733f0dd6",9694:"23fe34df",9706:"f6e37d1b",9743:"1a71604e",9748:"9c157cc5",9817:"fc6d9e20",9924:"02a737be"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,f)=>Object.prototype.hasOwnProperty.call(e,f),a={},b="astria-docs-2:",r.l=(e,f,c,d)=>{if(a[e])a[e].push(f);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=a[e];if(delete a[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach((e=>e(c))),f)return f(c)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=l.bind(null,t.onerror),t.onload=l.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/",r.gca=function(e){return e={14200528:"7018",17896441:"7918","85848f58":"53","85356aeb":"111","203b99fb":"180","0770fcbe":"293","61744cd4":"492","6ff77412":"674","35a689f5":"738","2052cc0c":"1073",d3225ce8:"1124",dae0e962:"1213",d1f3e2f8:"1293","76161ddb":"1433",c231ecf4:"1599",f2bb83c3:"1716","233522bf":"1777",d46b3c8b:"1807","397ab8ba":"1929","5e544de0":"1960",b83527cb:"2062","935f2afb":"2197","3ee62890":"2247","82dff655":"2255","7c7bf7c7":"2276",d537b4da:"2366","72ea4575":"2499","41484b8f":"2532","7f726b58":"2656",b2a96a7b:"2747","7b50a5fa":"2831","318e8f3b":"2912","351982cc":"2923","228c0e9a":"2956","1f391b9e":"3085","3a5c991a":"3186","05fe89fc":"3198","1df93b7f":"3237","874195bf":"3358","38faaa9d":"3443","1dc92360":"3469","6e98b2b4":"3731","3720c009":"3751","57d2d9a8":"3911","2c5729fd":"4046","2880056d":"4071","55960ee5":"4121",a06d9ba5:"4158","2ad457a3":"4353",b4b29f2e:"4653","20b43957":"4694","96713d40":"4762","55d868c3":"4786","944a3ab9":"4820","9fda4f55":"4868","501cbb42":"4930","97179b4d":"5139",c2e19196:"5653",bb6383b9:"6095","73eac7f9":"6158","9ec5805d":"6194",d2543681:"6346",e8766d5f:"6450",eeb7a3e9:"6468","7e146cad":"6471",be959570:"6547","9cceef76":"6567","85dffb37":"6577",c6576fc4:"6599",f994835d:"6614","18678e9e":"6667","0036dbab":"6688",c97295c9:"6708",e0403869:"6861","989eb559":"6868",e2fc4889:"6995",c438833c:"7076","393be207":"7414","084d163f":"7721","87a50603":"7723",eb3f1c80:"7757",fac6c085:"8154",cfcbef4e:"8500",e4fcfa79:"8772","91b5ff9c":"8824",fb723fd6:"8946",d0ae32ce:"8999","6540dd0c":"9075","38b454c5":"9211","3b57aab9":"9410","96b27e6a":"9418","988781e2":"9493","1be78505":"9514","6f719c7f":"9558",dc0d6ca4:"9611",d361fb24:"9694",b8f8227f:"9706","67a124c0":"9743",d351f0f4:"9748","14eb3368":"9817",df203c0f:"9924"}[e]||e,r.p+r.u(e)},(()=>{var e={1303:0,532:0};r.f.j=(f,c)=>{var a=r.o(e,f)?e[f]:void 0;if(0!==a)if(a)c.push(a[2]);else if(/^(1303|532)$/.test(f))e[f]=0;else{var b=new Promise(((c,b)=>a=e[f]=[c,b]));c.push(a[2]=b);var d=r.p+r.u(f),t=new Error;r.l(d,(c=>{if(r.o(e,f)&&(0!==(a=e[f])&&(e[f]=void 0),a)){var b=c&&("load"===c.type?"missing":c.type),d=c&&c.target&&c.target.src;t.message="Loading chunk "+f+" failed.\n("+b+": "+d+")",t.name="ChunkLoadError",t.type=b,t.request=d,a[1](t)}}),"chunk-"+f,f)}},r.O.j=f=>0===e[f];var f=(f,c)=>{var a,b,d=c[0],t=c[1],o=c[2],n=0;if(d.some((f=>0!==e[f]))){for(a in t)r.o(t,a)&&(r.m[a]=t[a]);if(o)var i=o(r)}for(f&&f(c);n - +

Flux API usage

For an overview of Flux fine-tuning, see Flux fine-tuning

  • Unlike SD15 checkpoint training, Flux is trained as a LoRA model type. As such, inference is taking place a on a base line model such as Flux1.dev and prompt.text should specify the loaded lora such as <lora:123456:1> - will load lora with id=123456 and strength=1
  • Flux1.Dev requires commercial licensing which Astria provides to its customers, and as such LoRA downloading is not available for API usage.

See LoRA docs on lora syntax

With Flux you cannot combine multiple LoRAs.

info

To avoid cloning inference details of different model types such as Flux LoRA vs SD1.5 checkpoint, please consider using the Packs API. Packs will help you abstract the inference logic so that you do not have to hard-code prompts and parameters such as w,h, cfg_scale in your backend. Moreover this will allow the creative department to launch packs, make modifications and even track likes, without needing to touch the backend code.

danger

If you are receiving 422 error model_type=lora is not supported. Use a checkpoint instead - Change the request URL to https://api.astria.ai/tunes/1504944/prompts with 1504944 as a hard-coded tune_id of Flux1.Dev from the gallery. See explanation above.

Step 1: Fine-tune a lora model

POST /tunes

# With images as multipart/form-data
# Hard coded tune id of Flux1.dev from the gallery - https://www.astria.ai/gallery/tunes
# https://www.astria.ai/gallery/tunes/1504944/prompts
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="John Doe - UUID - 1234-6789-1234-56789" \
-F tune[name]=man \
-F tune[callback]="https://optional-callback-url.com/webhooks/astria?user_id=1&tune_id=1" \
-F tune[base_tune_id]=1504944 \
-F tune[model_type]="lora" \
-F "tune[images][]=@1.jpg" \
-F "tune[images][]=@2.jpg" \
-F "tune[images][]=@3.jpg" \
-F "tune[images][]=@4.jpg"

# With image_urls as form-data
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="Grumpy cat - UUID - 1234-6789-1234-56789" \
-F tune[name]=cat \
-F tune[callback]="https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1" \
-F tune[base_tune_id]=1504944 \
-F tune[model_type]="lora" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg"

# As JSON
cat > data.json <<- EOM
{
"tune": {
"title": "Grumpy Cat - UUID - 1234-6789-1234-56789",
"name": "cat",
"base_tune_id": 1504944,
"model_type": "lora",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1",
"image_urls": [
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg"
]
}
}
EOM

curl -X POST -H"Content-Type: application/json" -H "Authorization: Bearer $API_KEY" --data @data.json https://api.astria.ai/tunes

Step 2: Generate images using the fine-tuned model

POST /tunes/:id/prompts

# Note the hard-coded 1504944 which is the tune_id of Flux1.dev from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1504944/prompts \
-F prompt[text]="<lora:tune_id:strength> a painting of ohwx man in the style of Van Gogh" \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"
- + \ No newline at end of file diff --git a/docs/api/like/create/index.html b/docs/api/like/create/index.html index 1b98308b..e60a39ea 100644 --- a/docs/api/like/create/index.html +++ b/docs/api/like/create/index.html @@ -7,14 +7,14 @@ - +

Create a like

Adds a like to a prompt. If the prompt was created using a pack (i.e: orig_prompt_id is set) - a like will be added to the original prompt as well.

Parameters

Returns

Returns status code 201 if successful and no content.

POST /prompts/:prompt_id/likes

curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/prompts/:prompt_id/like 

Response

Status code: 201 Created

- + \ No newline at end of file diff --git a/docs/api/like/delete/index.html b/docs/api/like/delete/index.html index fc50fc24..5f82a2e6 100644 --- a/docs/api/like/delete/index.html +++ b/docs/api/like/delete/index.html @@ -7,13 +7,13 @@ - +

Delete a like

Delete a like from a prompt.

Parameters

Returns

Returns status code 201 if successful and no content.

POST /prompts/:prompt_id/likes

curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/prompts/:prompt_id/like 

Response

Status code: 201 Created

- + \ No newline at end of file diff --git a/docs/api/overview/index.html b/docs/api/overview/index.html index 7d51e71f..2bb33049 100644 --- a/docs/api/overview/index.html +++ b/docs/api/overview/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

Astria Fine-tuning API - Overview

Billing

The API uses account balance just like the web interface. See the pricing page for more details.

Mock testing

The API allows creating a mock Tune object with attribute branch=fast. See Create a tune documentation. API call for creating fast tune is free, and subsequent prompt calls will return mock images without incurring any charges. This is useful for testing your integration with the API. Once you're ready for production, you can purchase credits and adjust the quantity on the checkout page to how much you need.

Beta features

Astria maintains backward compatability and avoid making changes that could alter the behavior of the API. However, features marked as BETA are subject to change as we try to improve the product.

Auto top off

To allow your account to work without disruption, top-off feature can be enabled to refill account each time account balance reaches zero. Auto top-off can be enabled in the billing page. It is recommended to set the top-off amount to at least a week worth of API calls to avoid hitting the rate limit on top-off - Frequent top-offs can cause credit card charges to fail or bank declines.

Storage

Generated images, training pictures and models, will be automatically deleted 30 days after the training has ended. You may delete the fine-tune object including the trained model, training images, and generated images at any time before using the delete API calls. You may opt-in to automatically extend model storage

Authorization

The API uses bearer Authorization headers scheme. API calls should include the header:

Authorization: Bearer sd_XXXXXX

Find your API key on the API settings under your account settings.

REST API

Astria API is built as a REST API. Main resources are tune and prompt and each one has all the CRUD operations. Prompts are usually used as a nested resource on top of tunes (i.e: /tunes/:id/prompts).

Error Codes

tip

Pay attention to 504 error below and turn on idempotency for your account to avoid duplicate objects.

422 - Validation error - Log these errors, specifically the response body, and use an exception tracking system such as Rollbar or Sentry to get notified. Do not retry these requests.

500 - Internal server error - Such requests should be retried with exponential backoff and wait start time of 30 seconds.

504 - Gateway timeout - This error indicates that the request processing took more than the 30 seconds which is set as the max request timeout. In most cases the request would probably have been processed and you should avoid retrying it. In order to get the response see Idempotency section

Idempotency

Idempotency is a principle in programming which means that the same operation (a request in our case) can be made multiple times without changing the result. This can be useful when a request is interrupted and you want to make sure it is processed only once, and avoid duplicate objects.

Idempotency can be enabled for the account in the API settings.

For tunes request with the same title, idempotency will return the existing tune object and will not create a new one. This is useful for cases where you want to make sure you don't create duplicate tunes. In this case set the tune title to a unique value such as a UUID which identifies the transaction.

For prompts request with the same attributes, idempotency will return the existing prompt object and will not create a new one. Prompt attributes considered for the idempotency are text, tune_id, cfg_scale, steps, seed, callback, negative_prompt, super_resolution, face_correct, ar, num_images, controlnet, denoising_strength, use_lpw, controlnet_conditioning_scale, w, h, hires_fix, scheduler, controlnet_txt2img, inpaint_faces

When retrying a 504 error, and idempotency is enabled, make sure to wait 60 seconds before retrying the request to allow the previous request to finish processing.

Callbacks

Callbacks for prompts and tunes are POST requests containing the entity object in the request body. Callbacks work in test mode with branch=fast. Callbacks are currently not retried if they fail. To test your callbacks, we recommend a local tunnel tool like ngrok. If you need your backend server to receive some context arguments/metadata for the callback, like internal user-id or transaction id, we recommend adding those to the callback query string.

- + \ No newline at end of file diff --git a/docs/api/pack/list/index.html b/docs/api/pack/list/index.html index 6909006c..61e30433 100644 --- a/docs/api/pack/list/index.html +++ b/docs/api/pack/list/index.html @@ -7,13 +7,13 @@ - +

List all packs

Parameters

Returns

An array of packs owned by the authenticated user or gallery packs for GET /gallery/packs

GET /packs or GET /gallery/packs

curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/packs
# or
curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/gallery/packs

Response


[
{
"id": 5,
"base_tune_id": 1,
"user_id": 1,
"slug": "test-rv5-1-pack",
"title": "test rv5.1 pack",
"token": "ohwx",
"created_at": "2024-01-17T12:35:13.379Z",
"updated_at": "2024-04-04T12:14:52.094Z",
"multiplier": 10,
"model_type": null,
"public_at": null,
"cost_mc_hash": {
"man": 200000, // cost in milli-cents - $20 USD
"woman": 100000 // cost in milli-cents - $10 USD
}
}
]

- + \ No newline at end of file diff --git a/docs/api/pack/pack/index.html b/docs/api/pack/pack/index.html index 475b92e6..570ec6f7 100644 --- a/docs/api/pack/pack/index.html +++ b/docs/api/pack/pack/index.html @@ -7,13 +7,13 @@ - +

The pack object

A pack represents a list of grouped prompts, as well as the fine-tune to be created from the training images.

Advantages

  1. Test new prompts, ideas and themes on a bulk of models quickly to assure consistent high-quality results.
  2. Move fast from the creative process of creating prompts to the deployment of new themes in production.
  3. Avoid mismatch between hard-coded JSONs and the actual prompts.
  4. Decouple the creative process from your code and avoid mirroring inference API details in your codebase.
  5. Run user tests in production for new prompts and quickly iterate.
  6. Aggregate likes for prompts to improve the quality of the generated images and tighten the feedback loop.
  7. Sort packs by aggregated likes to present the best packs to the user.

Example user flow

  1. GET /packs Display a list of packs to the user. See docs
  2. User selects a pack, a class name (man/woman) and training images
  3. Call POST /p/:id/tunes with title, (training) images, and class name - to create a new fine-tune model using a pack. See docs
  4. GET /tunes/:id/prompts to get a list of prompts and their status
  5. POST /prompts/:id/likes to send feedback to the API. See docs
  6. Sort prompts by likes
  7. Present packs sorted by aggregated likes

Getting started

  1. Create your first pack from the GUI packs page.
  2. Assign prompts to the pack from the prompts tab.
- + \ No newline at end of file diff --git a/docs/api/pack/tunes/create/index.html b/docs/api/pack/tunes/create/index.html index 4bf2bc4e..1cc51495 100644 --- a/docs/api/pack/tunes/create/index.html +++ b/docs/api/pack/tunes/create/index.html @@ -7,13 +7,13 @@ - +

Create a tune from a pack

Creates a new fine-tune model from training images according to the pack base tune id, model type and adds prompts to generate images.

Parameters

name (required)

A class name the describes the fine-tune. e.g: man, woman, cat, dog, boy, girl, style. Class name must be supported by pack.

title (required)

Describes the fine-tune. Ideally a UUID related to the transaction. See idempotency for more information.

images (required)

An array of images to train the fine-tune with. The images can be uploaded as multipart/form-data or as image_urls.

image_urls (required)

An array of images to train the fine-tune with. The images can be uploaded as multipart/form-data or as image_urls.

callback (optional)

A webhook URL to be called when the tune is finished training. The webhook will receive a POST request with the tune object. See more on callbacks.

characteristics (optional)

A free-form object that can be used to templatize the prompts text. e.g: {"eye_color": "blue eyes"} would than be used in the prompt text as ohwx woman, {{eye_color}}, holding flowers.

prompts_attributes.callback (optional)

A webhook URL to be called when each prompt is finished inference. The webhook will receive a POST request with the prompt object. See more on callbacks.

Returns

Returns a tune object if successful which will start training immediately and call callback once training is complete.

POST /p/:pack_id/tunes

# With images as multipart/form-data
# Hard coded pack id 43 for corporate headshots from the gallery - https://www.astria.ai/gallery/packs
# https://www.astria.ai/gallery/tunes/690204/prompts
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/p/43/tunes \
-F tune[title]="John Doe - UUID - 1234-6789-1234-56789" \
-F tune[name]=man \
-F tune[callback]="https://optional-callback-url.com/webhooks/astria?user_id=1" \
-F tune[characteristics][eye_color]="blue eyes" \
-F tune[prompt_attributes][callback]="https://optional-callback-url.com/webhooks/astria_prompts?user_id=1" \
-F "tune[images][]=@1.jpg" \
-F "tune[images][]=@2.jpg" \
-F "tune[images][]=@3.jpg" \
-F "tune[images][]=@4.jpg"

# With image_urls as form-data
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/p/43/tunes \
-F tune[title]="Grumpy cat - UUID - 1234-6789-1234-56789" \
-F tune[name]=cat \
-F tune[callback]="https://optional-callback-url.com/to-your-service-when-ready?user_id=1" \
-F tune[prompt_attributes][callback]="https://optional-callback-url.com/webhooks/astria_prompts?user_id=1" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg"

# As JSON
cat > data.json <<- EOM
{
"tune": {
"title": "Grumpy Cat - UUID - 1234-6789-1234-56789",
"name": "cat",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1",
"characteristics": {"eye_color": "blue eyes"},
"prompt_attributes": {
"callback": "https://optional-callback-url.com/webhooks/astria_prompts?user_id=1"
},
"image_urls": [
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg"
]
}
}
EOM

# Hard coded pack id 43 for corporate headshots from the gallery - https://www.astria.ai/gallery/packs
curl -X POST -H"Content-Type: application/json" -H "Authorization: Bearer $API_KEY" --data @data.json https://api.astria.ai/p/43/tunes

Response


{
"id": 1,
"title": "John Doe",
"name": "woman",
"eta": "2023-10-02T14:32:40.363Z",
"trained_at": "2023-10-02T14:32:40.363Z",
"started_training_at": "2023-10-02T14:32:05.229Z",
"expires_at": "2023-11-01T14:32:40.363Z",
"created_at": "2023-10-02T14:32:05.067Z",
"updated_at": "2023-10-02T14:32:40.363Z",
"url": "https://www.astria.ai/tunes/788416.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
}
- + \ No newline at end of file diff --git a/docs/api/prompt/create/index.html b/docs/api/prompt/create/index.html index 493f4401..0f43786d 100644 --- a/docs/api/prompt/create/index.html +++ b/docs/api/prompt/create/index.html @@ -7,13 +7,13 @@ - +

Create a prompt

Creates a new fine-tune model from training images which in turn will be used to create prompts and generate images.

Parameters

text (required)

Description of the image.

negative_prompt (optional)

A comma separated list of words that should not appear in the image.

callback (optional)

a URL that will be called when the prompt is done processing. The callback is a POST request where the body contains the prompt object. See more.

num_images (optional)

Number of images to generate. Range: 1-8.

seed (optional)

Random number to create consistent results. Range: 0 to 2^32.

super_resolution (optional)

Boolean. X4 super-resolution.

inpaint_faces (optional)

Boolean. Requires super-resolution on. Inpaints faces.

hires_fix (optional)

Boolean. Super resolution details. Available only when super_resolution is true. Adds details.

face_correct (optional)

Boolean. Runs another AI model on top to correct the face in the image.

face_swap (optional)

Boolean. Uses training images to swap face and enhance resemblance.

cfg_scale (optional)

Float. How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt). Range 0-15

steps (optional)

Integer. Number of diffusion steps to run . Range 0-50

use_lpw (optional)

Boolean. Use weighted prompts.

w (optional)

width - In multiples of 8.

h (optional)

height - In multiples of 8.

scheduler (optional)

enum: euler, euler_a, dpm++2m_karras, dpm++sde_karras, dpm++2m, dpm++sde, lcm, tcd. If not specified the default account scheduler will be used.

backend_version (optional)

enum: null, 1, If not specified will default to the account version will be used.

style (optional)

enum: null, Cinematic, Animated, Digital Art, Photographic, Fantasy art, Neonpunk, Enhance, Comic book, Lowpoly, Line art. See more.

color_grading (optional)

enum: Film Velvia, Film Portra, Ektar.

film_grain (optional)

boolean - Adds noise to the image to make it look more realistic.

Img2Img / ControlNet

controlnet (optional)

Requires input_image. Possible values: composition, reference, segroom, ipadapter, lineart, canny, depth, mlsd, hed, pose, tile, qr.

denoising_strength (optional)

For img2img. 1.0 - Take prompt. 0.0 - Take image. Range: 0.0-1.0. Default: 0.8

controlnet_conditioning_scale (optional)

Strength of controlnet conditioning. 0.0-1.0

controlnet_txt2img (optional)

Boolean toggle. True for text to image controlnet. False for image to image controlnet.

input_image (optional)

Binary multi-part request with the image. Used in conjunction with controlnet parameter.

input_image_url (optional)

URL to an image. Used in conjunction with controlnet parameter.

mask_image (optional)

Binary multi-part request with one channel mask image. Used in conjunction with input_image parameter for inpainting

mask_image_url (optional)

URL to a one channel mask image. Used in conjunction with input_image_url parameter for inpainting.

Returns

Returns a prompt object if successful which will start processing if tune is processed.

POST /tunes/:id/prompts

curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1/prompts \
-F prompt[text]="a painting of ohwx man in the style of Van Gogh" \
-F prompt[negative_prompt]="old, blemish, wrin" \
-F prompt[super_resolution]=true \
-F prompt[face_correct]=true \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"

Response

{
"id": 1,
"callback": "https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1",
"text": "a painting of ohwx man in the style of Van Gogh",
"negative_prompt": "old, blemish, wrinkles, mole",
"cfg_scale": null,
"steps": null,
"seed": null,
"trained_at": null,
"started_training_at": null,
"created_at": "2022-10-06T16:12:54.505Z",
"updated_at": "2022-10-06T16:12:54.505Z",
"tune_id": 1,
"url": "http://api.astria.ai/tunes/1/prompts/1.json"
}
- + \ No newline at end of file diff --git a/docs/api/prompt/delete/index.html b/docs/api/prompt/delete/index.html index 1dc30eab..482ee338 100644 --- a/docs/api/prompt/delete/index.html +++ b/docs/api/prompt/delete/index.html @@ -7,13 +7,13 @@ - +

Delete a prompt

Deletes a specific prompt associated with a tune.

Parameters

id (required)

The ID of the prompt to be deleted.

Returns

Returns 200 OK if the prompt was successfully deleted.

DELETE /tunes/:tune_id/prompts/:id

curl -X DELETE -H "Authorization: Bearer $API_KEY" https://api.astria.ai/prompts/1

Response

{
"message": "Prompt successfully deleted"
}
- + \ No newline at end of file diff --git a/docs/api/prompt/list/index.html b/docs/api/prompt/list/index.html index 3bc2686d..1cce55a3 100644 --- a/docs/api/prompt/list/index.html +++ b/docs/api/prompt/list/index.html @@ -7,13 +7,13 @@ - +

List all prompts

Parameters

offset (optional)

Starting offset for the list of prompts. Default: 0. Current page size is 20.

Returns

An array of prompts owned by the authenticated user. If used as a nested resource (in the url), will return prompts owned by the tune.

GET /tunes/:id/prompts

curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1/prompts

Response


[
{
"id": 1,
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=your_internal_user_id&transaction_id=internal_transaction_id",
"text": "a painting of ohwx man in the style of Van Gogh",
"negative_prompt": "old, blemish, wrinkles, mole",
"cfg_scale": null,
"steps": null,
"seed": null,
"trained_at": null,
"started_training_at": null,
"created_at": "2022-10-06T16:12:54.505Z",
"updated_at": "2022-10-06T16:12:54.505Z",
"tune_id": 1,
"url": "http://api.astria.ai/tunes/1/prompts/1.json"
}
]
- + \ No newline at end of file diff --git a/docs/api/prompt/prompt/index.html b/docs/api/prompt/prompt/index.html index d9377976..820a7aa2 100644 --- a/docs/api/prompt/prompt/index.html +++ b/docs/api/prompt/prompt/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/api/prompt/retrieve/index.html b/docs/api/prompt/retrieve/index.html index 3f27eea8..49c4ad9e 100644 --- a/docs/api/prompt/retrieve/index.html +++ b/docs/api/prompt/retrieve/index.html @@ -7,13 +7,13 @@ - +

Retrieve a prompt

Parameters

No parameters

Returns

Returns the prompt object.

GET /tunes/:tune_id/prompts/:id

curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1/prompts/1

Response

{
"id": 1,
"callback": "https://optional-callback-url.com/to-your-service-when-ready",
"text": "a painting of ohwx man in the style of Van Gogh",
"negative_prompt": "old, blemish, wrinkles, mole",
"cfg_scale": null,
"steps": null,
"seed": null,
"trained_at": null,
"started_training_at": null,
"created_at": "2022-10-06T16:12:54.505Z",
"updated_at": "2022-10-06T16:12:54.505Z",
"tune_id": 1,
"url": "http://api.astria.ai/tunes/1/prompts/1.json"
}
- + \ No newline at end of file diff --git a/docs/api/sdxl-api/index.html b/docs/api/sdxl-api/index.html index ce9b4970..2bfd2d77 100644 --- a/docs/api/sdxl-api/index.html +++ b/docs/api/sdxl-api/index.html @@ -7,13 +7,13 @@ - +

SDXL API usage

For general tips on SDXL training and inference, see SDXL training

Unlike SD15 checkpoint training, SDXL on Astria is trained as a LoRA+text-embedding. As such, inference is taking place a on a base line model such as SDXL 1.0 and prompt.text should specify the loaded lora such as <lora:123456:0.83> - will load lora with id=123456 and strength=0.83

See LoRA docs on lora syntax

With SDXL you cannot combine multiple LoRAs.

Use any SDXL model from the gallery to do inference.

danger

If you are receiving 422 error model_type=pti is not supported. Use a checkpoint instead - Change the request URL to https://api.astria.ai/tunes/666678/prompts with 666678 as a hard-coded tune_id of SDXL 1.0 from the gallery. See explanation above.

POST /tunes/:id/prompts

# Note the hard-coded 666678 which is the tune_id of SDXL 1.0 from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/666678/prompts \
-F prompt[text]="<lora:tune_id:strength> a painting of ohwx man in the style of Van Gogh" \
-F prompt[negative_prompt]="old, blemish, wrin" \
-F prompt[super_resolution]=true \
-F prompt[face_correct]=true \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"
- + \ No newline at end of file diff --git a/docs/api/tune/create/index.html b/docs/api/tune/create/index.html index 791faee9..5678d4aa 100644 --- a/docs/api/tune/create/index.html +++ b/docs/api/tune/create/index.html @@ -7,14 +7,14 @@ - +

Create a tune

Creates a new fine-tune model from training images which in turn will be used to create prompts and generate images.

Parameters

name (required)

A class name the describes the fine-tune. e.g: man, woman, cat, dog, boy, girl, style

title (required)

Describes the fine-tune. Ideally a UUID related to the transaction. See idempotency for more information.

images (required)

An array of images to train the fine-tune with. The images can be uploaded as multipart/form-data or as image_urls.

image_urls (required)

An array of images to train the fine-tune with. The images can be uploaded as multipart/form-data or as image_urls.

callback (optional)

A webhook URL to be called when the tune is finished training. The webhook will receive a POST request with the tune object. See more on callbacks.

branch (optional)

Enum: sd15, sdxl1, fast. Will default to the base_tune branch if not specified, or to sd15 if base_tune is not specified.

info

Use branch=fast for mock testing

steps (optional)

Training steps. Recommended leaving blank in order to allow better defaults set by the system.

token (optional)

Unique short text to which the features will be embedded into. Default ohwx for SDXL and sks for SD15.

face_crop (optional)

Detects faces in training images and augments training set with cropped faces. Defaults to account setting

training_face_correct (optional)

Enhance training images using GFPGAN. Consider enabling if input image are low quality or low resolution. May result in over-smoothing.

base_tune_id (optional)

Training on top of former fine-tune or a different baseline model from the gallery (id in the URL). e.g: 690204 - Realistic Vision v5.1

model_type (optional)

Enum: lora, pti, faceid, null for checkpoint. For SDXL1 - API will default to pti and will ignore model_type parameter.

preset (optional)

Enum: flux-lora-fast see details in the GUI, null

prompts_attributes (optional)

Array of prompts entities with all attributes. See create prompt for more information.

Returns

Returns a tune object if successful which will start training immediately and call callback once training is complete.

POST /tunes

# With images as multipart/form-data
# Hard coded tune id of Realistic Vision v5.1 from the gallery - https://www.astria.ai/gallery/tunes
# https://www.astria.ai/gallery/tunes/690204/prompts
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="John Doe - UUID - 1234-6789-1234-56789" \
-F tune[name]=man \
-F tune[branch]="fast" \
-F tune[callback]="https://optional-callback-url.com/webhooks/astria?user_id=1&tune_id=1" \
-F tune[base_tune_id]=690204 \
-F tune[token]=ohwx \
-F "tune[prompts_attributes][0][text]=ohwx man on space circa 1979 on cover of time magazine" \
-F tune[prompts_attributes][0][callback]="https://optional-callback-url.com/webhooks/astria?user_id=1&prompt_id=1&tune_id=1" \
-F "tune[images][]=@1.jpg" \
-F "tune[images][]=@2.jpg" \
-F "tune[images][]=@3.jpg" \
-F "tune[images][]=@4.jpg"

# With image_urls as form-data
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="Grumpy cat - UUID - 1234-6789-1234-56789" \
-F tune[name]=cat \
-F tune[branch]="fast" \
-F tune[callback]="https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1" \
-F tune[base_tune_id]=690204 \
-F tune[token]=ohwx \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg"

# As JSON
cat > data.json <<- EOM
{
"tune": {
"title": "Grumpy Cat - UUID - 1234-6789-1234-56789",
"name": "cat",
"branch": "fast",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1",
"image_urls": [
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg"
],
"prompts_attributes": [
{
"text": "ohwx cat in space circa 1979 French illustration",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1&prompt_id=1"
},
{
"text": "ohwx cat getting into trouble viral meme",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1&prompt_id=1"
}
]
}
}
EOM

curl -X POST -H"Content-Type: application/json" -H "Authorization: Bearer $API_KEY" --data @data.json https://api.astria.ai/tunes

Response


{
"id": 1,
"title": "John Doe - UUID - 1234-6789-1234-56789",
"name": "woman",
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"training_face_correct": false,
"ckpt_url": "https://sdbooth2-production.s3.amazonaws.com/mock",
"ckpt_urls": [
"https://sdbooth2-production.s3.amazonaws.com/mock"
],
"eta": "2023-10-02T14:32:40.363Z",
"trained_at": "2023-10-02T14:32:40.363Z",
"started_training_at": "2023-10-02T14:32:05.229Z",
"expires_at": "2023-11-01T14:32:40.363Z",
"created_at": "2023-10-02T14:32:05.067Z",
"branch": "sdxl1",
"model_type": "lora",
"updated_at": "2023-10-02T14:32:40.363Z",
"url": "https://www.astria.ai/tunes/788416.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
}
- + \ No newline at end of file diff --git a/docs/api/tune/delete/index.html b/docs/api/tune/delete/index.html index d3fc1571..3c8ecf37 100644 --- a/docs/api/tune/delete/index.html +++ b/docs/api/tune/delete/index.html @@ -7,13 +7,13 @@ - +

Delete a tune

Deletes a specific tune by its ID, and associated prompts in case of a checkpoint.

Parameters

id (required)

The ID of the tune to be deleted.

Returns

Returns 200 OK if the prompt was successfully deleted.

DELETE /tunes/:id

curl -X DELETE -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1

Response

200 OK

- + \ No newline at end of file diff --git a/docs/api/tune/index.html b/docs/api/tune/index.html index 543bf862..24331fe6 100644 --- a/docs/api/tune/index.html +++ b/docs/api/tune/index.html @@ -7,14 +7,14 @@ - + - + \ No newline at end of file diff --git a/docs/api/tune/list/index.html b/docs/api/tune/list/index.html index ceb0cb8f..92eb4c2a 100644 --- a/docs/api/tune/list/index.html +++ b/docs/api/tune/list/index.html @@ -7,13 +7,13 @@ - +

List all tunes

Parameters

offset (optional)

Starting offset for the list of prompts. Default: 0. Current page size is 20.

Returns

An array of all fine-tunes owned by the authenticated user

GET /tunes

curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes

Response


[
{
"id": 1,
"title": "John Doe",
"name": "woman",
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"ckpt_url": "https://sdbooth2-production.s3.amazonaws.com/mock",
"ckpt_urls": [
"https://sdbooth2-production.s3.amazonaws.com/mock"
],
"trained_at": "2023-10-02T14:32:40.363Z",
"started_training_at": "2023-10-02T14:32:05.229Z",
"expires_at": "2023-11-01T14:32:40.363Z",
"created_at": "2023-10-02T14:32:05.067Z",
"branch": "sdxl1",
"model_type": "lora",
"updated_at": "2023-10-02T14:32:40.363Z",
"url": "https://www.astria.ai/tunes/788416.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
},
{
"id": 775459,
"title": "Marry Jane",
"name": null,
"is_api": false,
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"ckpt_url": "https://sdbooth2-production.s3.amazonaws.com/mock",
"ckpt_urls": [
"https://sdbooth2-production.s3.amazonaws.com/mock"
],
"trained_at": "2023-09-23T16:07:49.137Z",
"started_training_at": "2023-09-23T16:07:37.334Z",
"expires_at": "2023-10-23T16:07:49.137Z",
"created_at": "2023-09-23T16:07:36.606Z",
"branch": "sdxl1",
"model_type": "lora",
"updated_at": "2023-09-23T16:07:49.138Z",
"url": "https://www.astria.ai/tunes/775459.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
}
]
- + \ No newline at end of file diff --git a/docs/api/tune/retrieve/index.html b/docs/api/tune/retrieve/index.html index c5215e96..5c3f54c6 100644 --- a/docs/api/tune/retrieve/index.html +++ b/docs/api/tune/retrieve/index.html @@ -7,13 +7,13 @@ - +

Retrieve a tune

Parameters

No parameters

Returns

Returns the Tune object.

GET /tunes/:id

curl -X GET -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/1

Response

{
"id": 1,
"title": "John Doe",
"name": "woman",
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"ckpt_url": "https://sdbooth2-production.s3.amazonaws.com/mock",
"ckpt_urls": [
"https://sdbooth2-production.s3.amazonaws.com/mock"
],
"trained_at": "2023-10-02T14:32:40.363Z",
"started_training_at": "2023-10-02T14:32:05.229Z",
"expires_at": "2023-11-01T14:32:40.363Z",
"created_at": "2023-10-02T14:32:05.067Z",
"branch": "sdxl1",
"model_type": "lora",
"updated_at": "2023-10-02T14:32:40.363Z",
"url": "https://www.astria.ai/tunes/788416.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
}
- + \ No newline at end of file diff --git a/docs/category/api/index.html b/docs/category/api/index.html index 8fda37aa..1b0f3fdc 100644 --- a/docs/category/api/index.html +++ b/docs/category/api/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/category/features/index.html b/docs/category/features/index.html index 7541d317..23baf9aa 100644 --- a/docs/category/features/index.html +++ b/docs/category/features/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/category/likes/index.html b/docs/category/likes/index.html index 627415c1..f6383c6f 100644 --- a/docs/category/likes/index.html +++ b/docs/category/likes/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/category/pack-tunes/index.html b/docs/category/pack-tunes/index.html index 8002deb2..af74da48 100644 --- a/docs/category/pack-tunes/index.html +++ b/docs/category/pack-tunes/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/category/packs/index.html b/docs/category/packs/index.html index a6b7abb2..ffd9817a 100644 --- a/docs/category/packs/index.html +++ b/docs/category/packs/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/category/prompts/index.html b/docs/category/prompts/index.html index c1a0afe8..bf93dba5 100644 --- a/docs/category/prompts/index.html +++ b/docs/category/prompts/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/category/tunes/index.html b/docs/category/tunes/index.html index df4fd103..af15dce1 100644 --- a/docs/category/tunes/index.html +++ b/docs/category/tunes/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/category/use-cases/index.html b/docs/category/use-cases/index.html index 2579da45..8d5ea2a3 100644 --- a/docs/category/use-cases/index.html +++ b/docs/category/use-cases/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/changes/index.html b/docs/changes/index.html index cad9a1aa..50b24a60 100644 --- a/docs/changes/index.html +++ b/docs/changes/index.html @@ -7,13 +7,13 @@ - +

Changes

  • 2024-09-03 Flux fine-tuning docs and Flux API usage
  • 2024-07-29 Added Styles option for prompt
  • 2024-06-26 Tiled upscale V2 preserves identity and similarity while adding details and skin tones.
  • 2024-06-26 Added controlnet relight for SD15 with Backend V1 to allow better composition and blending for background replacement.
  • 2024-05-26 Added --improve_similarity 0.5 flag for Checkpoint/LoRA models which dramatically improves similarity/identity.
  • 2024-05-22 Improved SDXL FaceID
  • 2024-05-22 Added Controlnet Style for SDXL1
  • 2024-05-10 Added Controlnet Lineart for SDXL1
  • 2024-05-06 Interior design - improved "Segment Room" (segroom) controlnet to handle empty rooms.
  • 2024-05-05 Packs + Likes API - Control prompts from within Astria and experiment faster.
  • 2024-04-20 Interior design - Added "Segment Room" controlnet for Backend V1, and MLSD for SDXL to be used.
  • 2024-04-04 Added support for face-inpainting, hires-fix and tiled upscale for faceid on Backend V1.
  • 2024-04-04 Lightning schedulers for Backend V1 to support lightning models such as RealVis XL Lightning
  • 2024-04-04 V1: Lightning schedulers to support lightning models such as RealVis XL Lightning
  • 2024-03-27 Upgraded Themes to use Claude Opus and adjust for both SDXL and SD15 prompting.
  • 2024-03-20 Free Upscale tool
  • 2024-03-17 Controlnet composition support for Backend V1. Examples in the gallery
  • 2024-03-10 New Backend version v1 for inference - Higher quality, better samplers, faster inference, and more features.
  • 2024-03-05 TCD sampler gets better results than LCM in 4-8 steps for SDXL models and is available on the samplers dropdown in the Advanced settings of the prompt.
  • 2024-02-16 FaceID Portrait has better color balance and similarity and is well suited for portraits.
  • 2024-02-08 Deprecate prompt aspect-ratio. Use width and height instead for better results (backward compatability available).
  • 2024-02-08 Added --fix_bindi to remove dot on the forehead.
  • 2024-01-30 Deprecated prompt expansion.
  • 2024-01-25 Upscale only Allows you to upscale an existing image.
  • 2024-01-17 FaceID Preserve identity without fine-tuning.
  • 2024-01-03 Tiled upscale improved upscaling.
  • 2023-12-14 Prompt masking feature added - to support product shots and Masked Portraits
  • 2023-11-27 LCM (Latent Consistency Models) scheduler allows inference in 6 steps
  • 2023-10-29 Face-Swap feature added - uses training images to improve inference time similarity
  • 2023-10-22 Themes - Have ChatGPT create 10 prompts for you from a short 2-4 word theme description.
- + \ No newline at end of file diff --git a/docs/features/backend-v1/index.html b/docs/features/backend-v1/index.html index b6a47ccb..e9a232aa 100644 --- a/docs/features/backend-v1/index.html +++ b/docs/features/backend-v1/index.html @@ -7,13 +7,13 @@ - +

Backend V1

BETA

Backend V1 is a complete rewrite of the original image inference and processing pipeline. Here are some of the improvements:

  1. Hi-Res (aka Super-Resolution Details) for SDXL is available.
  2. Faster.
  3. Better handling of loading multiple LoRAs.
  4. DPM++/Karras and DPM++SDE/Karras better results, especially with SDXL.
  5. Civit results should be easy to reproduce.

Features still pending implementation for Backend V1:

  1. TCD sampler
  2. FaceID with --faceid_portrait
  3. --fix_bindi
info

As this is still in BETA stages, we encourage you to report any issues you may encounter using the support email.

Usage

You can find the "Backend version" dropdown in the Advanced settings of the prompt. Alternatively you may select the default account version for the account in the user account setting

For API usage provide the backend_version attribute in the Prompt payload. See: Create Prompt for more details.

Backend V1 advanced settings

- + \ No newline at end of file diff --git a/docs/features/face-inpainting/index.html b/docs/features/face-inpainting/index.html index cd73e4e5..62a53e0d 100644 --- a/docs/features/face-inpainting/index.html +++ b/docs/features/face-inpainting/index.html @@ -7,14 +7,14 @@ - + - + \ No newline at end of file diff --git a/docs/features/face-swap/index.html b/docs/features/face-swap/index.html index 84f4b781..feab8f4c 100644 --- a/docs/features/face-swap/index.html +++ b/docs/features/face-swap/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/features/faceid/index.html b/docs/features/faceid/index.html index eb1f1a31..0667411d 100644 --- a/docs/features/faceid/index.html +++ b/docs/features/faceid/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

FaceID

BETA

See example prompts in the gallery

Overview

FaceID is a model adapter allowing to generate image while preserving a person identity without fine-tuning. Input images can be as few as just one image. The adapter was trained on human faces and cannot be used for pets or other subjects.

Usage

  1. Generate a placeholder fine-tune dataset which will contain the person images. The fine-tune will not go through training and will be immediately ready. faceid-new-fine-tune.png
  2. Generate the image using the FaceID adapter using a syntax similar to LoRA - <faceid:ID:1>

Notes

  1. Use cfg_scale=3
  2. FaceID can work nicely together with Face Swap to improve similarity.
  3. Disable Face-Swap in case your prompt is animation style. Additionally, make sure to select an animated model from the gallery.
  4. For fast generation use the LCM schedulers.
  5. For realistic images, please consider enabling face-correct to improve facial features.
  6. When creating a fine-tune: Base-model is only used as a default for UI generation but does not affect FaceID.
  7. When creating a fine-tune: steps and training_face_correct are not used for FaceID.

API

FaceID is an adapter loaded on top of a base model. As such the inference needs to take place on a model from the gallery. The fine-tune's trained_at is set upon creation and there is no training time. As such no callback is needed.

danger

If you are receiving 422 error model_type=faceid is not supported. Use a checkpoint instead - Change the request URL to https://api.astria.ai/tunes/690204/prompts with 690204 as a hard-coded tune_id of Realistic Vision v5.1 from the gallery. See explanation above.

Step 1: Create fine-tune

POST /tunes

# With images as multipart/form-data
# Hard coded tune id of Realistic Vision v5.1 from the gallery - https://www.astria.ai/gallery/tunes
# https://www.astria.ai/gallery/tunes/690204/prompts
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="John Doe - UUID - 1234-6789-1234-56789" \
-F tune[name]=man \
-F tune[model_type]="faceid" \
-F tune[callback]="https://optional-callback-url.com/webhooks/astria?user_id=1&tune_id=1" \
-F tune[base_tune_id]=690204 \
-F "tune[images][]=@1.jpg" \
-F "tune[images][]=@2.jpg" \
-F "tune[images][]=@3.jpg" \
-F "tune[images][]=@4.jpg"

# With image_urls as form-data
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes \
-F tune[title]="John Doe - UUID - 1234-6789-1234-56789" \
-F tune[name]=man \
-F tune[model_type]="faceid" \
-F tune[callback]="https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1" \
-F tune[base_tune_id]=690204 \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg" \
-F "tune[image_urls][]=https://i.imgur.com/HLHBnl9.jpeg"

# As JSON
cat > data.json <<- EOM
{
"tune": {
"title": "John Doe - UUID - 1234-6789-1234-56789",
"name": "man",
"model_type": "faceid",
"callback": "https://optional-callback-url.com/to-your-service-when-ready?user_id=1&tune_id=1",
"image_urls": [
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg",
"https://i.imgur.com/HLHBnl9.jpeg"
]
}
}
EOM

curl -X POST -H"Content-Type: application/json" -H "Authorization: Bearer $API_KEY" --data @data.json https://api.astria.ai/tunes

Response


[
{
"id": 1,
"title": "John Doe",
"name": "woman",
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"training_face_correct": false,
"ckpt_url": null,
"ckpt_urls": [],
"eta": "2023-10-02T14:32:40.363Z",
"trained_at": "2023-10-02T14:32:40.363Z",
"started_training_at": "2023-10-02T14:32:05.229Z",
"expires_at": "2023-11-01T14:32:40.363Z",
"created_at": "2023-10-02T14:32:05.067Z",
"branch": "sd15",
"model_type": "faceid",
"updated_at": "2023-10-02T14:32:40.363Z",
"url": "https://www.astria.ai/tunes/788416.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
},
{
"id": 775459,
"title": "Marry Jane",
"name": null,
"is_api": false,
"token": "ohwx",
"base_tune_id": null,
"args": null,
"steps": null,
"face_crop": null,
"training_face_correct": null,
"ckpt_url": "https://sdbooth2-production.s3.amazonaws.com/mock",
"ckpt_urls": [
"https://sdbooth2-production.s3.amazonaws.com/mock"
],
"eta": "2023-09-23T16:07:49.137Z",
"trained_at": "2023-09-23T16:07:49.137Z",
"started_training_at": "2023-09-23T16:07:37.334Z",
"expires_at": "2023-10-23T16:07:49.137Z",
"created_at": "2023-09-23T16:07:36.606Z",
"branch": "sd15",
"model_type": "faceid",
"updated_at": "2023-09-23T16:07:49.138Z",
"url": "https://www.astria.ai/tunes/775459.json",
"orig_images": [
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock",
"https://sdbooth2-production.s3.amazonaws.com/mock"
]
}
]

Step 2: Create prompts

POST /tunes/:id/prompts

# Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/690204/prompts \
-F prompt[text]="<faceid:tune_id:strength> woman trekking in the alps" \
-F prompt[negative_prompt]="" \
-F prompt[super_resolution]=true \
-F prompt[face_correct]=true \
-F prompt[face_swap]=true \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"
- + \ No newline at end of file diff --git a/docs/features/lcm/index.html b/docs/features/lcm/index.html index cc4214a9..5f3c8b2b 100644 --- a/docs/features/lcm/index.html +++ b/docs/features/lcm/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/features/lora/index.html b/docs/features/lora/index.html index c979ed22..f8224992 100644 --- a/docs/features/lora/index.html +++ b/docs/features/lora/index.html @@ -7,13 +7,13 @@ - +

LoRA

LoRA (low ranking adaption) is a type of model fine-tuning which takes an additional set of model weights (or parameters) and trains those on top while not changing the existing model. For this reason LoRA training is faster comparing to full checkpoint training as it only trains a small amount of weights comparing to the full model. Additionally, LoRA can be loaded on top of any base model, and multiple LoRA can be combined.

The LoRA ecosystem contains many different types of weight structures with different ranks. For this reason some LoRA might not be compatible in different UIs or platforms.

LoRAs can be used to enhance the quality of the image or deepen a specific style that is desired.

Astria provides a LoRA gallery and allows importing external LoRAs. To use a LoRA go to the generate tab and use the LoRA syntax as such: <lora:name:weight>. For example, a very common usage <lora:epi_noiseoffset2:0.5> - will load a Noise offset lora at strength 0.5 which will turn the image a bit darker and deepen the contrast.

See example prompts in the gallery

You can also combine LoRAs as such:

<lora:epi_noiseoffset2:0.5><lora:FilmVelvia2:0.5><lora:add_detail:0.5><lora:epiCRealismHelper:0.2>
danger

Note that LoRA can reduce the similarity of trained subjects when used together. To avoid this use low-strength for the lora.

Some LoRAs may be trained on trigger words which are required to show in the prompt text. Check the LoRA information by clicking on the Website link and reading its docs and trigger words.

- + \ No newline at end of file diff --git a/docs/features/multiperson/index.html b/docs/features/multiperson/index.html index 4bbd2d2c..92b0cffc 100644 --- a/docs/features/multiperson/index.html +++ b/docs/features/multiperson/index.html @@ -7,15 +7,15 @@ - +

Multi-Person inference

BETA

Multiperson result

generated.png

See example prompts in the gallery

Overview

Multi-person inference is a feature that allows you to generate images with multiple people in them. -See example prompts in the gallery or in the community feed.

See pricing for the cost of this feature.

Step 1: Training

Create a fine-tune for each person. Model can be either lora or a checkpoint.

img.png

Step 2 - Inference

Provide an input_image and controlnet=pose so that the generation has a solid image composition to start with. +See example prompts in the gallery or in the community feed.

See pricing for the cost of this feature.

Step 1: Training

Create a fine-tune for each person. Model can be either lora or a checkpoint.

img.png

Step 2 - Inference

Provide an input_image and controlnet=pose so that the generation has a solid image composition to start with. If no input_image is given, a constant pose input image (with arms crossed) will be used for each person.

The prompt is divided by the BREAK keyword such as:

  • 1st base prompt used to generate the background and scene.
  • 2nd common prompt that's concatenated to each person prompt and the base prompt to avoid repetition.
  • 3+ each person and its LoRA syntax reference (even for checkpoint)

Examples

1. Without an input image

Multiperson result

generated.png

Dramatic 1940s film noir scene. Couple standing together aiming guns, wooden paneled background.
BREAK
<lora:1533312:1.0> ohwx woman with determined expression, retro updo hairstyle, bright red lipstick, black and yellow color-blocked dress, aiming revolver with right hand
BREAK
<lora:1558021:1.0> ohwx man with serious face, grey fedora hat, brown suit with patterned tie, white shirt, aiming pistol with left hand
num_images=4
negative_prompt=
seed=
steps=
cfg_scale=
controlnet=
input_image_url=
mask_image_url=
denoising_strength=
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=false
inpaint_faces=false
face_correct=false
film_grain=false
face_swap=false
hires_fix=false
backend_version=1
ar=1:1
scheduler=euler_a
color_grading=
use_lpw=false
w=1024
h=576

3. Prompt with input image as a background

In some cases it might be desired to keep the exact same background as the input image, and only change the people in the image. To do this, add an input_image and keep the base prompt empty, i.e: start the prompt with BREAK BREAK to keep both the base and common prompts empty.

Pose input image

multiperson-txt2img-pose.jpg

Multiperson result

multiperson-txt2img-pose.jpg

BREAK 
BREAK ohwx woman, red blouse jeans, and belt, holding a rifle <lora:749152:1>
BREAK ohwx man, dark vest <lora:749183:1>
num_images=4
negative_prompt=
seed=43
steps=30
cfg_scale=
controlnet=
input_image_url=https://sdbooth2-production.s3.amazonaws.com/4j0pej570oosmbj22xx6igf3gfi2
mask_image_url=
denoising_strength=
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=true
inpaint_faces=true
face_correct=false
film_grain=false
face_swap=true
hires_fix=true
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=
h=
- + \ No newline at end of file diff --git a/docs/features/prompt-masking/index.html b/docs/features/prompt-masking/index.html index 486603ac..3cebba86 100644 --- a/docs/features/prompt-masking/index.html +++ b/docs/features/prompt-masking/index.html @@ -7,13 +7,13 @@ - +

Prompt Masking

Prompt masking uses a short text to create a mask from the input image. The mask can then be used to inpaint parts of the image. Use the below parameters as part of the prompts to use auto-masking

Prompt masking can be used for product shots or Masked Portraits.

See example prompts in the gallery

danger

SDXL inpainting results are poor. Use SD15 models instead.

Syntax

Below parameters should be used as text inside the prompt text

--mask_prompt

A short text like foreground or face, head or person.

--mask_negative

A space separated list of words that should not appear in the mask. e.g: clothes hat shoes

--mask_invert

Inverts the mask

--mask_dilate

Dilates the mask. Negative values will erode the mask. Use percentage values like -20% or -20 if input image size is dynamic.

--hires_denoising_strength

Denoising strength for hires-fix. Use hi-res fix with prompt-masking to smooth the colors and blending. Range 0-1. Default: 0.4.

realistic digital painting, astronaut in a garden on a spring day, by martine johanna and simon stalenhag and chie yoshii and casey weldon and wlop, ornate, dynamic, particulate, rich colors, intricate, elegant, highly detailed, harpers bazaar art, fashion magazine, smooth, sharp focus, 8 k, octane rende --mask_prompt foreground --mask_negative clothes --mask_invert --mask_dilate -20 --hires_denoising_strength 0.1
num_images=1
negative_prompt=clay, text, watermark, padding, cropped, typography
seed=
steps=30
cfg_scale=
controlnet=pose
input_image_url=https://sdbooth2-production.s3.amazonaws.com/esfd53purhhcijhmzka4c364x6lb
mask_image_url=
denoising_strength=
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=true
inpaint_faces=false
face_correct=true
film_grain=false
face_swap=false
hires_fix=true
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=
h=
- + \ No newline at end of file diff --git a/docs/features/styles/index.html b/docs/features/styles/index.html index 55ec383d..3ffadcf8 100644 --- a/docs/features/styles/index.html +++ b/docs/features/styles/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/features/tiled-upscale/index.html b/docs/features/tiled-upscale/index.html index e09b70c1..ea349adb 100644 --- a/docs/features/tiled-upscale/index.html +++ b/docs/features/tiled-upscale/index.html @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ See example prompts in the gallery

Usage

To enable tiled upscale, add --tiled_upscale_v2 to the prompt text, or --tiled_upscale for the legacy version. Tiled upscale V2 requires Backend V1. Customize parameters tiled upscale if needed with the following flags and the default values:

  1. --hires_cfg_scale 5.5
  2. --resemblance 0.65

See pricing for the cost details.

Tiled Upscale V2

Tiled upscale V2 uses SDXL tile controlnet which better preserves identity and similarity while adding details and skin tones, and helps avoid the oversmoothing and painterly look of the original image.

Example

photograph of a woman, (smiling facial expression:1.1), textured skin, goosebumps, (blonde hair:1.2), (unbuttoned white shirt:1.2), distressed boyfriend jeans, long sleeves, (candlelight,chiaroscuro:1.1), cowboy shot, dark and mysterious cave with unique rock formations and hidden wonders, perfect eyes, Porta 160 color, shot on ARRI ALEXA 65, bokeh, sharp focus on subject, shot by Don McCullin --tiled_upscale_v2
num_images=2
negative_prompt=nude, nsfw, (CyberRealistic_Negative-neg:0.8), (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime, mutated hands and fingers:1.4), (deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, disconnected limbs, mutation, mutated, ugly, disgusting, amputation
seed=43
steps=30
cfg_scale=
controlnet=
input_image_url=
mask_image_url=
denoising_strength=
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=true
inpaint_faces=false
face_correct=false
film_grain=false
face_swap=false
hires_fix=false
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=512
h=768
- + \ No newline at end of file diff --git a/docs/tags/ai-avatars/index.html b/docs/tags/ai-avatars/index.html index 21eb0b24..8e18e6bb 100644 --- a/docs/tags/ai-avatars/index.html +++ b/docs/tags/ai-avatars/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/ai-headshots/index.html b/docs/tags/ai-headshots/index.html index c779a80e..5fbf1cd4 100644 --- a/docs/tags/ai-headshots/index.html +++ b/docs/tags/ai-headshots/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/ai-photoshoot/index.html b/docs/tags/ai-photoshoot/index.html index a722f635..662c2f9e 100644 --- a/docs/tags/ai-photoshoot/index.html +++ b/docs/tags/ai-photoshoot/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/animated/index.html b/docs/tags/animated/index.html index f7daa90c..8c468d77 100644 --- a/docs/tags/animated/index.html +++ b/docs/tags/animated/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "animated"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/api/index.html b/docs/tags/api/index.html index f039eb2d..9dff35ae 100644 --- a/docs/tags/api/index.html +++ b/docs/tags/api/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "api"

View All Tags

Flux API usage

For an overview of Flux fine-tuning, see Flux fine-tuning

- + \ No newline at end of file diff --git a/docs/tags/avatars/index.html b/docs/tags/avatars/index.html index 3a8ad049..657e7624 100644 --- a/docs/tags/avatars/index.html +++ b/docs/tags/avatars/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/background-replacement/index.html b/docs/tags/background-replacement/index.html index 0225f4c7..921a6861 100644 --- a/docs/tags/background-replacement/index.html +++ b/docs/tags/background-replacement/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "background replacement"

View All Tags
- + \ No newline at end of file diff --git a/docs/tags/clarity/index.html b/docs/tags/clarity/index.html index c4f21778..8ca3856c 100644 --- a/docs/tags/clarity/index.html +++ b/docs/tags/clarity/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/comic-book/index.html b/docs/tags/comic-book/index.html index c155324a..36d8bf00 100644 --- a/docs/tags/comic-book/index.html +++ b/docs/tags/comic-book/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "comic book"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/creative-upscaler/index.html b/docs/tags/creative-upscaler/index.html index 00a4c3bc..ceaf9b0c 100644 --- a/docs/tags/creative-upscaler/index.html +++ b/docs/tags/creative-upscaler/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/ecommerce/index.html b/docs/tags/ecommerce/index.html index 42db1de0..697db5af 100644 --- a/docs/tags/ecommerce/index.html +++ b/docs/tags/ecommerce/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/enhance/index.html b/docs/tags/enhance/index.html index 6f8d8913..cb0de434 100644 --- a/docs/tags/enhance/index.html +++ b/docs/tags/enhance/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "enhance"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/fantasy-art/index.html b/docs/tags/fantasy-art/index.html index 29251856..b87b13ce 100644 --- a/docs/tags/fantasy-art/index.html +++ b/docs/tags/fantasy-art/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "fantasy art"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/fine-tuning/index.html b/docs/tags/fine-tuning/index.html index e474f6c7..6ffc2033 100644 --- a/docs/tags/fine-tuning/index.html +++ b/docs/tags/fine-tuning/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/flux/index.html b/docs/tags/flux/index.html index 1973a7c2..25de7aba 100644 --- a/docs/tags/flux/index.html +++ b/docs/tags/flux/index.html @@ -7,13 +7,13 @@ - +

2 docs tagged with "flux"

View All Tags

Flux API usage

For an overview of Flux fine-tuning, see Flux fine-tuning

- + \ No newline at end of file diff --git a/docs/tags/headshots/index.html b/docs/tags/headshots/index.html index b9150dcf..817e0c58 100644 --- a/docs/tags/headshots/index.html +++ b/docs/tags/headshots/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/image-enhancement/index.html b/docs/tags/image-enhancement/index.html index 51c21f8f..2931cb52 100644 --- a/docs/tags/image-enhancement/index.html +++ b/docs/tags/image-enhancement/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/index.html b/docs/tags/index.html index 5f008f89..76725a8f 100644 --- a/docs/tags/index.html +++ b/docs/tags/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/line-art/index.html b/docs/tags/line-art/index.html index 25d609f1..f0aefa44 100644 --- a/docs/tags/line-art/index.html +++ b/docs/tags/line-art/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "line art"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/lineart/index.html b/docs/tags/lineart/index.html index 40ac12b7..3e1d5800 100644 --- a/docs/tags/lineart/index.html +++ b/docs/tags/lineart/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/lo-ra/index.html b/docs/tags/lo-ra/index.html index c8055217..36501aae 100644 --- a/docs/tags/lo-ra/index.html +++ b/docs/tags/lo-ra/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/lora/index.html b/docs/tags/lora/index.html index 9a1f870b..84ec5d13 100644 --- a/docs/tags/lora/index.html +++ b/docs/tags/lora/index.html @@ -7,13 +7,13 @@ - +

2 docs tagged with "lora"

View All Tags

Flux API usage

For an overview of Flux fine-tuning, see Flux fine-tuning

- + \ No newline at end of file diff --git a/docs/tags/lowpoly/index.html b/docs/tags/lowpoly/index.html index 0f4de732..c512154c 100644 --- a/docs/tags/lowpoly/index.html +++ b/docs/tags/lowpoly/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "lowpoly"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/magnific/index.html b/docs/tags/magnific/index.html index 4ef13248..7cc60a13 100644 --- a/docs/tags/magnific/index.html +++ b/docs/tags/magnific/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/neonpunk/index.html b/docs/tags/neonpunk/index.html index c85c9959..e8e5d62f 100644 --- a/docs/tags/neonpunk/index.html +++ b/docs/tags/neonpunk/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "neonpunk"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/noise-offset/index.html b/docs/tags/noise-offset/index.html index 3a97b7c4..aa9df6e5 100644 --- a/docs/tags/noise-offset/index.html +++ b/docs/tags/noise-offset/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/oil-painting/index.html b/docs/tags/oil-painting/index.html index 6ab644ac..d61018cd 100644 --- a/docs/tags/oil-painting/index.html +++ b/docs/tags/oil-painting/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/photo-optimization/index.html b/docs/tags/photo-optimization/index.html index a70893ae..25fee008 100644 --- a/docs/tags/photo-optimization/index.html +++ b/docs/tags/photo-optimization/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/photographic/index.html b/docs/tags/photographic/index.html index 052e3664..f92e4685 100644 --- a/docs/tags/photographic/index.html +++ b/docs/tags/photographic/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "photographic"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/product-photo/index.html b/docs/tags/product-photo/index.html index 39df7ab6..a6bb3b7e 100644 --- a/docs/tags/product-photo/index.html +++ b/docs/tags/product-photo/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/products/index.html b/docs/tags/products/index.html index f1a22330..f5d1ebf5 100644 --- a/docs/tags/products/index.html +++ b/docs/tags/products/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/prompt-styles/index.html b/docs/tags/prompt-styles/index.html index 22c49012..06bf9343 100644 --- a/docs/tags/prompt-styles/index.html +++ b/docs/tags/prompt-styles/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "prompt styles"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/shopify/index.html b/docs/tags/shopify/index.html index fdc5f775..92674a6f 100644 --- a/docs/tags/shopify/index.html +++ b/docs/tags/shopify/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/social-profiles/index.html b/docs/tags/social-profiles/index.html index 47368321..b21c3963 100644 --- a/docs/tags/social-profiles/index.html +++ b/docs/tags/social-profiles/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/style/index.html b/docs/tags/style/index.html index e0571f04..f0ed6f5c 100644 --- a/docs/tags/style/index.html +++ b/docs/tags/style/index.html @@ -7,13 +7,13 @@ - +

2 docs tagged with "style"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/super-resolution/index.html b/docs/tags/super-resolution/index.html index b87a1702..33a11548 100644 --- a/docs/tags/super-resolution/index.html +++ b/docs/tags/super-resolution/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/templates/index.html b/docs/tags/templates/index.html index 407f545e..52dbe96f 100644 --- a/docs/tags/templates/index.html +++ b/docs/tags/templates/index.html @@ -7,13 +7,13 @@ - +

One doc tagged with "templates"

View All Tags

Styles

Prompt style attribute allow to easily generate an image according to a preconfigured set of styles. The styles are essentially a set of weights that are applied to the model during the generation process.

- + \ No newline at end of file diff --git a/docs/tags/training/index.html b/docs/tags/training/index.html index 0e20d4fa..c49bac3d 100644 --- a/docs/tags/training/index.html +++ b/docs/tags/training/index.html @@ -7,13 +7,13 @@ - +

2 docs tagged with "training"

View All Tags

Flux API usage

For an overview of Flux fine-tuning, see Flux fine-tuning

- + \ No newline at end of file diff --git a/docs/tags/upscaling/index.html b/docs/tags/upscaling/index.html index e712eb83..1a2677f4 100644 --- a/docs/tags/upscaling/index.html +++ b/docs/tags/upscaling/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/tags/virtual-influencers/index.html b/docs/tags/virtual-influencers/index.html index a5f51568..a1772569 100644 --- a/docs/tags/virtual-influencers/index.html +++ b/docs/tags/virtual-influencers/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/use-cases/ai-photoshoot/index.html b/docs/use-cases/ai-photoshoot/index.html index 1ed0c512..992b9333 100644 --- a/docs/use-cases/ai-photoshoot/index.html +++ b/docs/use-cases/ai-photoshoot/index.html @@ -7,13 +7,13 @@ - +

AI Photoshoot

Overview

The term "AI Photoshoot", "AI Headshots" or "AI Avatars" refers to the process of creating a generative AI model from around 16 images of a person. This model can then be used to create professional photography imagery of the person, without requiring high-end camera equipment, lighting, or wardrobe.

AI headshots are particularly useful for social profile photos, such as those used on LinkedIn or Facebook, as well as on dating sites.

Another recent trend is the creation of virtual social influencers - consistent characters that do not exist in reality, but can be generated consistently in different scenes and everyday life.

Training images

Fine-tuning training images

Output images

Generated images

Steps

1. Create a model

At this stage, we will create a 2GB numeric (AI) model file that contains the "features" of a person. This is not the part where we generate new images, but only train a dedicated AI model.

To begin, go to the New tune page.

Title - Enter the person's name, e.g. Elon Musk. Or choose whatever title that fits your needs. Choosing a title is not a part of the actual training of the model.

Class Name - Enter man or woman, or possibly boy, girl, cat, or dog. This is highly important as it is a part of the actual technical training of your model. We automatically generate images of the "class" while training, and by comparing them to your images (the training set), the model 'learns' your subject's unique features.

Base tune - Select a baseline model on which you would like to train. For best quality we recommend using Flux1.dev.

Other settings are optional and can be changed to your preference.

2. Generate images

Even before the model is ready, you can prepare a queue of prompts (texts) that will be fed into the model and used to generate models.

Tips for training images

  1. Upload both portrait and full body shots of the person
  2. Use 26 pictures of your subject. Preferably cropped to 1:1 aspect ratio.
  3. Use 6 photos of full body or entire object + 10 medium shot photos from the chest up + 10 close-ups.
  4. Variation is key - Change body pose for every picture, use pictures from different days backgrounds and lighting. Every picture of your subject should introduce new info about your subject.
  5. Avoid pictures taken at the same hour/day. For example few pictures with the same shirt will make the model learn the shirt as well as part of the subject.
  6. Always pick a new background.
  7. Do not upload pictures mixed with other people
  8. Do not upload upload funny faces

Tips for inference

  1. Use ohwx woman/man at the beginning of the sentence.
  2. Textual inversion can reduce similarity. Try to avoid it. Specifically TIs such as ng_deepnegative_v1_75t or CyberRealistic.
  3. Use of LoRA for styles can reduce similarity. Keep LoRA strength low around 0.2-0.3.
- + \ No newline at end of file diff --git a/docs/use-cases/controlnet/index.html b/docs/use-cases/controlnet/index.html index 6ef1a323..6528ed95 100644 --- a/docs/use-cases/controlnet/index.html +++ b/docs/use-cases/controlnet/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/use-cases/faq/index.html b/docs/use-cases/faq/index.html index 5dcb886e..2c4854ec 100644 --- a/docs/use-cases/faq/index.html +++ b/docs/use-cases/faq/index.html @@ -7,13 +7,13 @@ - +

FAQ

What image size should I upload?
Is there a size limit to uploads?

There is no hard limit on image uploads, the service does have some limits against JPEG bombs. A reasonable limit would be 3MB per image. The image size should be at least 512x512 pixels as models train on 512x512, but it's also a good idea to give some headroom for face-cropping, so possibly 1024x1024 or 2048x2048 could be a good target resize. Finally make sure compression level does not introduce artifacts to the uploaded images as the model is very sensitive to JPEG artifacts.

Why isn't it free?

For each model created using your training image, Astria creates an AI model using high-end GPU machines, and then serves those models to allow image generation. This process is expensive.

I didn't get my images. Where can I see it?

Check out your tunes page and click on the tune thumbnail to see your results.

Can I get higher resolution pictures?

Toggle the Super-resolution option in the prompt Advanced section.

How do I download my images ?

Go to https://www.astria.ai/tunes and click on the tune thumbnail, hit download to save the pictures of each prompt.

Generated images look weird. What happened?

See Fine-tuning guide and the AI Photohoot guide for tips on how to get the best results.

Can I download CKPT file? How do I use it?

  1. Once the fine-tune is done processing, you should be able to see a TAR and CKPT buttons at the top of the fine-tune page.
  2. You can use the CKPT with software like Automatic1111 and ComfyUI.

I would like to use your API for my service or app, would you be able to handle the load?

Astria is already powering some of the biggest companies and applications on the web and on the app-store using fine-tuning. All jobs are handled in parallel and there is no wait time or queuing.

What happens to my model, training pictures and image generations?

The entire fine-tune (including CKPT file, model, training pictures, generated images, prompts) is kept for 1 month, at the end of which it is all deleted. You can delete it at any time by clicking on the delete button in the fine-tunes page.

Can I extend my model beyond 30 days?

You can select to extend model storage in the billing page

Can I train a model for more than one person?

You can train a fine-tune using class_name=couple and get amazing results. Make sure that the couple appear in each of the training images together. In this case it might be harder for the model to create more variation and create long-shots and complex scenes.

- + \ No newline at end of file diff --git a/docs/use-cases/finetuning-guide/index.html b/docs/use-cases/finetuning-guide/index.html index 2b1f47d0..39d02420 100644 --- a/docs/use-cases/finetuning-guide/index.html +++ b/docs/use-cases/finetuning-guide/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

Fine-tuning guide

The guide for high quality avatars and AI photography

When building an app for avatars or professional AI photoshoot, you should consider two aspects

  1. Similarity to the original subject
  2. High quality generation which look professional

Tracking subject similarity

Make sure to test results on a person you closely know and can judge similarity. Create a list of candidate prompts and run them on 2-3 subjects. For each prompt ask the person to rate how many of the images look similar. Finally sum the ratios for each prompt and compare prompts. Improve the prompts or reconsider a different prompt if similarity is low. Alternatively, consider switching to a different base model to match ethnicity or avoid biased models.

Fine-tuning training tips

  1. Enable Face-detection in your account settings page - This will augment the training dataset with face-crops from the original training images. This should increase similarity to the subject but can also cause generations to be more toward close-ups instead of nice medium or long shots. In this case you might need to adjust the prompts to use emphasis weights.
  2. Base model - Select plain SD15 for better resemblance. Select Realistic Vision V5.1 as a base model for nicer pictures. These models are good in realistic results. If you’d like to get generations that are more artistic - consider Deliberate or Reliberate as a base model. For a more diverse ethnically and possibly better similarity to subjects, consider Life Like Ethnicities. Finally, we suggest checking training on SDXL with text-embedding + LoRA.

Prompt generation tips

  1. Set width and height to 512 x 640 - to match Instagram aspect ratio of 4:5 and also create good portraits. Avoid higher aspect ratios as you might get artifacts such as duplicate heads.
  2. Enable face-inpainting - This is one of Astria’s unique features and allows creating long shots while avoiding deformed faces.
  3. Weighted prompts - when a prompt has multiple keywords that collide and reduce similarity - use the parenthesis syntax for emphasis to increase similarity, such as (ohwx man) On the flip side, try to avoid weighted prompts altogether to preserve similarity to subject.
  4. Use Controlnet with input image to preserve composition and create unique long-shots. Enable controlnet_txt2img if you’d like to create more variation and draw more from the prompt. Increase denoising_strength=1
- + \ No newline at end of file diff --git a/docs/use-cases/flux-finetuning/index.html b/docs/use-cases/flux-finetuning/index.html index c624b361..3b1ab672 100644 --- a/docs/use-cases/flux-finetuning/index.html +++ b/docs/use-cases/flux-finetuning/index.html @@ -7,13 +7,13 @@ - +

Flux training

Overview

Flux is a family of generative image models created by Black Forest Labs making use of some of the latest AI advancement such as diffusion, transformer (MMDiT), Flow-matching and a large T5 text encoder.

  • The large text encoder allows the text2img model to better align the image with the given prompt and create complex images with a single prompt.

  • The model base resolution is 1024x1024 however unlike previous models, was trained on a variety of aspect ratios its neural-network architecture is able to better cope with different aspect ratios both in training and inference.

  • Flux1.dev requires commercial licensing which is provided to Astria customers.

Input training imagesgenerated.png
Output imagesgenerated.png

Training tips

Default token for SDXL should be ohwx and will be set automatically if none is specified

  1. As with other models, a good training set is critical to getting great results. See AI photoshoot guide
  2. Flux training is expensive comparing to previous (see pricing) and slow.
  3. Astria currently defaults to 100 steps per image for training a Flux lora.
  4. You may opt to override the number of training steps in order to reduce costs and processing time. Reducing the steps can produce good results when the target inference images are similar to the input training images (like headshots). Example lower steps could be 600, 1000 or 1200 (roughly 50-70 * number of training images )

Inference tips

  1. Dense prompts - Flux works best when the prompt is descriptive and detailed, but as in most models, be concise. Overdoing the description can create conflicts in the inference.
  2. *No negatives - Flux doesn’t work with negatives, instead we suggest using positive prompts. For example, instead of writing ‘cartoon’ in the negative, write ‘realistic settings and characters’ in the prompt.
  3. No weighted prompts - using weights or parentheses () to emphasis certain parts of a prompt doesn’t work with Flux. Instead, make sure the important parts at the beginning of the prompt.
  4. Adding text in the image - One of the advantages of Flux is the ability to add text to an image. There are a few ways to do that, like “ohwx man holding a sign with the words ‘Hello’“.
  5. Looking for prompt ideas? Try the Themes feature. Themes uses Claude GPT to help write prompts for the specific model. You can add a theme and write any topic on your mind, and themes will produce 10 prompts on it.

API usage

See here for API usage

- + \ No newline at end of file diff --git a/docs/use-cases/inpainting-and-masking/index.html b/docs/use-cases/inpainting-and-masking/index.html index 954fca0e..23600a25 100644 --- a/docs/use-cases/inpainting-and-masking/index.html +++ b/docs/use-cases/inpainting-and-masking/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/use-cases/masked-portraits/index.html b/docs/use-cases/masked-portraits/index.html index 19d83399..dfa953cc 100644 --- a/docs/use-cases/masked-portraits/index.html +++ b/docs/use-cases/masked-portraits/index.html @@ -7,14 +7,14 @@ - +

Masked portraits

BETA

Input image

source.png

Result using RV v5.1

generated.png

using Cartoon

generated.png

Using Flat

generated.png

Input image

source.png

Result using RV v5.1

generated.png

using Cartoon

generated.png

Using Flat

generated.png

Input image

source.png

Result using RV v5.1

generated.png

using Cartoon

generated.png

Using Flat

generated.png

Input image

source.png

Result using RV v5.1

generated.png

using Cartoon

generated.png

Using Flat

generated.png

See example prompts in the gallery.

Overview

Use prompt masking feature to embed a person into a scene. This essentially allows you to create AI photogarphy or avatars without fine-tuning.

danger

SDXL inpainting results are poor. Use SD15 models instead.

See pricing for the cost of this feature.

Example prompt

realistic digital painting, astronaut in a garden on a spring day, by martine johanna and simon stalenhag and chie yoshii and casey weldon and wlop, ornate, dynamic, particulate, rich colors, intricate, elegant, highly detailed, harpers bazaar art, fashion magazine, smooth, sharp focus, 8 k, octane rende --mask_prompt foreground --mask_negative clothes --mask_invert --mask_dilate -20 --hires_denoising_strength 0.2
num_images=1
negative_prompt=clay, text, watermark, padding, cropped, typography
seed=
steps=30
cfg_scale=
controlnet=pose
input_image_url=https://sdbooth2-production.s3.amazonaws.com/d6ff3soq5pok5tlbcanf599vkw06
mask_image_url=
denoising_strength=
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=true
inpaint_faces=false
face_correct=true
film_grain=false
face_swap=false
hires_fix=true
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=
h=

API usage

- + \ No newline at end of file diff --git a/docs/use-cases/product-shots/index.html b/docs/use-cases/product-shots/index.html index 9bbd3f4d..c56a4d85 100644 --- a/docs/use-cases/product-shots/index.html +++ b/docs/use-cases/product-shots/index.html @@ -7,13 +7,13 @@ - +
- + \ No newline at end of file diff --git a/docs/use-cases/room-redesign/index.html b/docs/use-cases/room-redesign/index.html index 26d81b53..bb1dfa82 100644 --- a/docs/use-cases/room-redesign/index.html +++ b/docs/use-cases/room-redesign/index.html @@ -7,13 +7,13 @@ - +

AI Interior Design

Backend V1

Original room

Original room

Generated using mlsd

generated.png

Generated room using segroom + mlsd

Generated room using segroom + mlsd

Generated room with window masking

generated.png

Original sketch

Original room

Generated room with window masking

generated.png

See example prompts in the photobooth page or in the gallery.

Overview

AI Interrior design is the term for the process of generating images of a room with different furniture, wall colors, and decorations all while keeping the original room layout. This can be useful for interior designers, real estate agents, or when planning a renovation.

How to use

In order to preserve the room layout use either controlnet mlsd or segroom. Input images can be sketches, 3d models, or photos of the room. Depending on the input, you might need to adjust the strength and combination of controlnets as well as the prompts.

Controlnet segroom is a specific controlnet that was trained to preserve the meaning of the room layout, such as walls and windows.

Controlnet mlsd is a more general model, used with a pre-processor that produces straight lines and is suitable for architecture.

mlsd is support for both SDXL and SD1.5 models while segroom is only available for SD1.5 models.

Additionally you may decide to automatically mask out windows and doors by using the --mask_prompt windows door --mask_invert prompt. See more information on prompt masking syntax.

Example prompt

Clean scandinavian design living room, natural light, architecture magazine cover  <lora:epi_noiseoffset2:0.5><lora:FilmVelvia2:0.5><lora:add_detail:0.5><lora:epiCRealismHelper:0.2> --mask_prompt windows door --mask_invert --controlnets mlsd segroom --controlnet_weights 0.5 1
num_images=1
negative_prompt=painted, sketch, deformed, easynegative
seed=
steps=30
cfg_scale=
controlnet=lineart
input_image_url=https://sdbooth2-production.s3.amazonaws.com/du6cwkp9nojx3ze66vv5nqi39jxo
mask_image_url=
denoising_strength=1
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=true
inpaint_faces=false
face_correct=false
film_grain=false
face_swap=false
hires_fix=true
backend_version=1
ar=1:1
scheduler=dpm++sde_karras
color_grading=
use_lpw=true
w=
h=
- + \ No newline at end of file diff --git a/docs/use-cases/sdxl-training/index.html b/docs/use-cases/sdxl-training/index.html index 836e9846..145e5bd1 100644 --- a/docs/use-cases/sdxl-training/index.html +++ b/docs/use-cases/sdxl-training/index.html @@ -7,13 +7,13 @@ - +

SDXL training

Overview

Stable Diffusion XL or SDXL is the 2nd gen image generation model that is tailored towards more photorealistic outputs with more detailed imagery and composition. SDXL can generate realistic faces, legible text within the images, and better image composition, all while using shorter and simpler prompts.

info

LoRA + Text-embedding is currently the only option for fine-tuning SDXL.

Input training imagesgenerated.png
Output imagesgenerated.png

Training tips

Default token for SDXL should be ohwx and will be set automatically if none is specified

Inference tips

  1. Do not copy and paste prompts from SD15
  2. Do not use textual-inversions such as easynegative or badhands from SD15
  3. Consider activating face-swap and face-inpainting (which in turn requires super-resolution) - this is the biggest boost you can get to increase similarity to subject
  4. Use clean small concise prompts - usually up to 15 words
  5. Avoid long negatives - this will decrease similarity to subject.
  6. Start with baseline SDXL 1.0 inference before going to other base models. Most custom SDXL models are biased and may reduce similarity. Models which we noticed that work okay are ZavyChromaXL and ClearChromaXL

All above tips will help increase similarity to the original subject.

Aspect ratios

The below aspect ratios are recommended for SDXL inference since these were also used for the training.

aspect: width, height
0.5: 704, 1408
0.52: 704, 1344
0.57: 768, 1344
0.6: 768, 1280
0.68: 832, 1216
0.72: 832, 1152
0.78: 896, 1152
0.82: 896, 1088
0.88: 960, 1088
0.94: 960, 1024
1.0: 1024, 1024
1.07: 1024, 960
1.13: 1088, 960
1.21: 1088, 896
1.29: 1152, 896
1.38: 1152, 832
1.46: 1216, 832
1.67: 1280, 768
1.75: 1344, 768
1.91: 1344, 704
2.0: 1408, 704
2.09: 1472, 704
2.4: 1536, 640
2.5: 1600, 640
2.89: 1664, 576
3.0: 1728, 576

API usage

See here for API usage

- + \ No newline at end of file diff --git a/docs/use-cases/toonify/index.html b/docs/use-cases/toonify/index.html index 61b2c838..b90bafee 100644 --- a/docs/use-cases/toonify/index.html +++ b/docs/use-cases/toonify/index.html @@ -7,13 +7,13 @@ - + - + \ No newline at end of file diff --git a/docs/use-cases/upscale/index.html b/docs/use-cases/upscale/index.html index aae45ba6..c3767ce0 100644 --- a/docs/use-cases/upscale/index.html +++ b/docs/use-cases/upscale/index.html @@ -7,13 +7,13 @@ - +

Upscale

BETA

Low-res input

upscale-input

Low-res input
Low-res input

upscale-input

Low-res input

See example prompts in the gallery. Also check out free upscaling tool page.

Overview

Upscaling uses model and text guidance to add details to original image. Depending on the denoising_strength the model can hallucinate more details shifting away from the original image. For applying tiled upscaling straight after image generation see tiled upscaling.

Usage

  1. In the prompts generate page - Set an input image in the Controlnet/img2img section.
  2. Add a text prompt ending with --only_upscale
  3. Select a model from the dropdown that matches the style and content of the input image.

Example

Example prompt for the result above

masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1> --only_upscale
num_images=1
negative_prompt=(worst quality, low quality, normal quality:2) JuggernautNegative-neg
seed=
steps=16
cfg_scale=6.0
controlnet=
input_image_url=https://sdbooth2-production.s3.amazonaws.com/cvrx6g5wx5tbiuz9ivoah1j19why
mask_image_url=
denoising_strength=0.1
controlnet_conditioning_scale=
controlnet_txt2img=false
super_resolution=false
inpaint_faces=false
face_correct=false
film_grain=false
face_swap=false
hires_fix=false
backend_version=1
prompt_expansion=undefined
ar=1:1
scheduler=euler_a
color_grading=
use_lpw=false
w=
h=

POST /tunes/:id/prompts

# Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
curl -X POST -H "Authorization: Bearer $API_KEY" https://api.astria.ai/tunes/690204/prompts \
-F prompt[text]=very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>" \
-F prompt[negative_prompt]="lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts" \
-F prompt[callback]="https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1"
const fetch = require('node-fetch');
const FormData = require('form-data');

// Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
const API_URL = 'https://api.astria.ai/tunes/690204/prompts';
const API_KEY = 'YOUR_API_KEY'; // Replace with your actual API key
const headers = { Authorization: `Bearer ${API_KEY}` }

const form = new FormData();
form.append('prompt[text]', 'very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>');
form.append('prompt[negative_prompt]', 'lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts');
form.append('prompt[callback]', 'https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1');

fetch(API_URL, {
method: 'POST',
headers: headers,
body: form
}).then(response => response.json())


import requests

# Note the hard-coded 690204 which is the tune_id of Realistic Vision v5.1 from the gallery
API_URL = 'https://api.astria.ai/tunes/690204/prompts'
API_KEY = 'YOUR_API_KEY' # Replace with your actual API key

headers = {
'Authorization': f'Bearer {API_KEY}'
}

data = {
'prompt[text]': 'very detailed, masterpiece, intricate details, UHD, 8K --only_upscale <lora:add_detail:1>',
'prompt[negative_prompt]': 'lowres, medium quality, lack of details, bad quality, worst quality, blur, blurry, pixelated, jpeg artifacts',
'prompt[callback]': 'https://optional-callback-url.com/to-your-service-when-ready?prompt_id=1'
}
files = []
files.append((f"tune[prompts_attributes][{i}][input_image]", load_image(prompt['input_image'])))


response = requests.post(API_URL, headers=headers, data=data)
- + \ No newline at end of file diff --git a/docs/use-cases/video-generation/index.html b/docs/use-cases/video-generation/index.html index c5782025..91bba933 100644 --- a/docs/use-cases/video-generation/index.html +++ b/docs/use-cases/video-generation/index.html @@ -7,7 +7,7 @@ - + @@ -15,7 +15,7 @@

Video Generation

To generate video use the regular prompt text box, and enter the frame number followed by a colon and the prompt to activate video generation frame number: prompt Don’t forget to use your model’s token. For example:

  0: portrait of ohwx woman with eyes closed
25: portrait of ohwx woman with eyes opened
50: portrait of ohwx woman smiling

Notice that the last prompt marks the end of the video generation and will not be rendered. When not specified in the prompt, our default camera movement is:

  translation_z=0:(-0.5)
rotation_3d_x=0:(2*sin(3.14*t/100)/80)
rotation_3d_y=0:(2*sin(3.14*t/100)/40)
rotation_3d_z=0:(2*sin(3.14*t/50)/40)

The camera will slowly pull back and wiggle-rotate slightly. You can always adjust the camera movement by adding parameters at the start of the prompt. For example:

  translation_x=0:(-2)
translation_y=0:(1)
translation_z=0:(0.5)
rotation_3d_x=0:(0)
rotation_3d_y=0:(1.5)
rotation_3d_z=0:(0)
0: portrait of ohwx woman with eyes closed
25: portrait of ohwx woman with eyes opened
50: portrait of ohwx woman smiling

The X-axis is a left/right translation; a positive translation shifts the camera to the right.

The Y-axis is an up/down translation; a positive translation shifts the camera upward.

The Z-axis is a forward/backward translation; a positive translation shifts the camera forward.

Parameters

Here is a partial list of parameters you can use in the prompt line to achieve certain control and effects:

strength_schedule=0:(0.50) How “loose” is the image generation from the previous frame. Lower numbers increase the probability of realizing the next prompt, but decrease the probability of temporal coherence.

seed=1 A starting point for an outcome (-1=random starting point)

diffusion_cadence=2 Blending of frames in the sequence

Check out the video gallery for inspiration. You can always copy/paste prompts to your tune. Don’t forget to change the token accordingly.

The video module is based on the Deforum Stable Diffusion notebook, and use the same parameters.

- + \ No newline at end of file diff --git a/index.html b/index.html index 6c82ed64..c82d1275 100644 --- a/index.html +++ b/index.html @@ -7,13 +7,13 @@ - +

Astria documentation

Fine-tuning and high quality image generation

- + \ No newline at end of file diff --git a/markdown-page/index.html b/markdown-page/index.html index 17ff1c09..f78ccabd 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -7,13 +7,13 @@ - +

Markdown page example

You don't need React to write simple standalone pages.

- + \ No newline at end of file