Merge pull request #55 from anthonywu/easy-import-dx
dev ux: simplify import paths of frequently used items in scripts and demos
This commit is contained in:
commit
3b3e232365
@ -111,8 +111,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:
|
Or, with the correct python environment active, create and run a separate script like the following:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from mflux.flux.flux import Flux1
|
from mflux import Flux1, Config
|
||||||
from mflux.config.config import Config
|
|
||||||
|
|
||||||
# Load the model
|
# Load the model
|
||||||
flux = Flux1.from_alias(
|
flux = Flux1.from_alias(
|
||||||
|
|||||||
@ -0,0 +1,8 @@
|
|||||||
|
from mflux.config.config import Config
|
||||||
|
from mflux.config.config import ConfigControlnet
|
||||||
|
from mflux.config.model_config import ModelConfig
|
||||||
|
from mflux.controlnet.flux_controlnet import Flux1Controlnet
|
||||||
|
from mflux.flux.flux import Flux1
|
||||||
|
from mflux.post_processing.image_util import ImageUtil
|
||||||
|
|
||||||
|
__all__ = ["Flux1", "Flux1Controlnet", "Config", "ConfigControlnet", "ModelConfig", "ImageUtil"]
|
||||||
@ -1,13 +1,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
from mflux import Flux1, Config, ModelConfig
|
||||||
|
|
||||||
from mflux.config.model_config import ModelConfig
|
|
||||||
from mflux.config.config import Config
|
|
||||||
from mflux.flux.flux import Flux1
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@ -1,14 +1,7 @@
|
|||||||
import argparse
|
import argparse
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
from mflux import Flux1Controlnet, ConfigControlnet, ModelConfig, ImageUtil
|
||||||
|
|
||||||
from mflux.config.model_config import ModelConfig
|
|
||||||
from mflux.config.config import ConfigControlnet
|
|
||||||
from mflux.controlnet.flux_controlnet import Flux1Controlnet
|
|
||||||
from mflux.post_processing.image_util import ImageUtil
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@ -2,10 +2,7 @@ import argparse
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
from mflux import Flux1, ModelConfig
|
||||||
|
|
||||||
from mflux.flux.flux import Flux1
|
|
||||||
from mflux.config.model_config import ModelConfig
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
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