Dža ko lil

Stable Diffusion with LoRAs · Inpaint

Integriruj

Modelosko id lora/inpaint
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/lora/inpaint?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "stabilityai/stable-diffusion-xl-base-1.0",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Kava mangipen: ≈$0.184 184 API krediti · ≈ ₽19.41 Phir les kate

Lel API klidin
Open model Editime e kipesko Referencaki inputura #diffusion#lora#customization#fine-tuning

Inpainting e kidime Stable Diffusion bazutne modelosa thaj LoRAs, vodime kalo-parno maskasa

Open model · Kip

Tiro prvo rezultato si kate

Ker tele jekh mangipen thaj phir les tire API klidinosa. E rezultatur si kopirime amare arakhipneste, vično vaj 7 dives bilačhes.

Ker jekh mangipen

O kontrolura kerde si katar e schemaske. O kodo thaj e cena menjinen sar tu len menjines.

•trubul

Phen o kipo savo kames te kerel pes, use but detail sar šaj te avel maj lačho rezultato.

•trubul

Base modelo vaś keripe e kipesko, identifikime vaj e URL-esa vaj e HuggingFace ID-esa.

num_images standardno 1

Thaven keci kipo kerel jekh mangipen; bare batchura den buter keripesko vakti.

Lučhe negative_prompt · image · mask · ic_light_model_background_image_url · ic_light_image_url · prediction_type · image_format · unet_name · variant · image_encoder_path · image_encoder_subfolder · image_encoder_weight_name · ic_light_model_url · scheduler · noise_strength · num_inference_steps · guidance_scale · clip_skip · tile_width · tile_height · tile_stride_width · tile_stride_height · eta · seed · prompt_weighting · controlnet_guess_mode · rescale_betas_snr_zero · enable_safety_checker · debug_latents · debug_per_pass_latents · loras · embeddings · controlnets · ip_adapter · timesteps · sigmas
standardno

Negativno prompto savo phenel save detajura na kamen pe o kipo. Šaj te isključil boje, objektura, pejzažo vaj maj cikne detajura thaj kvalitetura, sar mustaći, mutno dikhimos vaj teluni rezolucija.

image_url
Čhiv jekh fajl, vaj

Source kipo URL vaš image-to-image keripe vaj inpainting.

mask_url
Čhiv jekh fajl, vaj

Inpainting mask URL kaj sikavel pe jekh kalo-thaj-parno kipo.

Čhiv jekh fajl, vaj

IC Light kipo-keripasko modelo-kompatibilno backgroundo, dino sar kipo URL.

Čhiv jekh fajl, vaj

Inputo kipo URL vaš keripe le IC Light modelosa.

prediction_type standardno epsilon

Alosar o prediction type vaš kipo-keripe; te na alosaren aver, labarel pes `epsilon`.

image_format standardno png

Fajlo-formato e rezultato kipoqo.

Custom U-Net selekcija baši kiponge keripe; dino vaj lesko HuggingFace ID vaj lesko URL.

HuggingFace modelo variant selekcija; 'fp16' si jekh primer.

Kipo encoder dino sar HTTPS URL vaj Hugging Face ID. Kompatibiliteta pherel le IP-Adapter weightsar: SD1.5 labarel image_encoder_subfolder='models/image_encoder', a h94/IP-Adapter SDXL labarel h94/IP-Adapter thaj image_encoder_subfolder='sdxl_models/image_encoder'. Encodero hin musaj kana ip_adapter si les jekh value.

Subdirectory ande image_encoder_path kaj si le kipo encoder weights.

standardno pytorch_model.bin

Alosar le kipo encoder weights pe nav, te labaren len kipo-keripeste.

IC Light modelo URL labardo kana keren kipo.

Scheduler vaj sampler savo si labarde vaš e kipesko nevešaripen.

standardno 0.5

Kontrolinel keci kipo noise dino pe skala kaj 1.0 si pherdo noise thaj value pas 0 si cikno noise. Kerel pes numa kana si dino image_url.

standardno 30

Kontrolisarel keci keripaski faza kerel Stable Diffusion; majbut faze šaj te anen maj detalno finalno kipo.

standardno 7.5

Zor e promptoske pačajipaski vaś izbor e kiposko, sikavdi sar CFG (Classifier Free Guidance).

standardno 0

Na kerel jekh kotor le kipo-keripestar, te renderinel sigeder; o rezultato si cikno aver.

standardno 4096

Thaven keci baro si sako tile kana keren kipo.

standardno 4096

Thaven keci baro si sako tile kana keren kipo.

standardno 2048

Thaven o phandipe maškar successiv tile positions kana keren kipo.

standardno 2048

Thaven o phandipe maškar successiv tile positions kana keren kipo.

standardno 0

Eta settingo labardo kana keren kipo.

Seed vaš reprodukcia e kipengo ande Stable Diffusion. O kipo šaj te reprodukčarel pes ekzaktno pe sa keripena te mukhes isto o modelesko version, prompto thaj seed.

standardno []

LoRA-ja savenge jekhipen kerel o generime kipo, bi limitosko pe lengero gindo.

standardno []

Embeddingura dino ande o kipo-keripe, te mapinel o prompto tokenura pe embedding weights. Akana, numa jekh embedding hin podpora.

standardno []

Control netura dino te keren pes pe o kipo ande specifikime timesteps ande o keripe, bi limito savo numero den.

standardno []

IP adapterura labarde te keren kipo. Sako entry mangel image_encoder_path.

standardno {"array":[],"method":...

Denoising timestep schedule override, mutually exclusive with sigmas. Bi override — standardno — o scheduler kalkulinkerel timesteps anda num_inference_steps; custom schedule kerel num_inference_steps bizo. Override mangel scheduler support vaš timesteps argumento ande set_timesteps.

standardno {"array":[],"method":...

Denoising sigma schedule override, mutually exclusive with timesteps. Bi override — standardno — o scheduler kalkulinkerel sigmas anda num_inference_steps; custom schedule kerel num_inference_steps bizo. Override mangel scheduler support vaš sigmas argumento ande set_sigmas.

POST /run/lora/inpaint?wait=20 hesab → $0.184
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/lora/inpaint?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "stabilityai/stable-diffusion-xl-base-1.0",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Phandel kava mangipen

Tiro kluč ačhel kadale browsereste: bičhalel pes numa ko Doitong API thaj šuvav pes (localStorage) numa te tiknes Remember. Le jekh API ključ

Palal Stable Diffusion with LoRAs · Inpaint

Editisarel kipeskere kotora e `image_url` thaj kalo-parno `mask_url`, e Stable Diffusion modelosa setime ande `model_name`. `noise_strength` džal 0 dži 1. Podržinel phandlede LoRAs, embeddings, ControlNets, IP adapters thaj varesave schedulerura, e stepsenca katar 1 dži 150. O rezultato si png vaj jpeg.

Parametra

Bičhalav vaj e kanonikano nav vaj e native nav, na duj. Kanonikane nava

NavTip standardnoMuklo Vakeripe
model_nametrubul
Tipstring
Base modelo vaś keripe e kipesko, identifikime vaj e URL-esa vaj e HuggingFace ID-esa.
unet_nameopcionalno
Tipstring | null
Custom U-Net selekcija baši kiponge keripe; dino vaj lesko HuggingFace ID vaj lesko URL.
variantopcionalno
Tipstring | null
HuggingFace modelo variant selekcija; 'fp16' si jekh primer.
prompttrubul
Tipstring
Phen o kipo savo kames te kerel pes, use but detail sar šaj te avel maj lačho rezultato.
negative_promptopcionalno
Tipstring
standardno
Negativno prompto savo phenel save detajura na kamen pe o kipo. Šaj te isključil boje, objektura, pejzažo vaj maj cikne detajura thaj kvalitetura, sar mustaći, mutno dikhimos vaj teluni rezolucija.
prompt_weightingopcionalno
Tipboolean
standardnofalse
Savo kerel o prompt-weighting: true mukhel tele o 77 tokeno limitos vaš embedding averaging thaj kerel weighting syntax.
image_urlopcionalno image
Tipurl · image
Source kipo URL vaš image-to-image keripe vaj inpainting.
mask_urlopcionalno mask
Tipurl · image
Inpainting mask URL kaj sikavel pe jekh kalo-thaj-parno kipo.
noise_strengthopcionalno
Tipnumber
standardno0.5
≤ 1> 0
Kontrolinel keci kipo noise dino pe skala kaj 1.0 si pherdo noise thaj value pas 0 si cikno noise. Kerel pes numa kana si dino image_url.
lorasopcionalno
Tipobject[]
standardno[]
LoRA-ja savenge jekhipen kerel o generime kipo, bi limitosko pe lengero gindo.
loras[].pathtrubul
Tipstring
Lokacia e LoRA vazipnaski, specifikime sar URL vaj drom.
loras[].scaleopcionalno
Tipnumber
standardno1
0 – 4
Multiplikator dino e LoRA vazipnaske anglal mergipen ande o bazno modelo.
embeddingsopcionalno
Tipobject[]
standardno[]
Embeddingura dino ande o kipo-keripe, te mapinel o prompto tokenura pe embedding weights. Akana, numa jekh embedding hin podpora.
embeddings[].pathtrubul
Tipstring
Embedding weights specifičime URL-esa vaj fajloske pathesa.
embeddings[].tokensopcionalno
Tipstring[]
Prompto tokenura mapome pe embedding weights. Te na den len, kerel jekh tokeno vaš sako vector ando embedding-fajlo, navalo <s0>, <s1>, ...; labaren kadala tokenura ande tumare promptura.
controlnetsopcionalno
Tipobject[]
standardno[]
Control netura dino te keren pes pe o kipo ande specifikime timesteps ande o keripe, bi limito savo numero den.
controlnets[].pathtrubul
Tipstring
Than e ControlNet vektorengo, specifikime sar URL vaj drom.
controlnets[].config_urlopcionalno
Tipstring | null
Optional URL savo sikavel e ControlNet-esko config.json fajlo.
controlnets[].variantopcionalno
Tipstring | null
Optionalo variant vaš use e Hugging Face repository key-sa.
controlnets[].image_urltrubul
Tipurl · image
Kipo URL dino sar o ControlNet inputo.
controlnets[].mask_urlopcionalno
Tipurl · image
ControlNet maska, savo, te dino, musaj te avel jekhbaro le control kipesa; o width thaj o height musaj te aven divisible by 32.
controlnets[].conditioning_scaleopcionalno
Tipnumber
standardno1
0 – 2
Skaliripe savo aplikil pe e ControlNet pharimatengo anglal te aven kethane thode ando bazutno modelo.
controlnets[].start_percentageopcionalno
Tipnumber
standardno0
0 – 1
Procento total timesteps-engo kana ControlNet startarel te influencinel kipesko keripe.
controlnets[].end_percentageopcionalno
Tipnumber
standardno1
0 – 1
Procento total timesteps-engo kana ControlNet stoparel te influencinel kipesko keripe.
controlnets[].ip_adapter_indexopcionalno
Tipinteger | null
IP adapteros savo alosarav pe index vaš InstantID ControlNet; aver ControlNetura na kamen kadava settingo.
controlnet_guess_modeopcionalno
Tipboolean
standardnofalse
Te hin true, o ControlNet alkalmazako mukhel numa conditional predictions.
ip_adapteropcionalno
Tipobject[]
standardno[]
IP adapterura labarde te keren kipo. Sako entry mangel image_encoder_path.
ip_adapter[].ip_adapter_image_urltrubul
Tipurl · image
Kipo URL dino sar o IP adapter inputo.
ip_adapter[].ip_adapter_mask_urlopcionalno
Tipurl · image
IP adapter maska; te dino, lake dimenzi musaj te aven sar le adapter kipeske dimenzi.
ip_adapter[].pathtrubul
Tipstring
IP adapter weights thavdipe, dino sar URL vaj path.
ip_adapter[].model_subfolderopcionalno
Tipstring | null
IP adapter weight thavdipe, dino sar subfolder ande o modelo directory.
ip_adapter[].weight_nameopcionalno
Tipstring | null
Nav le weightske fajloste.
ip_adapter[].insight_face_model_pathopcionalno
Tipstring | null
InsightFace modelo weights thavdipe, dino sar URL vaj path.
ip_adapter[].scaleopcionalno
Tipnumber
standardno1
≥ 0
Scaling factor vaš IP adapter weights, aplikime angl te phandenas len ande o base modelo.
ip_adapter[].scale_jsonopcionalno
Tipobject | null
Scaling factor vaš IP adapter weights, aplikime angl te phandenas len ande o base modelo.
ip_adapter[].unconditional_noising_factoropcionalno
Tipnumber
standardno0
0 – 1
Factor savo kontrolinel o unconditional noising vaš o IP adapter.
ip_adapter[].image_projection_shortcutopcionalno
Tipboolean
standardnotrue
Kipo projection shortcut setting, le True sar standardno. Labaren False vaš FaceID plus V1 modelo thaj True vaš FaceID plus V2 modelo.
image_encoder_pathopcionalno
Tipstring | null
Kipo encoder dino sar HTTPS URL vaj Hugging Face ID. Kompatibiliteta pherel le IP-Adapter weightsar: SD1.5 labarel image_encoder_subfolder='models/image_encoder', a h94/IP-Adapter SDXL labarel h94/IP-Adapter thaj image_encoder_subfolder='sdxl_models/image_encoder'. Encodero hin musaj kana ip_adapter si les jekh value.
image_encoder_subfolderopcionalno
Tipstring | null
Subdirectory ande image_encoder_path kaj si le kipo encoder weights.
image_encoder_weight_nameopcionalno
Tipstring | null
standardnopytorch_model.bin
Alosar le kipo encoder weights pe nav, te labaren len kipo-keripeste.
ic_light_model_urlopcionalno
Tipstring | null
IC Light modelo URL labardo kana keren kipo.
ic_light_model_background_image_urlopcionalno
Tipurl · image
IC Light kipo-keripasko modelo-kompatibilno backgroundo, dino sar kipo URL.
ic_light_image_urlopcionalno
Tipurl · image
Inputo kipo URL vaš keripe le IC Light modelosa.
seedopcionalno
Tipinteger | null
Seed vaš reprodukcia e kipengo ande Stable Diffusion. O kipo šaj te reprodukčarel pes ekzaktno pe sa keripena te mukhes isto o modelesko version, prompto thaj seed.
num_inference_stepsopcionalno
Tipinteger
standardno30
1 – 150
Kontrolisarel keci keripaski faza kerel Stable Diffusion; majbut faze šaj te anen maj detalno finalno kipo.
guidance_scaleopcionalno
Tipnumber
standardno7.5
0 – 20
Zor e promptoske pačajipaski vaś izbor e kiposko, sikavdi sar CFG (Classifier Free Guidance).
clip_skipopcionalno
Tipinteger
standardno0
0 – 2
Na kerel jekh kotor le kipo-keripestar, te renderinel sigeder; o rezultato si cikno aver.
scheduleropcionalno
Tipenum
DPM++ 2MDPM++ 2M KarrasDPM++ 2M SDEDPM++ 2M SDE KarrasEulerEuler AEuler (trailing timesteps)LCMLCM (trailing timesteps)DDIMTCD
Scheduler vaj sampler savo si labarde vaš e kipesko nevešaripen.
timestepsopcionalno
Tipobject
standardno{"array":[],"method":"default"}
Denoising timestep schedule override, mutually exclusive with sigmas. Bi override — standardno — o scheduler kalkulinkerel timesteps anda num_inference_steps; custom schedule kerel num_inference_steps bizo. Override mangel scheduler support vaš timesteps argumento ande set_timesteps.
timesteps.methodopcionalno
Tipenum
standardnodefault
defaultarray
Alosar sar aven determinime timesteps: 'default', o standardno settingo, mukhel le scheduler te labarel `num_inference_steps`. Te den tumaro schedule, alosar 'array' thaj thaven le schedule ande o `array` field.
timesteps.arrayopcionalno
Tipinteger[]
standardno[]
Timestep schedule aplikime kana o alosardo metodo si 'custom'.
sigmasopcionalno
Tipobject
standardno{"array":[],"method":"default"}
Denoising sigma schedule override, mutually exclusive with timesteps. Bi override — standardno — o scheduler kalkulinkerel sigmas anda num_inference_steps; custom schedule kerel num_inference_steps bizo. Override mangel scheduler support vaš sigmas argumento ande set_sigmas.
sigmas.methodopcionalno
Tipenum
standardnodefault
defaultarray
Alosar sar aven determinime sigmas: 'default', o standardno settingo, labarel le scheduler-eske sigma value. Te den tumaro sigma schedule, alosar 'custom' thaj thaven le schedule ande o `array` field.
sigmas.arrayopcionalno
Tipnumber[]
standardno[]
Sigma schedule aplikime kana o alosardo metodo si 'custom'.
prediction_typeopcionalno
Tipenum
standardnoepsilon
v_predictionepsilon
Alosar o prediction type vaš kipo-keripe; te na alosaren aver, labarel pes `epsilon`.
rescale_betas_snr_zeroopcionalno
Tipboolean
standardnofalse
Kontrolinel whether o sampler kerel rescale_betas_snr_zero.
image_formatopcionalno
Tipenum
standardnopng
jpegpng
Fajlo-formato e rezultato kipoqo.
num_imagesopcionalno num_outputs
Tipinteger
standardno1
1 – 8
Thaven keci kipo kerel jekh mangipen; bare batchura den buter keripesko vakti.
enable_safety_checkeropcionalno
Tipboolean
standardnofalse
Safety-checker aktivacia; true aktivarel checking.
tile_widthopcionalno
Tipinteger
standardno4096
128 – 4,096
Thaven keci baro si sako tile kana keren kipo.
tile_heightopcionalno
Tipinteger
standardno4096
128 – 4,096
Thaven keci baro si sako tile kana keren kipo.
tile_stride_widthopcionalno
Tipinteger
standardno2048
64 – 2,048
Thaven o phandipe maškar successiv tile positions kana keren kipo.
tile_stride_heightopcionalno
Tipinteger
standardno2048
64 – 2,048
Thaven o phandipe maškar successiv tile positions kana keren kipo.
etaopcionalno
Tipnumber
standardno0
0 – 1
Eta settingo labardo kana keren kipo.
debug_latentsopcionalno
Tipboolean
standardnofalse
Te true, garavel latents vaš debugging.
debug_per_pass_latentsopcionalno
Tipboolean
standardnofalse
Kerel debugging sako passoske kana thaven kadava pe true; garavel le latents anda sako pass.
trubul Kanonikano nav, vi akceptime

Fajloske parametra lel jekh publikano https:// URL, jekh data: URI dži 10 MB, vaj e file_url uploadoski. Fajlura

Rezultato

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "lora/inpaint",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 184,
    "usd": "0.184",
    "charged": 184,
    "refunded": 0
  },
  "input": {
    "model_name": "stabilityai/stable-diffusion-xl-base-1.0",
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "debug_latents": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    },
    "debug_per_pass_latents": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_name": "0-output.jpeg",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Tire fajlura, tiro alosaripenSako outputs[].url si kopija amare arakhipneste: vično (čargeime per GB-mase) vaj 7 dives bilačhes, tiro kontoskere regulaciatar vaj ?storage=.
Sa jekh forma sako modeloθartype, url, content_type, width, height thaj duration, varesave imajinake, video thaj audio-ke. output si o modelosko korkoro resultosko objekto.
Outputoske fieldura
images
array of object {url, content_type, file_name, file_size, width, height}Fajloskere informacie vaš e kerde kipura.
seed
integerKipo-generiripeqo seed, inkludirindoj o randomno kidlo valoro kana o inputo na sas seed; averčes, repetirisar o dindo valoro.
has_nsfw_concepts
array of booleanSikavel te si NSFW koncepto ande generirime kipo.
debug_latents
object {url, content_type, file_name, file_size} | nullLatent data garavdino vaš debugging.
debug_per_pass_latents
object {url, content_type, file_name, file_size} | nullPer-pass latent data garavdino vaš debugging.

Bute modeli: Editime e kipesko

AI agentenge: kadija rig sar Markdown si kate https://doitong.com/rom/developers/models/lora/inpaint.md. Sa e modelura thaj e gidura: https://doitong.com/developers/llms.txt