--- title: Rolls-Royce FLUX LoRA emoji: 🐠 colorFrom: yellow colorTo: green sdk: gradio sdk_version: 5.35.0 app_file: app.py pinned: false --- I'll create comprehensive documentation for this Flux LoRA Rolls-Royce image generation code in both English and Korean. ## English Documentation ### Flux LoRA Rolls-Royce Image Generator This application is a specialized image generation tool that uses the FLUX.1-dev diffusion model with a custom LoRA (Low-Rank Adaptation) fine-tuned specifically for generating high-quality Rolls-Royce automobile images. #### Key Features 1. **Advanced AI Model Integration** - Utilizes the state-of-the-art FLUX.1-dev diffusion pipeline from Black Forest Labs - Incorporates a custom LoRA adapter (`seawolf2357/flux-lora-car-rolls-royce`) specifically trained on Rolls-Royce vehicles - Supports both CUDA GPU acceleration and CPU fallback for broader compatibility 2. **Persistent Image Storage** - Automatically saves all generated images with unique timestamps and UUIDs - Maintains a metadata file tracking prompts and generation times - Provides a gallery view for browsing previously generated images 3. **User-Friendly Interface** - Built with Gradio for an intuitive web-based interface - Features two main tabs: Generation and Gallery - Includes pre-written example prompts showcasing various Rolls-Royce models in luxurious settings 4. **Customizable Generation Parameters** - **Seed Control**: Option for randomization or manual seed setting for reproducibility - **Image Dimensions**: Adjustable width and height (up to 1024x1024 pixels) - **Guidance Scale**: Controls how closely the image follows the prompt (0.0-10.0) - **Inference Steps**: Number of denoising steps (1-50) - **LoRA Scale**: Strength of the Rolls-Royce-specific adaptation (0.0-1.0) #### Technical Implementation The application leverages several key technologies: - **PyTorch** for deep learning operations - **Diffusers** library for the diffusion model pipeline - **Gradio** for the web interface - **Spaces GPU** decorator for optimized GPU usage (120-second duration limit) The generation process: 1. Loads the base FLUX.1-dev model with bfloat16 precision for memory efficiency 2. Applies the Rolls-Royce LoRA weights for specialized car generation 3. Processes user prompts with specified parameters 4. Saves generated images automatically with metadata 5. Updates the gallery view with new creations #### Example Use Cases The included examples demonstrate various scenarios: - Classic Rolls-Royce models in architectural settings - Modern vehicles in urban environments - Luxury SUVs in natural landscapes - Vintage cars in historical contexts - High-performance models in exclusive locations Each prompt includes the `[trigger]` keyword to activate the LoRA adaptation effectively. --- ## ν•œκΈ€ μ„€λͺ…μ„œ ### Flux LoRA 둀슀둜이슀 이미지 생성기 이 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ€ FLUX.1-dev ν™•μ‚° λͺ¨λΈκ³Ό 둀슀둜이슀 μžλ™μ°¨ 이미지 생성에 νŠΉν™”λœ μ»€μŠ€ν…€ LoRA(Low-Rank Adaptation)λ₯Ό μ‚¬μš©ν•˜λŠ” μ „λ¬Έ 이미지 생성 λ„κ΅¬μž…λ‹ˆλ‹€. #### μ£Όμš” κΈ°λŠ₯ 1. **κ³ κΈ‰ AI λͺ¨λΈ 톡합** - Black Forest Labs의 μ΅œμ²¨λ‹¨ FLUX.1-dev ν™•μ‚° νŒŒμ΄ν”„λΌμΈ ν™œμš© - 둀슀둜이슀 μ°¨λŸ‰ μ „μš©μœΌλ‘œ ν•™μŠ΅λœ μ»€μŠ€ν…€ LoRA μ–΄λŒ‘ν„°(`seawolf2357/flux-lora-car-rolls-royce`) 적용 - CUDA GPU 가속 및 CPU 폴백 μ§€μ›μœΌλ‘œ 폭넓은 ν˜Έν™˜μ„± 제곡 2. **영ꡬ 이미지 μ €μž₯** - μƒμ„±λœ λͺ¨λ“  이미지λ₯Ό κ³ μœ ν•œ νƒ€μž„μŠ€νƒ¬ν”„μ™€ UUID둜 μžλ™ μ €μž₯ - ν”„λ‘¬ν”„νŠΈμ™€ 생성 μ‹œκ°„μ„ μΆ”μ ν•˜λŠ” 메타데이터 파일 μœ μ§€ - 이전에 μƒμ„±λœ 이미지λ₯Ό 탐색할 수 μžˆλŠ” 가러리 λ·° 제곡 3. **μ‚¬μš©μž μΉœν™”μ  μΈν„°νŽ˜μ΄μŠ€** - Gradioλ₯Ό μ‚¬μš©ν•œ 직관적인 μ›Ή 기반 μΈν„°νŽ˜μ΄μŠ€ ꡬ좕 - 생성(Generation)κ³Ό 가러리(Gallery) 두 개의 μ£Όμš” νƒ­ 제곡 - λ‹€μ–‘ν•œ 둀슀둜이슀 λͺ¨λΈμ„ κ³ κΈ‰μŠ€λŸ¬μš΄ ν™˜κ²½μ—μ„œ λ³΄μ—¬μ£ΌλŠ” 예제 ν”„λ‘¬ν”„νŠΈ 포함 4. **λ§žμΆ€ν˜• 생성 λ§€κ°œλ³€μˆ˜** - **μ‹œλ“œ μ œμ–΄**: μž¬ν˜„μ„±μ„ μœ„ν•œ λ¬΄μž‘μœ„ν™” λ˜λŠ” μˆ˜λ™ μ‹œλ“œ μ„€μ • μ˜΅μ…˜ - **이미지 크기**: μ‘°μ • κ°€λŠ₯ν•œ λ„ˆλΉ„μ™€ 높이 (μ΅œλŒ€ 1024x1024 ν”½μ…€) - **κ°€μ΄λ˜μŠ€ μŠ€μΌ€μΌ**: ν”„λ‘¬ν”„νŠΈ μ€€μˆ˜ 정도 μ œμ–΄ (0.0-10.0) - **μΆ”λ‘  단계**: λ…Έμ΄μ¦ˆ 제거 단계 수 (1-50) - **LoRA μŠ€μΌ€μΌ**: 둀슀둜이슀 νŠΉν™” 적응 강도 (0.0-1.0) #### 기술적 κ΅¬ν˜„ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ€ λ‹€μŒκ³Ό 같은 핡심 κΈ°μˆ μ„ ν™œμš©ν•©λ‹ˆλ‹€: - λ”₯λŸ¬λ‹ 연산을 μœ„ν•œ **PyTorch** - ν™•μ‚° λͺ¨λΈ νŒŒμ΄ν”„λΌμΈμ„ μœ„ν•œ **Diffusers** 라이브러리 - μ›Ή μΈν„°νŽ˜μ΄μŠ€λ₯Ό μœ„ν•œ **Gradio** - μ΅œμ ν™”λœ GPU μ‚¬μš©μ„ μœ„ν•œ **Spaces GPU** λ°μ½”λ ˆμ΄ν„° (120초 μ‹œκ°„ μ œν•œ) 생성 ν”„λ‘œμ„ΈμŠ€: 1. λ©”λͺ¨λ¦¬ νš¨μœ¨μ„±μ„ μœ„ν•΄ bfloat16 μ •λ°€λ„λ‘œ κΈ°λ³Έ FLUX.1-dev λͺ¨λΈ λ‘œλ“œ 2. μ „λ¬Έ μžλ™μ°¨ 생성을 μœ„ν•œ 둀슀둜이슀 LoRA κ°€μ€‘μΉ˜ 적용 3. μ§€μ •λœ λ§€κ°œλ³€μˆ˜λ‘œ μ‚¬μš©μž ν”„λ‘¬ν”„νŠΈ 처리 4. μƒμ„±λœ 이미지λ₯Ό 메타데이터와 ν•¨κ»˜ μžλ™ μ €μž₯ 5. μƒˆλ‘œμš΄ μƒμ„±λ¬Όλ‘œ 가러리 λ·° μ—…λ°μ΄νŠΈ #### μ‚¬μš© μ˜ˆμ‹œ ν¬ν•¨λœ μ˜ˆμ œλ“€μ€ λ‹€μ–‘ν•œ μ‹œλ‚˜λ¦¬μ˜€λ₯Ό λ³΄μ—¬μ€λ‹ˆλ‹€: - 건좕적 배경의 ν΄λž˜μ‹ 둀슀둜이슀 λͺ¨λΈ - λ„μ‹œ ν™˜κ²½μ˜ ν˜„λŒ€μ  μ°¨λŸ‰ - μžμ—° 풍경 μ†μ˜ λŸ­μ…”λ¦¬ SUV - 역사적 λ§₯락의 λΉˆν‹°μ§€ μžλ™μ°¨ - 독점적인 μž₯μ†Œμ˜ κ³ μ„±λŠ₯ λͺ¨λΈ 각 ν”„λ‘¬ν”„νŠΈμ—λŠ” LoRA 적응을 효과적으둜 ν™œμ„±ν™”ν•˜κΈ° μœ„ν•œ `[trigger]` ν‚€μ›Œλ“œκ°€ ν¬ν•¨λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.