PageSourceSearch

https://www.archsynth.com/_nuxt/useArchsynthAi.YCUSRFTm.js

js archsynth.com collected 2026-10-04 18:33:13 UTC 13,766 bytes, 1 lines download raw bytes

1import{g}from"./getImageDimensions.DV6NFXLr.js";import{Z as i,A as Z}from"./entry.C1VVBvDx.js";import{n as z}from"./index.browser.vcSNLBTf.js";import{s as d}from"./index.CW_BmfyG.js";d.fal.config({credentials:"de5dfd96-e5b5-4a5a-82b9-129c14d6cdb9:b05639fddce538bb9ec03ebc5c787a3d"});function Y(){async function y(e,o){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/upscale",{scale:o,input_prema_link:e},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data.output}catch(t){throw console.error(t),t}}async function m(e,o){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/v1/upscale2",{scale:o,inputUrl:e},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}catch(t){throw console.error(t),t}}async function f(e,o,t,a="walls // floor",n="windows // outlet // door // corner"){try{const s={eta:0,prompt:`A beautifully furnished modern ${t} with `+o,max_width:1082,scheduler:"DDIM",guess_mode:!1,int_kwargs:"",max_height:1082,num_outputs:1,guidance_scale:7,ip_adapter_ckpt:"ip-adapter_sd15.bin",negative_prompt:"Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",img2img_strength:.5,inpainting_image:e,ip_adapter_weight:1,sorted_controlnets:"lineart, tile, inpainting",inpainting_strength:1,num_inference_steps:20,disable_safety_check:!1,film_grain_lora_weight:0,positive_auto_mask_text:a,negative_auto_mask_text:n,tile_conditioning_scale:1,add_more_detail_lora_scale:.5,detail_tweaker_lora_weight:0,lineart_conditioning_scale:1,scribble_conditioning_scale:1,epi_noise_offset_lora_weight:0,brightness_conditioning_scale:1,inpainting_conditioning_scale:1,color_temprature_slider_lora_weight:0};return(await u(s)).data[0]}catch(s){throw console.error(s),s}}async function w(e,o,t,a=""){try{const{height:n,width:s}=await g(e),r=await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/sdxl",{prompt:t,image:e,mask:o,width:s,height:n,negative_prompt:a},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}});return console.log(r.data),r.data}catch(n){throw console.error(n),n}}async function b(e,o,t,a=""){try{const n=await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/controlnetDepth",{prompt:o,guidance:t,megapixels:"1",num_outputs:1,control_image:e,output_format:"webp",output_quality:80,num_inference_steps:28},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}});return console.log(n.data),n.data[0]}catch(n){throw console.error(n),n}}async function A(e,o,t,a){try{return(await _({prompt:e,width:a,height:t,negative_prompt:o,disable_safety_checker:!1})).data}catch(n){throw console.error(n),n}}async function x(e,o,t,a,n,s=.7){try{return(await u({eta:0,prompt:e,negative_prompt:o,scheduler:"K_EULER_ANCESTRAL",guess_mode:!1,max_height:t,max_width:a,num_outputs:1,guidance_scale:7,add_more_detail_lora_scale:.5,ip_adapter_image:n,ip_adapter_weight:s,disable_safety_check:!1})).data}catch(r){throw console.error(r),r}}async function F(e,o,t){try{return(await u({eta:0,prompt:"beautiful interior lighting",negative_prompt:"",scheduler:"K_EULER_ANCESTRAL",guess_mode:!1,max_height:1082,max_width:1082,num_outputs:1,guidance_scale:7,add_more_detail_lora_scale:.5,brightness_image:e,brightness_conditioning_scale:o,disable_safety_check:!1})).data}catch(a){throw console.error(a),a}}async function P(e,o,t){try{const{height:a,width:n}=await g(o);return(await _({prompt:e,image:o,width:n,height:a,prompt_strength:t})).data}catch(a){throw console.log(a),a}}async function v(e,o,t,a){return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/sdxl-lightning",{prompt:e,width:a,height:t,negative_prompt:o,disable_safety_checker:!1},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}async function C(e,o){return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/flux",{prompt:e,num_outputs:1,aspect_ratio:o,output_format:"png",output_quality:90,disable_safety_checker:!1},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}async function I(e,o){return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/flux-dev",{prompt:e,num_outputs:1,aspect_ratio:o,output_format:"png",output_quality:90,disable_safety_checker:!1},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}async function j(e,o,t,a){return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/mid",{prompt:e,width:a,height:t,negative_prompt:o,disable_safety_checker:!1},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}async function k(e,o,t,a){return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/360",{model:"dev",prompt:`${e} 360 view in the style of TOK`,lora_scale:1,num_outputs:1,aspect_ratio:"3:2",output_format:"png",guidance_scale:3.5,output_quality:80,prompt_strength:.8,extra_lora_scale:.8,num_inference_steps:50},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}async function D(e,o="landscape_4_3",t){try{const a=await d.fal.subscribe("fal-ai/z-image/turbo",{input:{prompt:e,image_size:o,num_inference_steps:8,num_images:1,enable_safety_checker:!1,output_format:"png",acceleration:"none"},logs:!0,onQueueUpdate:n=>{if(n.status==="IN_PROGRESS"&&t){const s=n.logs[n.logs.length-1];s&&t(s.message)}}});if(a.data.images&&a.data.images.length>0)return a.data.images[0].url;throw new Error("No images generated")}catch(a){throw console.error("Error in generateFromZImage:",a),a}}async function R(e,o,t="",a,n,s=!0,r=1337){try{const c=await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/enhance",{image:e,creativity:a,resemblance:n,downscaling:s,seed:r,prompt:o+"masterpiece, best quality, highres, <lora:more_details:0.5> <lora:SDXLrender_v2.0:1>",negative_prompt:t+"(worst quality, low quality, normal quality:2) JuggernautNegative-neg"},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}});if(console.log(c.data),await T(c.data[0])=="nsfw"){alert("NSFW content detected please try again with a different image");return}return c.data}catch(c){console.log(c)}}async function T(e){return await h("falcons-ai/nsfw_image_detection",{image:e})}async function K(e,o){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/gpt/vision",{prompt:o,image_url:e},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data.response.message.content}catch(t){throw console.log(t),t}}async function X(e,o){try{const t=await i.post("http://127.0.0.1:5001/arch-synth/us-central1/myCloudFunction/gpt/edit",{prompt:o,image_url:e},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}});return console.log(t.data),t.data.data[0].url}catch(t){throw console.log(t),t}}async function E(e,o){try{const t={eta:0,prompt:"A beautifully landscape with "+o,max_width:512,scheduler:"DDIM",guess_mode:!1,int_kwargs:"",max_height:512,num_outputs:1,guidance_scale:7,ip_adapter_ckpt:"ip-adapter_sd15.bin",negative_prompt:"Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",img2img_strength:.5,inpainting_image:e,ip_adapter_weight:1,sorted_controlnets:"lineart, tile, inpainting",inpainting_strength:1,num_inference_steps:20,disable_safety_check:!1,film_grain_lora_weight:0,positive_auto_mask_text:"ground // landscape // floor // grass",negative_auto_mask_text:"house // sky // driveway",tile_conditioning_scale:1,add_more_detail_lora_scale:.5,detail_tweaker_lora_weight:0,lineart_conditioning_scale:1,scribble_conditioning_scale:1,epi_noise_offset_lora_weight:0,brightness_conditioning_scale:1,inpainting_conditioning_scale:1,color_temprature_slider_lora_weight:0};return(await u(t)).data[0]}catch(t){throw console.error(t),t}}async function U(e,o,t,a){try{let n={eta:0,prompt:o,max_width:512,scheduler:"DDIM",guess_mode:!1,int_kwargs:"",max_height:512,num_outputs:1,guidance_scale:7,ip_adapter_ckpt:"ip-adapter_sd15.bin",negative_prompt:"Longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality",img2img_strength:.5,inpainting_image:e,ip_adapter_weight:1,sorted_controlnets:"lineart, tile, inpainting",inpainting_strength:1,num_inference_steps:20,disable_safety_check:!1,film_grain_lora_weight:0,positive_auto_mask_text:t,negative_auto_mask_text:"",tile_conditioning_scale:1,add_more_detail_lora_scale:.5,detail_tweaker_lora_weight:0,lineart_conditioning_scale:1,scribble_conditioning_scale:1,epi_noise_offset_lora_weight:0,brightness_conditioning_scale:1,inpainting_conditioning_scale:1,color_temprature_slider_lora_weight:0};return a&&(n={...n,ip_adapter_image:a}),(await u(n)).data[0]}catch(n){throw console.error(n),n}}async function q(e,o,t){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/v1/fast3D",{imageUrl:e,remesh:o,vertex_count:t},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data.base64Data}catch(a){throw console.log(a),a}}async function $(e,o,t,a){try{const s=(await i.post("http://127.0.0.1:5001/arch-synth/us-central1/myCloudFunction/v1/search-and-replace",{imageUrl:e,prompt:o,search_prompt:t,output_format:a},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data,r=await G(s.base64Data,"fda","test");return console.log(r),r}catch(n){throw console.log(n),n}}async function B(e,o,t="match_input_image"){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/editflux",{prompt:o,input_image:e,aspect_ratio:t,safety_tolerance:6},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data}catch(a){throw console.error("Error in callEditFlux:",a),a}}async function u(e){return await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/ip2",e,{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})}function h(e,o){return new Promise(async(t,a)=>{try{const n=await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/rblank",{model:e,options:o},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}});t(n.data)}catch(n){console.log(n),a(n)}})}async function S(e,o,t){try{return(await d.fal.subscribe(e,{input
1:o,logs:!0,onQueueUpdate:n=>{if(n.status==="IN_PROGRESS"&&t){const s=n.logs[n.logs.length-1];s&&t(s.message)}}})).data}catch(a){throw console.error(`Error calling fal.ai model ${e}:`,a),a}}async function L(e,o,t){try{return(await d.fal.subscribe(e,{input:o,logs:!0,onQueueUpdate:n=>{if(n.status==="IN_PROGRESS"&&t){const s=n.logs[n.logs.length-1];s&&t(s.message)}}})).data.images[0].url}catch(a){throw console.error(`Error calling fal.ai model ${e}:`,a),a}}async function _(e){return await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/sdxl",e,{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})}function N(e,o){const t=atob(e),a=[];for(let n=0;n<t.length;n+=512){const s=t.slice(n,n+512),r=new Array(s.length);for(let c=0;c<s.length;c++)r[c]=s.charCodeAt(c);a.push(new Uint8Array(r))}return new Blob(a,{type:o})}async function G(e,o,t){return new Promise(async(a,n)=>{try{const s=N(e,"image/png");console.log(s);let r=Z();r.uid||(console.log("getting user"),r.getUser());const c=`https://r2worker.archsynth.com/userfiles/${r.uid}/${t}/${o}`,l=`https://r2.archsynth.com/userfiles/${r.uid}/${t}/${o}`;fetch(c,{method:"PUT",body:s,headers:{"X-API-Key":"0jfds784hioslmn","Content-Type":"image/png"}}).then(p=>{if(p.ok)console.log("sucess"),a(l);else throw new Error(`Request failed with status: ${p.status}`)}).catch(p=>{console.error("Error:",p),n(p)})}catch(s){console.error("Error processing Base64:",s),n(s)}})}async function M(e,o,t,a){try{return(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/controlnet",{inputUrl:o,prompt:e,seed:t,strength:a/100},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"}})).data.outputUrl}catch(n){throw console.log(n),n}}async function O(e,o){try{const a=(await i.post("https://us-central1-arch-synth.cloudfunctions.net/myCloudFunction/gpt/image-1",{prompt:o,imageUrls:e},{headers:{"X-API-Key":"9P6cD5j2vF8xR3nA","Content-Type":"application/json"},responseType:"blob"})).data,n=new Blob([a],{type:"image/png"});return await Q(n,"png",z(),"generations")}catch(t){throw console.error(t),t}}function Q(e,o,t,a){return new Promise(async(n,s)=>{const r=`https://r2worker.archsynth.com/userfiles/imageone/${a}/${t}`,c=`https://r2.archsynth.com/userfiles/imageone/${a}/${t}`;fetch(r,{method:"PUT",body:e,headers:{"X-API-Key":"0jfds784hioslmn","Content-Type":o}}).then(l=>{if(l.ok)n(c);else throw alert("error: try different image or compress the image and try again"),new Error(`Request failed with status: ${l.status}`)}).catch(l=>{throw alert("error: try different image or compress the image and try again"),console.error("Error:",l),l})})}return{upscale:y,upscale2:m,virtualStage:f,generativeFill:w,textToImage:A,moodBoardText2Image:x,img2img:P,callLighting:v,clarityEnhance:R,relight:F,askGptVision:K,editImageGpt:X,landscape:E,generateFromMid:j,generateFromFluxSchnell:C,generateFromFluxDev:I,generate360:k,generateFromZImage:D,controlnetDepth:b,imageTo3dModel_v2:q,callControlNet:M,searchAndReplace:$,searchAndReplaceReplicate:U,askImageOne:O,callEditFlux:B,callRBlank:h,callFal:S,callFalImage:L}}export{Y as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.