tchung1970 Claude commited on
Commit
4bd7b20
·
1 Parent(s): 0198045

Add FLUX.1-dev model attribution and improve project documentation

Browse files

- Add proper attribution section with links to FLUX.1 [pro], license, blog, and model
- Enhance CLAUDE.md with detailed code architecture and key function references

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>

Files changed (2) hide show
  1. CLAUDE.md +14 -1
  2. app.py +8 -0
CLAUDE.md CHANGED
@@ -31,4 +31,17 @@ The app is automatically deployed to Hugging Face Spaces with ZeroGPU. Changes t
31
  - Model runs in **bfloat16** precision for optimal performance on H200 GPUs
32
  - Output resolution is **1024x1024** pixels
33
  - Optimal parameters: 28 inference steps, guidance scale 3.5
34
- - Prompt enhancement automatically adds Picasso-style descriptors
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  - Model runs in **bfloat16** precision for optimal performance on H200 GPUs
32
  - Output resolution is **1024x1024** pixels
33
  - Optimal parameters: 28 inference steps, guidance scale 3.5
34
+ - Prompt enhancement automatically adds Picasso-style descriptors
35
+
36
+ ## Code Architecture
37
+
38
+ ### Core Components
39
+ - **Model Loading**: `load_model()` function initializes FLUX.1-dev pipeline with bfloat16 precision
40
+ - **Image Generation**: `generate_image()` function handles prompt enhancement and image generation with configurable parameters
41
+ - **UI Interface**: Gradio Blocks layout with prompt input, parameter sliders, and example buttons
42
+ - **Example System**: Pre-defined example prompts accessible through vertical button layout
43
+
44
+ ### Key Functions
45
+ - `load_model()` (app.py:9): Loads and configures the FLUX.1-dev pipeline
46
+ - `generate_image()` (app.py:27): Main generation function with Picasso-style prompt enhancement
47
+ - Example setter functions (app.py:88-97): Populate prompt input with predefined examples
app.py CHANGED
@@ -115,6 +115,14 @@ with gr.Blocks(title="🎨 FLUX.1-dev-Picasso") as demo:
115
  inputs=[prompt_input, steps_slider, guidance_slider],
116
  outputs=[output_image, output_text]
117
  )
 
 
 
 
 
 
 
 
118
 
119
  if __name__ == "__main__":
120
  demo.launch()
 
115
  inputs=[prompt_input, steps_slider, guidance_slider],
116
  outputs=[output_image, output_text]
117
  )
118
+
119
+ # Attribution section
120
+ gr.Markdown("""
121
+ ---
122
+ **Model Attribution:**
123
+ 12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://huggingface.co/black-forest-labs/FLUX.1-pro)
124
+ [[non-commercial license]](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md) [[blog]](https://blackforestlabs.ai/announcing-black-forest-labs/) [[model]](https://huggingface.co/black-forest-labs/FLUX.1-dev)
125
+ """)
126
 
127
  if __name__ == "__main__":
128
  demo.launch()