Spaces:
Running
on
Zero
Running
on
Zero
File size: 4,110 Bytes
97644ca 70eca38 9778625 97644ca 9778625 97644ca 0345ed6 97644ca 70eca38 97644ca ee19fd5 97644ca ee19fd5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
---
title: Time Stream
emoji: πͺ
colorFrom: pink
colorTo: blue
sdk: gradio
sdk_version: 5.35.0
app_file: app.py
pinned: false
license: mit
short_description: input text, a video from the past to the future
---
Looking at this code, it's a Gradio-based application that generates interpolated images between two concepts using CLIP-guided diffusion with the FLUX model. Let me explain the key components and functionality:
## English Explanation
### Overview
This application creates a "Time Stream" effect by generating a series of images that smoothly transition between two different states or concepts. For example, it can show the progression from a "fresh" tomato to a "rotten" one, creating a time-lapse-like visualization.
### Key Features
1. **CLIP-Guided Image Generation**
- Uses FLUX.1-schnell model with CLIP guidance
- Finds latent directions between two concepts using CLIP embeddings
- Generates intermediate images along this direction
2. **Main Components**
- **Prompt**: The base description of what to generate
- **1st/2nd Direction**: Two states to interpolate between (e.g., "Fresh" β "Rotten")
- **Strength**: Controls how extreme the transformation is
- **Output**: Creates both an image strip and a looping video
3. **Advanced Options**
- Number of intermediate images (3-65)
- CLIP direction iterations (0-400)
- Inference steps (1-4)
- Guidance scale (0.1-10.0)
- Seed control for reproducibility
4. **Output Formats**
- Individual generated images
- Image strip showing all transitions
- Looping video of the transformation
- Interactive slider to view specific frames
### Technical Implementation
- Uses `spaces.GPU` decorator for GPU acceleration
- Implements AutoencoderTiny for faster processing
- Handles Korean text detection (though warns it's used directly without translation)
- Saves images with unique UUID filenames
### Example Use Cases
- Showing decay/aging processes
- Seasonal changes
- Weather transitions
- Urban development/deterioration
- Any temporal transformation
---
## νκΈ μ€λͺ
### κ°μ
μ΄ μ ν리μΌμ΄μ
μ λ κ°μ§ λ€λ₯Έ μνλ κ°λ
μ¬μ΄λ₯Ό λΆλλ½κ² μ ννλ μΌλ ¨μ μ΄λ―Έμ§λ₯Ό μμ±νμ¬ "μκ°μ νλ¦(Time Stream)" ν¨κ³Όλ₯Ό λ§λλλ€. μλ₯Ό λ€μ΄, "μ μ ν" ν λ§ν μμ "μ©μ" ν λ§ν λ‘μ λ³ν κ³Όμ μ 보μ¬μ£Όλ μκ° κ²½κ³Ό μκ°νλ₯Ό μμ±ν μ μμ΅λλ€.
### μ£Όμ κΈ°λ₯
1. **CLIP κ°μ΄λ μ΄λ―Έμ§ μμ±**
- CLIP κ°μ΄λμ€μ ν¨κ» FLUX.1-schnell λͺ¨λΈ μ¬μ©
- CLIP μλ² λ©μ μ¬μ©νμ¬ λ κ°λ
μ¬μ΄μ μ μ¬ λ°©ν₯ μ°ΎκΈ°
- μ΄ λ°©ν₯μ λ°λΌ μ€κ° μ΄λ―Έμ§λ€μ μμ±
2. **μ£Όμ κ΅¬μ± μμ**
- **ν둬ννΈ**: μμ±ν λμμ κΈ°λ³Έ μ€λͺ
- **1μ°¨/2μ°¨ λ°©ν₯**: 보κ°ν λ κ°μ§ μν (μ: "μ μ ν" β "μ©μ")
- **κ°λ**: λ³νμ κ·Ήλ¨μ±μ μ μ΄
- **μΆλ ₯**: μ΄λ―Έμ§ μ€νΈλ¦½κ³Ό 루ν λΉλμ€ λͺ¨λ μμ±
3. **κ³ κΈ μ΅μ
**
- μ€κ° μ΄λ―Έμ§ μ (3-65κ°)
- CLIP λ°©ν₯ λ°λ³΅ νμ (0-400ν)
- μΆλ‘ λ¨κ³ (1-4λ¨κ³)
- κ°μ΄λμ€ μ€μΌμΌ (0.1-10.0)
- μ¬νμ±μ μν μλ μ μ΄
4. **μΆλ ₯ νμ**
- κ°λ³ μμ± μ΄λ―Έμ§
- λͺ¨λ μ νμ 보μ¬μ£Όλ μ΄λ―Έμ§ μ€νΈλ¦½
- λ³ν κ³Όμ μ 루ν λΉλμ€
- νΉμ νλ μμ λ³Ό μ μλ μΈν°λν°λΈ μ¬λΌμ΄λ
### κΈ°μ μ ꡬν
- GPU κ°μμ μν `spaces.GPU` λ°μ½λ μ΄ν° μ¬μ©
- λΉ λ₯Έ μ²λ¦¬λ₯Ό μν AutoencoderTiny ꡬν
- νκΈ ν
μ€νΈ κ°μ§ μ²λ¦¬ (λ²μ μμ΄ μ§μ μ¬μ©λλ€λ κ²½κ³ νμ)
- κ³ μ ν UUID νμΌλͺ
μΌλ‘ μ΄λ―Έμ§ μ μ₯
### μ¬μ© μμ
- λΆν¨/λ
Έν κ³Όμ νν
- κ³μ λ³ν
- λ μ¨ μ ν
- λμ κ°λ°/μ ν΄
- λͺ¨λ μκ°μ λ³ν
### μ°Έκ³ μ¬ν
- νκΈ μ
λ ₯μ μ§μλμ§λ§ λͺ¨λΈμ΄ μμ΄μ μ΅μ νλμ΄ μμ΄ κ²°κ³Όκ° μ νμ μΌ μ μμ
- κ°λ(Strength) κ°μ΄ 2.5 μ΄μμΌ κ²½μ° λΆμμ ν μ μμ
- μ€κ° μ΄λ―Έμ§ μκ° λ§μμλ‘ λ λΆλλ¬μ΄ μ ν ν¨κ³Όλ₯Ό μ»μ μ μμ |