opengradient 0.3.15__py3-none-any.whl → 0.3.16__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
opengradient/__init__.py CHANGED
@@ -5,7 +5,7 @@ from .defaults import DEFAULT_INFERENCE_CONTRACT_ADDRESS, DEFAULT_RPC_URL
5
5
  from .types import InferenceMode, LLM
6
6
  from . import llm
7
7
 
8
- __version__ = "0.3.15"
8
+ __version__ = "0.3.16"
9
9
 
10
10
  _client = None
11
11
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: opengradient
3
- Version: 0.3.15
3
+ Version: 0.3.16
4
4
  Summary: Python SDK for OpenGradient decentralized model management & inference services
5
5
  Project-URL: Homepage, https://opengradient.ai
6
6
  Author-email: OpenGradient <oliver@opengradient.ai>
@@ -215,7 +215,18 @@ tx_hash, finish_reason, message = og.llm_chat(
215
215
  )
216
216
  ```
217
217
 
218
+ ### Image Generation
219
+ ```python
220
+ tx_hash, image_data = og.generate_image(
221
+ model="stabilityai/stable-diffusion-xl-base-1.0",
222
+ prompt="A beautiful sunset over mountains",
223
+ width=1024,
224
+ height=1024
225
+ )
218
226
 
227
+ with open("generated_image.png", "wb") as f:
228
+ f.write(image_data)
229
+ ```
219
230
 
220
231
  ## Using the CLI
221
232
 
@@ -270,4 +281,21 @@ Or you can use files instead of text input in order to simplify your command:
270
281
  opengradient chat --model "mistralai/Mistral-7B-Instruct-v0.3" --messages-file messages.json --tools-file tools.json --max-tokens 200
271
282
  ```
272
283
 
284
+ ### Image Generation
285
+ ```bash
286
+ opengradient generate-image \
287
+ --model "stabilityai/stable-diffusion-xl-base-1.0" \
288
+ --prompt "A beautiful sunset over mountains" \
289
+ --output-path sunset.png \
290
+ --width 1024 \
291
+ --height 1024
292
+ ```
293
+
294
+ Options:
295
+ - `--model`, `-m`: Model identifier for image generation (required)
296
+ - `--prompt`, `-p`: Text prompt for generating the image (required)
297
+ - `--output-path`, `-o`: Output file path for the generated image (required)
298
+ - `--width`: Output image width in pixels (default: 1024)
299
+ - `--height`: Output image height in pixels (default: 1024)
300
+
273
301
  For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
@@ -1,4 +1,4 @@
1
- opengradient/__init__.py,sha256=ATwimOCIZli1u5WKTMfhtH3VDeACqgK29BFAihyquvM,4015
1
+ opengradient/__init__.py,sha256=IlVjsDPLaC8Zqaj8_QZCzi6-F20Ta-wyefd1mh4k53Q,4015
2
2
  opengradient/account.py,sha256=2B7rtCXQDX-yF4U69h8B9-OUreJU4IqoGXG_1Hn9nWs,1150
3
3
  opengradient/cli.py,sha256=kdYR_AFKHV99HtO_son7vHpM5jWVZe8FO0iMWxJ7pJE,24444
4
4
  opengradient/client.py,sha256=RdlTz60NJKVJihYY6oVYLfNOg6RGnJbfG-2UIxUk-ws,37069
@@ -13,8 +13,8 @@ opengradient/proto/__init__.py,sha256=AhaSmrqV0TXGzCKaoPV8-XUvqs2fGAJBM2aOmDpkNb
13
13
  opengradient/proto/infer.proto,sha256=13eaEMcppxkBF8yChptsX9HooWFwJKze7oLZNl-LEb8,1217
14
14
  opengradient/proto/infer_pb2.py,sha256=wg2vjLQCNv6HRhYuIqgj9xivi3nO4IPz6E5wh2dhDqY,3446
15
15
  opengradient/proto/infer_pb2_grpc.py,sha256=y5GYwD1EdNs892xx58jdfyA0fO5QC7k3uZOtImTHMiE,6891
16
- opengradient-0.3.15.dist-info/METADATA,sha256=j1LRy_faAg69fDQNEJhByO7kiPtd6jO-DQbNhDk99h0,8692
17
- opengradient-0.3.15.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
18
- opengradient-0.3.15.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
19
- opengradient-0.3.15.dist-info/licenses/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
20
- opengradient-0.3.15.dist-info/RECORD,,
16
+ opengradient-0.3.16.dist-info/METADATA,sha256=FrkTwhsj8sHnpaDxKVwCJosvfAwljdJ9yFE9KKHkLMk,9536
17
+ opengradient-0.3.16.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
18
+ opengradient-0.3.16.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
19
+ opengradient-0.3.16.dist-info/licenses/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
20
+ opengradient-0.3.16.dist-info/RECORD,,