[{"data":1,"prerenderedAt":858},["ShallowReactive",2],{"docs-navigation":3,"docs:\u002Fdocs\u002Fconcepts\u002Fprocessing":235,"docs-surround:\u002Fdocs\u002Fconcepts\u002Fprocessing":853},[4],{"title":5,"path":6,"stem":7,"children":8},"Docs","\u002Fdocs","docs",[9,13,37,55,70,128,146,191,217],{"title":10,"path":6,"stem":11,"icon":12},"Hubstruct documentation","docs\u002Findex","book-open",{"title":14,"icon":15,"path":16,"stem":17,"children":18,"page":36},"Getting started","rocket","\u002Fdocs\u002Fgetting-started","docs\u002F1.getting-started",[19,24,28,32],{"title":20,"path":21,"stem":22,"icon":23},"Introduction","\u002Fdocs\u002Fgetting-started\u002Fintroduction","docs\u002F1.getting-started\u002F1.introduction",null,{"title":25,"path":26,"stem":27,"icon":23},"Requirements","\u002Fdocs\u002Fgetting-started\u002Frequirements","docs\u002F1.getting-started\u002F2.requirements",{"title":29,"path":30,"stem":31,"icon":23},"Quick start","\u002Fdocs\u002Fgetting-started\u002Fquick-start","docs\u002F1.getting-started\u002F3.quick-start",{"title":33,"path":34,"stem":35,"icon":23},"First steps","\u002Fdocs\u002Fgetting-started\u002Ffirst-steps","docs\u002F1.getting-started\u002F4.first-steps",false,{"title":38,"icon":39,"path":40,"stem":41,"children":42,"page":36},"Concepts","lightbulb","\u002Fdocs\u002Fconcepts","docs\u002F2.concepts",[43,47,51],{"title":44,"path":45,"stem":46,"icon":23},"How it works","\u002Fdocs\u002Fconcepts\u002Fhow-it-works","docs\u002F2.concepts\u002F1.how-it-works",{"title":48,"path":49,"stem":50,"icon":23},"Processing steps","\u002Fdocs\u002Fconcepts\u002Fprocessing","docs\u002F2.concepts\u002F2.processing",{"title":52,"path":53,"stem":54,"icon":23},"Media","\u002Fdocs\u002Fconcepts\u002Fmedia","docs\u002F2.concepts\u002F3.media",{"title":56,"path":57,"stem":58,"children":59,"icon":69},"Libraries","\u002Fdocs\u002Flibraries","docs\u002F3.libraries\u002F1.index",[60,61,65],{"title":56,"path":57,"stem":58,"icon":23},{"title":62,"path":63,"stem":64,"icon":23},"Storage","\u002Fdocs\u002Flibraries\u002Fs3","docs\u002F3.libraries\u002F3.s3",{"title":66,"path":67,"stem":68,"icon":23},"Uploading","\u002Fdocs\u002Flibraries\u002Fuploading","docs\u002F3.libraries\u002F4.uploading","layer-group",{"title":71,"icon":72,"path":73,"stem":74,"children":75,"page":36},"Features","wand-magic-sparkles","\u002Fdocs\u002Ffeatures","docs\u002F4.features",[76,80,84,88,92,96,100,104,108,112,116,120,124],{"title":77,"path":78,"stem":79,"icon":23},"Browsing","\u002Fdocs\u002Ffeatures\u002Fbrowsing","docs\u002F4.features\u002F01.browsing",{"title":81,"path":82,"stem":83,"icon":23},"Search","\u002Fdocs\u002Ffeatures\u002Fsearch","docs\u002F4.features\u002F02.search",{"title":85,"path":86,"stem":87,"icon":23},"Tags","\u002Fdocs\u002Ffeatures\u002Ftags","docs\u002F4.features\u002F03.tags",{"title":89,"path":90,"stem":91,"icon":23},"Albums","\u002Fdocs\u002Ffeatures\u002Falbums","docs\u002F4.features\u002F04.albums",{"title":93,"path":94,"stem":95,"icon":23},"People and faces","\u002Fdocs\u002Ffeatures\u002Fpeople","docs\u002F4.features\u002F05.people",{"title":97,"path":98,"stem":99,"icon":23},"Groups","\u002Fdocs\u002Ffeatures\u002Fgroups","docs\u002F4.features\u002F06.groups",{"title":101,"path":102,"stem":103,"icon":23},"Duplicates and stacks","\u002Fdocs\u002Ffeatures\u002Fduplicates-and-stacks","docs\u002F4.features\u002F07.duplicates-and-stacks",{"title":105,"path":106,"stem":107,"icon":23},"NSFW","\u002Fdocs\u002Ffeatures\u002Fnsfw","docs\u002F4.features\u002F08.nsfw",{"title":109,"path":110,"stem":111,"icon":23},"Trash","\u002Fdocs\u002Ffeatures\u002Ftrash","docs\u002F4.features\u002F09.trash",{"title":113,"path":114,"stem":115,"icon":23},"Home and the dashboard","\u002Fdocs\u002Ffeatures\u002Fhome-and-dashboard","docs\u002F4.features\u002F10.home-and-dashboard",{"title":117,"path":118,"stem":119,"icon":23},"Live updates and offline","\u002Fdocs\u002Ffeatures\u002Flive-updates","docs\u002F4.features\u002F11.live-updates",{"title":121,"path":122,"stem":123,"icon":23},"Appearance and the app","\u002Fdocs\u002Ffeatures\u002Fappearance","docs\u002F4.features\u002F12.appearance",{"title":125,"path":126,"stem":127,"icon":23},"Places","\u002Fdocs\u002Ffeatures\u002Fplaces","docs\u002F4.features\u002F13.places",{"title":129,"icon":130,"path":131,"stem":132,"children":133,"page":36},"Administration","sliders","\u002Fdocs\u002Fadministration","docs\u002F5.administration",[134,138,142],{"title":135,"path":136,"stem":137,"icon":23},"Users and sign-in","\u002Fdocs\u002Fadministration\u002Fusers-and-sign-in","docs\u002F5.administration\u002F1.users-and-sign-in",{"title":139,"path":140,"stem":141,"icon":23},"API keys","\u002Fdocs\u002Fadministration\u002Fapi-keys","docs\u002F5.administration\u002F2.api-keys",{"title":143,"path":144,"stem":145,"icon":23},"Processing settings","\u002Fdocs\u002Fadministration\u002Fprocessing-settings","docs\u002F5.administration\u002F3.processing-settings",{"title":147,"icon":148,"path":149,"stem":150,"children":151,"page":36},"Self-hosting","server","\u002Fdocs\u002Fself-hosting","docs\u002F6.self-hosting",[152,156,160,164,167,171,175,179,183,187],{"title":153,"path":154,"stem":155,"icon":23},"Architecture","\u002Fdocs\u002Fself-hosting\u002Farchitecture","docs\u002F6.self-hosting\u002F1.architecture",{"title":157,"path":158,"stem":159,"icon":23},"Telemetry","\u002Fdocs\u002Fself-hosting\u002Ftelemetry","docs\u002F6.self-hosting\u002F10.telemetry",{"title":161,"path":162,"stem":163,"icon":23},"Sharing one GPU","\u002Fdocs\u002Fself-hosting\u002Fgpu","docs\u002F6.self-hosting\u002F2.gpu",{"title":62,"path":165,"stem":166,"icon":23},"\u002Fdocs\u002Fself-hosting\u002Fstorage","docs\u002F6.self-hosting\u002F3.storage",{"title":168,"path":169,"stem":170,"icon":23},"Backups","\u002Fdocs\u002Fself-hosting\u002Fbackups","docs\u002F6.self-hosting\u002F4.backups",{"title":172,"path":173,"stem":174,"icon":23},"Updating","\u002Fdocs\u002Fself-hosting\u002Fupdating","docs\u002F6.self-hosting\u002F5.updating",{"title":176,"path":177,"stem":178,"icon":23},"Scaling","\u002Fdocs\u002Fself-hosting\u002Fscaling","docs\u002F6.self-hosting\u002F6.scaling",{"title":180,"path":181,"stem":182,"icon":23},"HTTPS and a domain","\u002Fdocs\u002Fself-hosting\u002Freverse-proxy","docs\u002F6.self-hosting\u002F7.reverse-proxy",{"title":184,"path":185,"stem":186,"icon":23},"Troubleshooting","\u002Fdocs\u002Fself-hosting\u002Ftroubleshooting","docs\u002F6.self-hosting\u002F8.troubleshooting",{"title":188,"path":189,"stem":190,"icon":23},"The config file","\u002Fdocs\u002Fself-hosting\u002Fconfig-file","docs\u002F6.self-hosting\u002F9.config-file",{"title":192,"icon":193,"path":194,"stem":195,"children":196,"page":36},"Reference","book","\u002Fdocs\u002Freference","docs\u002F7.reference",[197,201,205,209,213],{"title":198,"path":199,"stem":200,"icon":23},"Environment variables","\u002Fdocs\u002Freference\u002Fenvironment","docs\u002F7.reference\u002F1.environment",{"title":202,"path":203,"stem":204,"icon":23},"Worker roles","\u002Fdocs\u002Freference\u002Fworker-roles","docs\u002F7.reference\u002F2.worker-roles",{"title":206,"path":207,"stem":208,"icon":23},"API","\u002Fdocs\u002Freference\u002Fapi","docs\u002F7.reference\u002F3.api",{"title":210,"path":211,"stem":212,"icon":23},"Keyboard shortcuts","\u002Fdocs\u002Freference\u002Fkeyboard-shortcuts","docs\u002F7.reference\u002F4.keyboard-shortcuts",{"title":214,"path":215,"stem":216,"icon":23},"Models","\u002Fdocs\u002Freference\u002Fmodels","docs\u002F7.reference\u002F5.models",{"title":218,"icon":219,"path":220,"stem":221,"children":222,"page":36},"Hubstruct Cloud","cloud","\u002Fdocs\u002Fcloud","docs\u002F8.cloud",[223,227,231],{"title":224,"path":225,"stem":226,"icon":23},"Getting started with the cloud","\u002Fdocs\u002Fcloud\u002Fgetting-started","docs\u002F8.cloud\u002F1.getting-started",{"title":228,"path":229,"stem":230,"icon":23},"Plans and billing","\u002Fdocs\u002Fcloud\u002Fplans-and-billing","docs\u002F8.cloud\u002F2.plans-and-billing",{"title":232,"path":233,"stem":234,"icon":23},"Moving between cloud and self-hosted","\u002Fdocs\u002Fcloud\u002Fmoving","docs\u002F8.cloud\u002F3.moving",{"id":236,"title":48,"body":237,"description":847,"extension":848,"eyebrow":38,"icon":23,"meta":849,"navigation":850,"path":49,"seo":851,"stem":50,"__hash__":852},"docs\u002Fdocs\u002F2.concepts\u002F2.processing.md",{"type":238,"value":239,"toc":822},"minimark",[240,253,258,508,513,522,526,528,535,537,551,553,568,570,590,592,598,600,611,613,626,628,631,633,645,647,655,657,660,662,672,676,679,753,776,779,792,796,815],[241,242,243,244,248,249,252],"p",{},"Every media goes through a set of ",[245,246,247],"strong",{},"steps",". Each step does one thing, such as making thumbnails, scoring smart tags or finding faces, and records its result on the media. Steps run by themselves as soon as what they need is ready; there's no queue to manage. ",[250,251,44],"a",{"href":45}," explains why.",[254,255,257],"h2",{"id":256},"the-steps","The steps",[259,260,261,283],"table",{},[262,263,264],"thead",{},[265,266,267,271,274,277,280],"tr",{},[268,269,270],"th",{},"Step",[268,272,273],{},"Shown as",[268,275,276],{},"What it does",[268,278,279],{},"Needs",[268,281,282],{},"Runs on",[284,285,286,306,325,342,360,383,401,418,436,454,472,491],"tbody",{},[265,287,288,295,298,301,303],{},[289,290,291],"td",{},[292,293,294],"code",{},"metadata",[289,296,297],{},"File details",[289,299,300],{},"Size, dimensions, length, date taken, ThumbHash",[289,302],{},[289,304,305],{},"CPU",[265,307,308,313,316,319,323],{},[289,309,310],{},[292,311,312],{},"renditions",[289,314,315],{},"Thumbnails",[289,317,318],{},"Thumbnail and preview; a video's from a poster frame",[289,320,321],{},[292,322,294],{},[289,324,305],{},[265,326,327,332,335,338,340],{},[289,328,329],{},[292,330,331],{},"analysis",[289,333,334],{},"Image analysis",[289,336,337],{},"Dominant and average colors, sharpness and exposure, perceptual hash",[289,339],{},[289,341,305],{},[265,343,344,349,352,355,357],{},[289,345,346],{},[292,347,348],{},"visual",[289,350,351],{},"Image embedding",[289,353,354],{},"An embedding of the pixels alone",[289,356],{},[289,358,359],{},"EmbeddingGemma",[265,361,362,367,370,373,380],{},[289,363,364],{},[292,365,366],{},"duplicates",[289,368,369],{},"Duplicate check",[289,371,372],{},"Compares it with the rest of the library",[289,374,375,377,378],{},[292,376,331],{},", ",[292,379,348],{},[289,381,382],{},"Database",[265,384,385,390,393,396,398],{},[289,386,387],{},[292,388,389],{},"tagging",[289,391,392],{},"Tagging",[289,394,395],{},"Scores every smart tag",[289,397],{},[289,399,400],{},"d1",[265,402,403,408,411,414,416],{},[289,404,405],{},[292,406,407],{},"nsfw",[289,409,410],{},"NSFW check",[289,412,413],{},"One score: is it NSFW?",[289,415],{},[289,417,400],{},[265,419,420,425,428,431,433],{},[289,421,422],{},[292,423,424],{},"text",[289,426,427],{},"Text in image",[289,429,430],{},"Finds text, then reads it",[289,432],{},[289,434,435],{},"vision, then Gemma",[265,437,438,443,446,449,451],{},[289,439,440],{},[292,441,442],{},"faces",[289,444,445],{},"Faces",[289,447,448],{},"Finds faces, real and drawn, and embeds each",[289,450],{},[289,452,453],{},"vision",[265,455,456,461,464,467,469],{},[289,457,458],{},[292,459,460],{},"description",[289,462,463],{},"Description",[289,465,466],{},"Describes what's in it",[289,468],{},[289,470,471],{},"Gemma",[265,473,474,479,482,485,489],{},[289,475,476],{},[292,477,478],{},"title",[289,480,481],{},"Title",[289,483,484],{},"A short title, from the description",[289,486,487],{},[292,488,460],{},[289,490,471],{},[265,492,493,498,501,504,506],{},[289,494,495],{},[292,496,497],{},"embedding",[289,499,500],{},"Embedding",[289,502,503],{},"One vector of all its text and its picture",[289,505],{},[289,507,359],{},[509,510,512],"h3",{"id":511},"the-pictures-first","The pictures first",[241,514,515,516,518,519,521],{},"Every other step waits for ",[292,517,294],{}," and ",[292,520,312],{},", since they all work from the thumbnail and preview.",[254,523,525],{"id":524},"each-step-in-detail","Each step in detail",[509,527,294],{"id":294},[241,529,530,531,534],{},"Works out what the file is: its file size, its width and height, its length for a video, the date it was taken (read from EXIF, kept as the wall-clock time the camera wrote), and a ",[245,532,533],{},"ThumbHash",", a tiny encoded blur of the picture that the app shows while the thumbnail loads. For a still, it reads the pixels with sharp; for a video, ffprobe. No model. Runs once.",[509,536,312],{"id":312},[241,538,539,540,543,544,547,548,550],{},"Makes a ",[245,541,542],{},"thumbnail"," (sized for tiles and the grid) and a ",[245,545,546],{},"preview"," (sized for the media page and the models), as WebP, and stores them beside the original. A video's are made from a frame a moment in, past any fade from black; a clip shorter than that uses its first frame. If ",[292,549,294],{}," couldn't make a ThumbHash (a video), this step makes one from the poster frame, so every media has its placeholder. No model. Runs once.",[509,552,331],{"id":331},[241,554,555,556,559,560,563,564,567],{},"Measures the picture: its ",[245,557,558],{},"dominant and average colors"," (used for color sorting and the tint the app takes on), how ",[245,561,562],{},"sharp"," and well exposed it is (a stack's best shot goes first), and a ",[245,565,566],{},"perceptual hash",", a 64-bit fingerprint of its broad shapes used to find copies. A GIF's or video's colors come from its frames together; its hash and quality from its first frame. No model. Runs once.",[509,569,348],{"id":348},[241,571,572,573,576,577,585,586,589],{},"An embedding of the ",[245,574,575],{},"pixels alone",": a list of numbers that places the picture in the same space as text, so a picture can be compared with words or with another picture. A GIF or video is embedded as a clip, watched through. Used by ",[250,578,579,580,584],{"href":82},"search's ",[581,582,583],"em",{},"look"," mode",", duplicates, and ",[581,587,588],{},"similar media",". Runs once.",[509,591,366],{"id":366},[241,593,594,595,597],{},"Compares the media's perceptual hash and image embedding with everyone else's in the library, then checks candidates against the actual pixels to rule out pictures that only share a layout. See ",[250,596,101],{"href":102},". No model. Runs once.",[509,599,389],{"id":389},[241,601,602,603,606,607,610],{},"Asks the classifier, for each ",[250,604,605],{"href":86},"smart tag"," in the library, ",[581,608,609],{},"does this tag fit this picture?"," and keeps its confidence. A tag whose confidence reaches its threshold is applied, unless you've locked it. A GIF or video is judged as one: it goes in as a short video, which the model watches through. Only tags still missing a score are asked about, so adding a smart tag scores every media for that tag alone. A retry re-scores everything.",[509,612,407],{"id":407},[241,614,615,616,619,620,623,624,589],{},"One more classifier question: ",[581,617,618],{},"is this NSFW?"," Only the score is stored. Whether the media counts as NSFW follows from the score and the threshold in ",[245,621,622],{},"Settings → NSFW",", or your own answer, so moving the threshold re-labels everything without running anything again. See ",[250,625,105],{"href":106},[509,627,424],{"id":424},[241,629,630],{},"Finds and reads the text in a picture. The vision service's detector first looks for text, from the preview, at a resolution small comic lettering needs. Only when it finds some does Gemma read it. (The detector alone garbles stylized lettering; Gemma alone would be asked to read every picture.) In a still, each piece of text is also read where it is (the vision service's recogniser), so it can be selected on the picture. The text and where it is are kept, and searched with everything else. Runs once.",[509,632,442],{"id":442},[241,634,635,636,518,639,642,643,589],{},"Finds the faces in a picture, both ",[245,637,638],{},"real",[245,640,641],{},"drawn"," (anime, comics, illustration), and makes an embedding of each: ArcFace for real faces, CCIP for drawn ones. Faces too blurry to recognize are left out. A clip's frames show the same faces over and over, so each face is kept once, at its clearest. Each face also gets its own small picture for the People pages. The worker's people pass then places the faces with people. See ",[250,644,93],{"href":94},[509,646,460],{"id":460},[241,648,649,650,654],{},"Gemma looks at the picture and writes a description of what's in it. Any tags already there are given to it as hints, but it doesn't wait for them and doesn't run again when they change. You can ",[250,651,653],{"href":652},"\u002Fdocs\u002Fconcepts\u002Fmedia#titles-and-descriptions","write your own",", which takes precedence. Runs once.",[509,656,478],{"id":478},[241,658,659],{},"A short title written from the description. Runs again if the description changes.",[509,661,497],{"id":497},[241,663,664,665,668,669,671],{},"The media's ",[245,666,667],{},"document embedding",": all of its text and its picture as one vector. Your title leads (it's what you call it); the AI title, both descriptions, the text in the picture and its tags with their confidence follow. Search, ",[581,670,588],{}," and album rules all compare these. Runs again whenever any of that text, or the tags, change.",[254,673,675],{"id":674},"states","States",[241,677,678],{},"The dashboard's work queue counts every media in each step by state:",[259,680,681,691],{},[262,682,683],{},[265,684,685,688],{},[268,686,687],{},"State",[268,689,690],{},"Means",[284,692,693,703,713,723,733,743],{},[265,694,695,700],{},[289,696,697],{},[245,698,699],{},"Done",[289,701,702],{},"It ran, and its result is stored.",[265,704,705,710],{},[289,706,707],{},[245,708,709],{},"Running",[289,711,712],{},"A worker is on it now.",[265,714,715,720],{},[289,716,717],{},[245,718,719],{},"Due",[289,721,722],{},"It will be picked up as soon as a worker is free, or as soon as its model is reachable.",[265,724,725,730],{},[289,726,727],{},[245,728,729],{},"Retrying",[289,731,732],{},"It failed, and will be tried again once a short back-off has passed.",[265,734,735,740],{},[289,736,737],{},[245,738,739],{},"Waiting",[289,741,742],{},"It needs an earlier step to finish first.",[265,744,745,750],{},[289,746,747],{},[245,748,749],{},"Failed",[289,751,752],{},"It failed three times in a row, and won't be tried again until you retry it.",[241,754,755,756,759,760,763,764,767,768,771,772,775],{},"The work queue also lists what each step will do next, and why: it ",[581,757,758],{},"never ran",", a ",[581,761,762],{},"re-run was requested",", its ",[581,765,766],{},"inputs changed"," (an embedding whose text was edited), or it's a ",[581,769,770],{},"retry",". On a media's page, the ",[245,773,774],{},"Processing"," card shows each step's state for that media, when it last ran, how long it took and which model ran it.",[254,777,729],{"id":778},"retrying",[241,780,781,782,785,786,788,789,791],{},"On a media's page, ",[245,783,784],{},"Retry"," runs a step again for that media. On the Media page, select several and use ",[245,787,784],{}," in the selection bar to choose which steps to run again for all of them. A retry of ",[292,790,389],{}," re-scores every smart tag, not only the missing ones.",[254,793,795],{"id":794},"how-much-runs-at-once","How much runs at once",[241,797,798,799,802,803,806,807,810,811,814],{},"Each step has a ",[245,800,801],{},"pool"," of workers, sized in ",[245,804,805],{},"Settings → Processing",": from 1 to 10, 3 by default. You can also ",[245,808,809],{},"pause"," a step there, or with its Running\u002FPaused switch on the dashboard. A paused step finishes what it's doing and takes nothing new. The pools only exist while their model is reachable; with ",[292,812,813],{},"models"," stopped, its steps' pools scale to zero until it's back.",[241,816,817,818,821],{},"Each step's run has a time limit (20 minutes by default), and each call to a model has its own, shorter one, so a stuck model can't hold a worker forever. See ",[250,819,198],{"href":820},"\u002Fdocs\u002Freference\u002Fenvironment#timeouts",".",{"title":823,"searchDepth":824,"depth":824,"links":825},"",3,[826,830,844,845,846],{"id":256,"depth":827,"text":257,"children":828},2,[829],{"id":511,"depth":824,"text":512},{"id":524,"depth":827,"text":525,"children":831},[832,833,834,835,836,837,838,839,840,841,842,843],{"id":294,"depth":824,"text":294},{"id":312,"depth":824,"text":312},{"id":331,"depth":824,"text":331},{"id":348,"depth":824,"text":348},{"id":366,"depth":824,"text":366},{"id":389,"depth":824,"text":389},{"id":407,"depth":824,"text":407},{"id":424,"depth":824,"text":424},{"id":442,"depth":824,"text":442},{"id":460,"depth":824,"text":460},{"id":478,"depth":824,"text":478},{"id":497,"depth":824,"text":497},{"id":674,"depth":827,"text":675},{"id":778,"depth":827,"text":729},{"id":794,"depth":827,"text":795},"Every step Hubstruct runs on a photo or video, in order, with what it needs, what it makes, and when it runs again.","md",{},true,{"title":48,"description":847},"E3WD8c5nFF-Ebqrpp15gnOj3PfacdOKgovojjbTd4mM",[854,856],{"title":44,"path":45,"stem":46,"description":855,"children":-1},"The services that make up Hubstruct, what each one does, and how a photo travels through them.",{"title":52,"path":53,"stem":54,"description":857,"children":-1},"What Hubstruct keeps about each photo, GIF and video, and how its media page shows it.",1795744072805]