pesotsky commited on
Commit
7993fd8
·
verified ·
1 Parent(s): 23ca8c5

Update model_index.json

Browse files
Files changed (1) hide show
  1. model_index.json +10 -24
model_index.json CHANGED
@@ -1,24 +1,10 @@
1
- import requests
2
- import io
3
- from PIL import Image
4
-
5
- API_URL = "https://api-inference.huggingface.co/models/YOUR_USERNAME/flux-dev-custom-lora"
6
- headers = {"Authorization": f"Bearer YOUR_API_TOKEN"}
7
-
8
- def generate_image(prompt):
9
- payload = {
10
- "inputs": prompt,
11
- "parameters": {
12
- "num_inference_steps": 50,
13
- "guidance_scale": 7.5,
14
- "width": 512,
15
- "height": 512
16
- }
17
- }
18
- response = requests.post(API_URL, headers=headers, json=payload)
19
- return Image.open(io.BytesIO(response.content))
20
-
21
- # Пример использования
22
- prompt = "A beautiful landscape with mountains and a lake"
23
- image = generate_image(prompt)
24
- image.save("generated_image.png")
 
1
+ {
2
+ "base_model": "fluxquanta/flux-dev",
3
+ "_class_name": "LoraLoaderMixin",
4
+ "model_type": "FluxModel",
5
+ "lora_config": {
6
+ "type": "FluxLoraConfig",
7
+ "rank": 16,
8
+ "alpha": 16
9
+ }
10
+ }