Krea 2: 오픈 가중치 12B 이미지 모델 기술 보고서

11 hours ago 4
  • Krea 2는 하나의 polished default보다 창작 탐색을 중시하는 이미지 생성 파운데이션 모델로, 모델 가중치와 추론을 permissive license로 공개함
  • 학습 과정은 pretraining → midtraining → SFT → preference optimization → RL로 이어지며, 데이터 큐레이션·캡션·프롬프트 확장·스타일 참조가 출력 분포를 단계적으로 다듬음
  • 아키텍처는 단순한 DiT 계열을 바탕으로 GQA, gated sigmoid attention, SwiGLU, Qwen 3 VL, Qwen Image VAE·FLUX 2 VAE 등을 조합해 안정성과 효율을 맞춤
  • Krea 2는 text-to-image 부문 Artificial Analysis leaderboard에서 top 10에 들었고, independent labs 모델 중 2위를 기록함
  • 대규모 학습을 위해 PyTorch·FSDP2·텐서 병렬화·Kubernetes·Virtual Kubelet·Weka·PostgreSQL 기반 시스템을 구축했으며, 다음 단계로 MoE, sparse attention, native 2K–4K, NVFP4, Muon scaling을 검토함

창작 탐색을 겨냥한 이미지 파운데이션 모델

  • Krea 2는 넓은 미적 다양성과 사용자의 창작 제어를 목표로 한 이미지 생성 파운데이션 모델 시리즈임
  • 공개 자료는 Release page, Hugging Face weights/license, GitHub code/license, Krea Image tool로 제공됨
  • 모델 가중치와 추론은 permissive license로 공개됨
  • Krea는 diffusion과 flow-matching 기반 이미지 모델이 고해상도 이미지, photorealism, 안정적 구조, 조밀한 텍스트 렌더링, 넓은 세계 지식, 세밀한 프롬프트 준수까지 발전했지만, 많은 시스템이 좁은 기본 미학으로 수렴한다고 봄
  • Krea 2는 하나의 polished default를 최적화하기보다 여러 스타일, 분위기, 구도, 시각적 방향을 탐색할 수 있는 생성 매체를 지향함
  • text-to-image 부문 Artificial Analysis leaderboard에서 top 10에 들었고, independent labs 모델 중 2위를 기록함

데이터 큐레이션과 캡션 전략

  • Krea 팀은 broad world knowledge와 style coverage를 갖춘 pretraining dataset을 만들기 위해 대규모 데이터 인프라와 분산 학습 프레임워크를 처음부터 구축함
  • “좋은 data mix”에는 고품질 이미지뿐 아니라 다양성과 넓은 domain coverage가 필요하다고 봄
  • aesthetic-score와 image-quality-assessment 기반 필터링은 implicit bias를 만들 수 있음
    • motion blur나 softness가 의도적 예술 선택일 수 있는데 blurry image로 낮게 평가될 수 있음
    • caption이 이미지를 정확히 설명한다면 바람직하지 않은 이미지도 downstream 학습에 도움이 될 수 있음
  • pretraining dataset에서는 duplicated samples, over-represented concepts, VLM이 중요 요소를 포착하지 못하는 샘플, undesired biases와 artifacts를 유발하는 샘플, low resolution에서 안정적으로 모델링하기 어려운 high visual complexity 샘플, AI-generated samples를 필터링함
  • Krea 2 pretraining mix에는 AI-generated images를 사용하지 않음
    • synthetic data와 distillation은 capability 획득의 shortcut이 될 수 있음
    • 소량의 AI-generated images도 모델 출력 분포에 bias를 도입하고 model quality의 upper bound를 사실상 정한다고 봄
    • 이를 걸러내기 위해 in-house classifiers를 설계함
  • 캡션은 multi-stage 방식으로 구성됨
    • target image에 OCR model을 실행해 visible text를 추출함
    • OCR 결과와 metadata를 captioning model에 제공해 extracted text와 world knowledge를 포함한 enriched caption을 생성함
    • context-rich long-form caption을 더 저렴한 LLM으로 다양한 길이와 형식으로 재구성해 여러 prompt style에 노출시킴
  • long prompts는 dense supervision을 제공해 더 빠른 수렴과 낮은 training loss를 만들었고, downstream 사용을 위해 short/medium prompt 노출도 유지함

해상도별 학습 데이터와 midtraining

  • pretraining data는 256px, 512px, 1024px resolution stages를 거침
    • 대부분의 FLOPs를 low-resolution stage에 배정해 core capability를 효율적으로 학습함
    • 이후 resolution을 높이며 high-fidelity generation capability를 부여함
    • low-resolution pretraining은 basic text-image alignment와 structure를 학습함
  • low-resolution dataset은 billions of images 규모라 저비용 CPU-based filters에 크게 의존함
    • broken-file, resolution, aspect-ratio filters로 부적합 이미지를 제거함
    • Laplacian filters로 extreme textures와 noise patterns가 있는 이미지를 제거함
    • RGB entropy, white/black pixel ratios, custom heuristics, in-house classifiers로 flat-color backgrounds와 border artifacts를 줄임
  • in-house classifier는 large VLM으로 filtering task용 system prompt를 만들고 pseudo-labeled dataset을 생성한 뒤, small DINOv3 또는 SigLIP-2 기반 classifier를 학습하는 방식으로 구축함
    • low-resolution 단계에서 GPU compute가 필요한 filtering model은 효율을 위해 1B parameters 미만으로 유지함
  • low-resolution deduplication은 md5, phash, colorhash를 결합한 hash-based methods를 주로 사용함
    • 기본 8x8 phash는 color를 고려하지 않아 false-positive rate가 높았음
    • 더 강건한 deduplication을 위해 12x12 phash와 colorhash를 결합함
  • training resolution이 커지면서 image-quality와 aesthetic filters를 도입함
    • quality score는 매우 poor quality인 이미지를 제거하는 데만 사용하고 score 기반 oversampling에는 쓰지 않음
    • OCR 기반 image-complexity score와 text density로 low resolution에서 text와 content를 의미 있게 표현하기 어려운 이미지를 제외함
  • SigLIP-2 embeddings 위에 sparse autoencoder를 학습해 SAE 기반 tagging system을 만들었고, explicit classifier 없이 clear visual artifacts를 필터링하는 데 활용함
  • midtraining은 pretraining과 달리 특정 visual domain에서 좋은 stylistic coverage와 high-quality images를 제공하는 image sources를 명시적으로 선택함
    • pretraining은 general pool에서 시작하는 bottom-up 프로세스임
    • midtraining은 domains와 sources를 먼저 고르는 top-down 큐레이션임
    • general pretraining distribution과 high-quality SFT distribution을 부드럽게 잇는 단계임
  • semantic clustering과 retrieval-based strategies로 world-knowledge coverage를 보강함
    • FAISS로 hierarchical k-means clustering을 수행함
    • VLM이 cluster centroid 근처 이미지를 검사해 cluster에 이름을 붙이고 필요한 경우 flag함
    • flagged clusters는 human review를 거쳐 low quality 또는 problematic cluster를 제거함
    • 남은 leaf cluster 안에서는 SigLIP similarity로 semantic deduplication을 수행함
  • named entity coverage를 위해 Danker로 English Wikipedia에서 PageRank를 실행하고 rank 기준 top 90% articles를 유지함
    • Wikidata metadata로 unrepresentable subjects를 제거함
    • 남은 약 5 million concepts에 대해 dataset 전체 caption에 full-text search를 수행함
    • 샘플링 시 rare concepts를 언급한 caption의 이미지를 우선함

아키텍처 선택과 ablation

  • Krea 2는 ablation을 거쳐 단순하지만 성능이 좋은 diffusion transformer(DiT) 아키텍처를 개발함
  • architecture ablation은 stability, performance, efficiency, simplicity 네 범주로 평가함
    • stability는 loss/gradient spike 감소와 학습 안정성을 봄
    • performance는 수렴 속도와 high resolution 및 장기 horizon에서의 유지 여부를 봄
    • efficiency는 quality 손상 없이 parameter count, FLOPs, memory, communication을 줄일 수 있는지 봄
    • simplicity는 다른 범주를 해치지 않고 model을 단순화할 수 있는지 확인함
  • 많은 아키텍처 결정은 LLM space의 채택 흐름에 영향을 받았고, LLM ecosystem의 kernel과 optimization을 diffusion model에서도 활용할 수 있다고 봄
  • 최종 아키텍처의 주요 선택은 다음과 같음
    • Attention은 GQA with gated sigmoid attention을 사용함
    • MLP는 GeLU MLP에서 4x expansion factor의 SwiGLU layers로 변경함
    • Residual은 standard residual을 유지함
    • Text encoder는 Qwen 3 VL을 사용함
    • Modulation은 per-block MLP modulation에서 light modulation with bias로 변경함
    • Autoencoder는 Qwen Image VAE와 FLUX 2 VAE를 사용함
    • Block design은 single stream transformer block을 사용함
    • Norm은 zero-center RMSNorm과 QKNorm을 사용함
    • Positional encoding은 3D Axial RoPE를 유지함
  • GQA는 minimal degradation만 유발하면서 computational efficiency를 개선함
    • MLA는 GQA보다 약간의 gain을 보였지만 additional computational overhead 때문에 채택하지 않음
    • gated sigmoid attention은 큰 performance gain은 없었지만 loss와 gradient-norm curves에서 더 안정적인 dynamics를 보임
  • single-stream, dual-stream, hybrid-stream design 사이에는 큰 performance 차이가 없었고, hybrid-stream이 약간 더 나았지만 단순성을 위해 single-stream blocks를 사용함
  • MMDiT의 per-block MLP modulation은 total parameter count의 20–30%를 차지할 수 있어, Krea 2는 이를 per-block tunable bias term으로 대체함
  • timestep conditioning 실험에서는 256px에서 4–16 timestep tokens가 AdaLN을 대체하기에 충분했지만, 512px와 1024px에서는 AdaLN baseline보다 성능이 나빴음
  • 최종 positional encoding은 head dimensions를 frame, height, width에 배정하는 3D axial RoPE
    • text tokens의 RoPE indices는 zero로 설정함
    • partial RoPE는 256px에서 512px로 scale할 때 좋은 zero-shot inference 결과를 냈지만 high-resolution training 후 최종 성능은 baseline보다 낮았음
  • autoencoder는 FLUX.1-dev autoencoder를 baseline으로 시작해 Qwen Image VAE, DC-AE, FLUX 2 VAE, internal autoencoder와 비교함
    • DC-AE는 reconstruction error 때문에 fine detail 해상 능력에 hard upper limit을 준다고 봄
    • Qwen Image VAE와 FLUX 2 VAE는 excellent reconstruction quality를 유지하면서 latent space가 훨씬 빠른 convergence를 제공함
    • early models에는 Qwen Image autoencoder를 사용했고 larger models에는 FLUX 2 VAE를 채택함
  • text encoder는 T5-XXL, T5Gemma, umT5, Qwen 2.5 VL, Qwen 3 VL을 비교했고, 최종 text encoder로 Qwen 3 VL을 사용함
    • VLM은 text와 image를 포함한 richer input space와 더 강한 multilingual generalization을 제공함
    • VLM feature의 last layer만 쓰지 않고 layers 전체의 hidden features를 aggregate하는 shallow attention layer를 도입함
    • token axis에 lightweight bidirectional transformer layers를 추가해 autoregressive bias를 줄임

학습 파이프라인, 선호 최적화, RL

  • training pipeline은 modern LLM training pipeline에서 영감을 받은 multi-stage 구조임
  • pretraining은 text-image alignment, text rendering, stylistic coverage, structural consistency 같은 basic capabilities를 확립함
    • final model은 standard rectified-flow loss와 v-parameterization으로 학습함
    • 256px stage의 first epoch에 iREPA를 사용해 early stage convergence를 크게 빠르게 한 뒤 제거함
    • 256px와 512px stages에서는 8-bit training으로 bf16 baseline 대비 15–20% training speed gain을 관찰함
    • 1024px부터 final RL stage까지는 standard bf16 training을 사용함
  • high-resolution pretraining에서는 resolution-dependent timeshift schedule 적응이 중요함
    • training과 inference 모두 shifted logit-normal sampling schedule을 사용함
    • resolution이 올라갈수록 shift를 점진적으로 증가시킴
    • sweep은 training shift에만 적용하고 inference shift schedule은 constant로 유지함
  • pretraining 중 warmup-stable-decay learning-rate schedule을 사용하고 PMA를 적용함
    • PMA는 EMA와 comparable performance를 달성하면서 EMA의 significant memory overhead를 피함
  • optimizer는 pipeline 전반에 AdamW를 primary optimizer로 사용함
    • Muon은 initial steps에서 AdamW보다 빠르게 수렴했지만 longer horizons에서는 낮은 성능과 stability issues를 보임
    • MMDiT의 first and last linear layers를 Muon parameters에서 제외하고 Nesterov momentum을 추가하자 low/high resolution 모두에서 AdamW baseline을 일관되게 능가함
    • 최신 pretraining run에는 시간 제약 때문에 Muon을 채택하지 않았고, 다음 pretraining cycle에서 채택할 계획임
  • SFT stage에서는 small dedicated set of highly aesthetic images를 큐레이션함
    • model을 aesthetically desirable directions로 더 bias하는 것이 목적임
    • earlier checkpoints에서 흔한 high-saturation 및 texture issues 해결에 특히 도움이 됨
    • domain-specific SFT checkpoints를 학습한 뒤 model merging으로 generalist SFT checkpoint를 만듦
  • preference optimization은 post-training stack의 첫 단계이며 two-stage pipeline으로 구성됨
    • 1단계는 large-scale synthetic preference-pair generation pipeline으로 initial refinement를 수행함
    • preference pairs의 majority는 적어도 하나의 on-policy sample을 포함함
    • 2단계는 human annotations만 사용하는 calibration stage임
    • human annotations는 model의 strengths, weaknesses, quirks에 익숙한 사내 인원이 수집함
  • PO에서는 policy divergence가 common phenomenon으로 나타남
    • DPO류 방법은 preferred sample likelihood와 dispreferred sample likelihood 사이 margin을 늘리도록 장려함
    • 여러 preference-dataset mixtures에서 모델이 두 sample 모두의 generation likelihood를 낮추되 다른 rate로 낮추는 방식으로 objective를 달성하는 현상을 관찰함
    • divergence는 모델을 general pretraining distribution에서 멀어지게 하고 training 후반에 high-frequency artifacts로 나타남
    • 이를 완화하기 위해 STPO라는 DPO variant를 설계함
  • RL은 training pipeline의 final stage임
    • multi-reward GRPO-style method를 사용함
    • reward models는 general aesthetic model, prompt-following reward, text-rendering reward, artifact and structure reward로 구성됨
    • general aesthetic model은 PO stage에서 수집한 preference data로 open-source VLM을 finetuning해 얻음
  • prompt-specific rubric reward는 prompt를 verifiable requirements로 분해하고 generated image가 이를 충족하는지 평가함
    • generic image quality로 prompt following을 환원하지 않고 fine-grained prompt constraints를 만족시키도록 함
  • structural artifacts를 줄이기 위해 dedicated artifact reward model을 학습함
    • extra fingers, malformed limbs, distorted text 같은 오류는 인간에게 명확하지만 general-purpose VLM judges가 자주 놓침
  • RL stage 전체는 CFG 없이 학습함
    • conditional model distribution을 빠르게 개선해 training 초기에 no-CFG samples를 guided samples에 훨씬 가깝게 만듦
    • inference time에는 CFG를 추가 control knob으로 계속 활성화할 수 있음
  • RL stage 뒤 optional timestep-distillation stage를 포함함
    • DMD, DMD2, Decoupled DMD, piFlow, APT를 검토했지만 Trajectory Distribution Matching(TDM) 을 채택함
    • TDM은 timesteps 전반에 DMD를 적용해 trajectory level에서 distribution matching을 수행함

프롬프트 확장과 스타일 참조

  • 학습 시 모델은 이미지의 조밀한 시각 디테일을 설명하는 풍부한 caption을 사용하지만, 실제 사용자 입력은 짧고 모호하며 표현 습관도 다양함
  • prompt expander는 단순하거나 불충분한 user prompt를 사용자 의도를 덮어쓰지 않으면서 더 풍부한 시각 방향으로 변환함
    • 기존 open-source LLM 위에 2단계 SFT와 RL 파이프라인으로 학습됨
    • 목표에는 이미지 품질 개선뿐 아니라 creative variation과 controllable exploration도 포함됨
  • SFT 데이터는 long captions에서 synthetic “user captions”를 생성해 만듦
    • synthetic user captions는 target caption의 많은 visual details를 의도적으로 생략한 짧고 conversational하며 semi-instructional prompts임
    • underspecified user prompt → expanded model-friendly caption 형태의 paired data를 만듦
    • reasoning ability 보존을 위해 synthetic thinking traces도 생성함
  • targeted distribution shaping도 소량 적용함
    • visually rich and artistic imagery를 oversample함
    • photorealistic descriptions로 확장되어야 하는 prompts에는 lightweight photographic-medium bias를 추가함
    • house style 강제가 아니라 expressive art-directed imagery와 straightforward photorealistic requests를 모두 포함하는 것이 목표임
  • prompt expander RL은 target caption imitation에서 벗어나 image quality를 개선하면서 user intent를 보존하는 expansions 생성을 목표로 함
    • GDPO와 multi-reward objective로 학습함
    • image-level rewards는 resulting generations의 quality와 preference를 측정함
    • prompt-level verifiable rewards는 expansion이 original request에 충실한지 확인함
    • safety와 constraint checks는 overall reward의 gates로 사용함
  • prompt expander의 failure mode 중 하나는 diversity collapse
    • image rewards가 지배적일 때 single safe high-reward house style을 학습할 수 있음
    • prompt groups 위에 DINOv3 embedding diversity score를 추가해 quality와 alignment와 함께 intra-group visual diversity를 보상함
    • variation을 보존하려면 diversity reward를 training 내내 active하게 유지해야 함
  • style-reference system은 base model 위에 구축됨
    • 사용자는 text로 이미지를 생성하면서 하나 이상의 reference images로 output style을 guide할 수 있음
    • multiple styles의 smooth semantic mixing, 각 style reference strength의 continuous control, complex styles에 대한 state-of-the-art adherence가 설계 목표임
    • 흔한 failure mode 중 하나는 style image의 content와 subject matter가 final image로 leakage되는 것이었음
    • style-reference module 학습용 self-supervised technique을 고안했고 이후 preference-optimization step으로 outputs를 추가 align함

분산 학습 인프라와 운영

  • Krea의 분산 학습 프레임워크는 PyTorch 기반으로 처음부터 구축됐고, 주로 DTensor 추상화와 torchtitan 프로젝트가 지원하는 torch 네이티브 기능을 사용함
    • 대부분의 사전학습과 후학습 실행에는 FSDP2와 Megatron-LM 스타일 텐서 병렬화를 함께 사용함
    • TP 크기가 2보다 큰 설정에서는 torch.compile 플래그로 async-TP를 활성화해 naive TP보다 중간 정도의 속도 향상을 얻음
    • autoencoder 파라미터는 모든 디바이스에 복제하고, text encoder와 메인 MMDiT backbone만 샤딩함
    • 노드 내부 연결에는 NVLinkSharp, 노드 간 연결에는 InfiniBand를 사용함
  • 학습 효율을 위해 hidden dimension이 더 큰 약간 넓은 모델을 사용함
    • hidden size가 커지면 각 레이어의 계산 집약도가 높아져 FSDP2 prefetching으로 지연을 숨기기 쉬워짐
    • 레이어 수를 줄이면 all-gather와 reduce-scatter 연산 수가 줄어듦
    • 이 변경으로 사전학습 실행 전반에서 NCCL 관련 오류가 크게 줄었음
    • 더 큰 행렬 곱셈 크기는 8-bit 학습의 quantization/dequantization 오버헤드를 상쇄하는 데 도움이 됨
  • 최적화 전략의 중심은 torch.compile임
    • attention에는 기본적으로 최신 cuDNN 커널을 사용하고 필요에 따라 FlexAttention 또는 FlashAttention 3를 사용함
    • 저해상도에서는 selective activation checkpointing을 사용함
    • 고해상도에서는 activation이 메모리를 지배하기 시작해 full activation checkpointing을 사용함
  • 데이터 로딩의 기본 포맷은 Parquet임
    • 각 row에는 이미지 참조, crop/resize 크기, caption, 기타 metadata를 저장함
    • 대규모 실행에서는 같은 aspect ratio 이미지 배치를 로드하도록 row를 미리 shuffle하고 packing함
    • packing 덕분에 latent를 단일 autoencoder pass로 인코딩할 수 있음
  • 대규모 분산 학습에서는 단일 GPU 실패나 straggler가 전체 실행을 중단시킬 수 있음
    • Krea 규모에서는 빠르고 잦은 checkpointing과 startup time 개선으로 MTBF와 MTTR을 최적화하는 방식이 충분했음
  • 연구는 production inference와 GPU를 공유하는 단일 Kubernetes 클러스터에서 실행됨
    • 연구가 필요할 때 전체 GPU pool을 점유할 수 있도록 설계함
    • 클러스터의 모든 GPU가 학습 실행에 할당되면 Krea의 inference workload가 자동으로 다른 곳으로 migrate됨
    • traffic failover를 시스템이 처리해 로컬 GPU가 남아 있지 않아도 production responsiveness를 유지함
  • Kueue는 workload scheduling의 핵심 요소였음
    • Kueue는 Workload priority와 Kubernetes Pod priority를 결합한 2-tier priority system을 제공함
    • multi-node training에 필요한 gang-scheduling을 가능하게 함
    • “borrowing”, “lending”, “reclamation” queueing primitive는 utilization 극대화에 도움이 됨
  • 모든 GPU가 연구에 할당될 때 inference를 다른 곳에서 scale하는 구성 요소에는 Virtual Kubelet을 사용함
    • pod가 virtual Kubernetes node에 schedule되면 Krea 코드가 pod specification을 target provider와 호환되는 형태로 변환함
    • provider-side failure가 발생하면 양쪽 상태를 reconcile함
    • recovery는 Kubernetes에 위임하고 시스템은 failure를 감지해 Kubernetes에 전파함
  • observability는 대규모 pretraining에서 가장 많이 배운 영역임
    • GPU, PCIe, NVLink, InfiniBand 관련 subsystem metric 없이는 이 규모의 training이 불가능했음
    • metric은 DCGM과 custom DaemonSet 조합으로 수집함
    • GPU가 75–78°C를 넘으면 throttling이 시작되고 전체 throughput이 줄어 training instability가 증가함
    • DCGM_FI_PROF_PIPE_TENSOR_ACTIVE는 training이 예상대로 수행되는지 판단하는 preferred indicator였음
    • InfiniBand metric은 fabric instability, link flapping, packet error, congestion, symbol error, throughput disparity 진단에 필수적이었음
  • GPU count scaling은 어려웠음
    • 128 GPU 미만 run은 매우 안정적이었고 며칠 동안 문제 없이 실행되는 경우가 많았음
    • GPU count를 늘리자 run이 훨씬 더 자주 crash하기 시작함
    • 매우 큰 scale에서는 24시간을 넘긴 run을 하나도 완료하지 못함
    • 많은 crash는 명확한 원인이 없었고 모든 metric이 healthy로 보이는 상태에서 NCCL timeout처럼 나타남
  • 초기의 큰 실수 중 하나는 Ceph 채택이었고, 이후 Weka로 전환함
    • filesystem 관련 문제와 downtime이 급격히 줄었고 performance도 비슷한 폭으로 개선됨
    • Weka는 Krea 2 학습에서 aggressive checkpointing을 가능하게 한 핵심 요소였음
    • checkpoint는 약 30초 만에 완료돼 checkpointing으로 잃는 시간이 적었음

데이터 웨어하우스와 작업 큐

  • K2 데이터 수집과 큐레이션을 위해 PostgreSQL 서버 cluster 중심의 custom warehousing and queueing system을 구축함
  • 각 Krea tablet server는 “krablet”이라고 부름
    • 각 krablet은 data shard 하나를 담는 Postgres instance와 mutation을 비동기 batch/queue해 lock contention을 줄이는 “funnel” server deployment로 구성됨
  • 모든 read는 대규모 “RPC” server deployment를 통해 proxy됨
    • RPC server는 PgBouncer 같은 traditional connection pooler를 대체함
    • 각 RPC server는 database의 모든 shard에 대한 connection pool을 유지함
  • krablet system은 metadata만 208TB까지 scale됐고, contended UPSERT transaction을 초당 수만 건 처리할 수 있음
    • 모든 research data의 single source of truth를 제공함
    • stream-processing layer가 data layer와 같아질 수 있게 함
  • 일반적인 job-processing workflow는 Postgres table을 queue처럼 사용하는 방식임
    • OCR worker는 contains_text IS NULL인 row를 찾아 처리함
    • embed worker는 embedding_path IS NULL이고 contains_text = FALSE인 row를 처리함
    • FOR UPDATE SKIP LOCKED로 row를 claim하고 last_tried_at 계열 column을 갱신함
  • queue 모델은 Kafka나 Ray와 다른 retry 동작을 가짐
    • failure 시 row를 drop하거나 dead-letter queue로 보내지 않음
    • 처리에 실패한 row도 last_tried_at atomic update 덕분에 queue의 끝에서 retry됨
    • head-of-line blocking도 방지함
  • worker 수는 동적으로 조절할 수 있음
    • processing job은 Kubernetes로 deploy되며, data resharding 없이 임의로 scale up/down할 수 있음
    • job은 worker 1개 또는 1000개로 실행될 수 있음
    • Prometheus scaling metric으로 pipeline 각 부분을 available work에 따라 autoscale할 수 있음
  • 연구자 편의를 위해 “pluck”이라는 system을 제공함
    • notebook에서 쓰기 적합한 global map API를 제공함
    • t.map은 사용자가 live progress를 보기 위해 attach할 수 있는 handle을 반환함
    • UDF는 cloudpickle으로 pickle되어 remote worker에서 실행됨
  • 다음 세대 연구를 위해 krablet과 FOR UPDATE SKIP LOCKED queue semantics를 유지하되 object storage 위 LSM tree에 data를 저장하는 successor system을 구축 중임

향후 방향

  • Krea 2에서는 안정성과 iteration speed를 우선해 비교적 보수적인 architecture와 optimizer 선택을 함
  • 다음 pretraining cycle에서는 modern LLM transformer design을 diffusion transformer에 적용하려 함
    • 검토 방향에는 MoE, sparse attention을 통한 native 2K–4K resolution scale, NVFP4 pretraining, Muon scaling이 포함됨
    • 현재 model은 undertrained이며 더 긴 training이 도움이 된다고 봄
  • 현재 Krea 2 training pipeline은 multi-reward RL stage로 끝남
    • Krea는 내부 expert를 사용해 OPD와 MOPD가 diffusion model에 효과적인 distillation method임을 이미 검증함
    • 더 많은 결과를 곧 공유하길 바람
  • production diffusion model은 상호 의존적인 여러 model로 이루어진 복잡한 구성을 요구함
    • latent diffusion model serving에는 보통 autoencoder, diffusion transformer, text encoder, prompt-expansion model이 필요함
    • stack에 따라 style-reference model이나 upscaler 같은 추가 module이 들어갈 수 있음
    • 독립적으로 학습해야 하면서 상호 의존성이 있는 여러 component를 유지하면 research team coordination이 어려워짐
  • Krea는 다음 pretraining cycle에서 architecture를 단순화하고 여러 component를 단일 model 아래 통합할 계획임
  • Krea 2는 creative exploration을 위한 image generation에 주로 집중했으며, 향후 robust editing, image reference, native 2K/4K generation으로 capability를 확장하려 함
  • 전통적인 자연어 prompting만으로는 전체 사용자 request 범위를 지원하기에 더 이상 충분하지 않다고 봄
    • 사용자 prompt에는 natural language, tag, detailed JSON, bounding box, instruction, visual guideline, Markdown 등 다양한 prompting style이 관찰됨
    • prompt expansion이 일부를 해결할 수 있지만, model이 이러한 prompt를 native하게 이해하는 것도 core capability가 되어야 한다고 봄
Read Entire Article