mirror of
https://github.com/hanzoai/engine.git
synced 2026-11-20 14:17:52 +00:00
20 lines
423 B
Python
20 lines
423 B
Python
from hanzo import (
|
|
Runner,
|
|
Which,
|
|
DiffusionArchitecture,
|
|
ImageGenerationResponseFormat,
|
|
)
|
|
|
|
runner = Runner(
|
|
which=Which.DiffusionPlain(
|
|
model_id="black-forest-labs/FLUX.1-schnell",
|
|
arch=DiffusionArchitecture.FluxOffloaded,
|
|
),
|
|
)
|
|
|
|
res = runner.generate_image(
|
|
"A vibrant sunset in the mountains, 4k, high quality.",
|
|
ImageGenerationResponseFormat.Url,
|
|
)
|
|
print(res.data[0].url)
|