simplify import paths of frequently used items in scripts and demos
This commit is contained in:
parent
ca4e3f4c79
commit
0812d6252c
@ -105,8 +105,7 @@ mflux-generate --model dev --prompt "Luxury food photograph" --steps 25 --seed 2
|
||||
Or, with the correct python environment active, create and run a separate script like the following:
|
||||
|
||||
```python
|
||||
from mflux.flux.flux import Flux1
|
||||
from mflux.config.config import Config
|
||||
from mflux import Flux1, Config
|
||||
|
||||
# Load the model
|
||||
flux = Flux1.from_alias(
|
||||
|
||||
@ -0,0 +1,5 @@
|
||||
from mflux.flux.flux import Flux1
|
||||
from mflux.config.config import Config
|
||||
from mflux.config.model_config import ModelConfig
|
||||
|
||||
__all__ = ["Flux1", "Config", "ModelConfig"]
|
||||
@ -5,9 +5,7 @@ import time
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
from mflux.config.model_config import ModelConfig
|
||||
from mflux.config.config import Config
|
||||
from mflux.flux.flux import Flux1
|
||||
from mflux import Flux1, Config, ModelConfig
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
@ -4,8 +4,7 @@ import sys
|
||||
|
||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
from mflux.flux.flux import Flux1
|
||||
from mflux.config.model_config import ModelConfig
|
||||
from mflux import Flux1, ModelConfig
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
7
tests/test_readme_example.sh
Executable file
7
tests/test_readme_example.sh
Executable file
@ -0,0 +1,7 @@
|
||||
mflux-generate \
|
||||
--prompt "Luxury food photograph" \
|
||||
--model schnell \
|
||||
--steps 2 \
|
||||
--seed 2 \
|
||||
--height 1024 \
|
||||
--width 1024
|
||||
Loading…
Reference in New Issue
Block a user