NOOB HERE How do i use?
I installed it based on the instructions. What do i do now? I see no start button or anything. how do I start this?
Use gradio based inference to run it
pip install gradio spaces
python app.py
click the link in the cmd, it will be something like 127.0.0.7890. click on it or, copy and paste it in your browser, and then you will see a GUI based platform where you can run it!
Use gradio based inference to run it
pip install gradio spaces
python app.py
click the link in the cmd, it will be something like 127.0.0.7890. click on it or, copy and paste it in your browser, and then you will see a GUI based platform where you can run it!
Hi, thanks for the response. From my understanding i just open cmd in the Omnigen root directory and run "pip install gradio spaces". that seemed to work. but then I ran the next line "python app.py" and got an error:
C:\OmniGen\OmniGen>python app.py
C:\OmniGen\OmniGen\app.py:122: SyntaxWarning: invalid escape sequence '/'
"The flower <|image_1|></img> is placed in the vase which is in the middle of <|image_2|></img> on a wooden table of a living room",
C:\OmniGen\OmniGen\app.py:194: SyntaxWarning: invalid escape sequence '/'
"<|image_1|></img> What item can be used to see the current time? Please remove it.",
C:\OmniGen\OmniGen\app.py:223: SyntaxWarning: invalid escape sequence '<'
description = """
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\OmniGen\OmniGen\app.py", line 6, in
from OmniGen import OmniGenPipeline
File "C:\OmniGen\OmniGen\OmniGen_init.py", line 1, in
from .model import OmniGen
File "C:\OmniGen\OmniGen\OmniGen\model.py", line 10, in
from timm.models.vision_transformer import PatchEmbed, Attention, Mlp
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\timm_init.py", line 2, in
from .layers import is_scriptable, is_exportable, set_scriptable, set_exportable
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\timm\layers_init.py", line 8, in
from .classifier import create_classifier, ClassifierHead, NormMlpClassifierHead, ClNormMlpClassifierHead
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\timm\layers\classifier.py", line 15, in
from .create_norm import get_norm_layer
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\timm\layers\create_norm.py", line 14, in
from torchvision.ops.misc import FrozenBatchNorm2d
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision_init.py", line 6, in
from torchvision import meta_registrations, datasets, io, models, ops, transforms, utils
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision\models_init.py", line 2, in
from .convnext import *
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision\models\convnext.py", line 8, in
from ..ops.misc import Conv2dNormActivation, Permute
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision\ops_init_.py", line 23, in
from .poolers import MultiScaleRoIAlign
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision\ops\poolers.py", line 10, in
from .roi_align import roi_align
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torchvision\ops\roi_align.py", line 4, in
import torch.dynamo
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo_init.py", line 64, in
torch.manual_seed = disable(torch.manual_seed)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\decorators.py", line 50, in disable
return DisableContext()(fn)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\eval_frame.py", line 410, in call
(filename is None or trace_rules.check(fn))
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 3378, in check
return check_verbose(obj, is_inlined_call).skipped
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 3361, in check_verbose
rule = torch._dynamo.trace_rules.lookup_inner(
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 3442, in lookup_inner
rule = get_torch_obj_rule_map().get(obj, None)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 2782, in get_torch_obj_rule_map
obj = load_object(k)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 2811, in load_object
val = _load_obj_from_str(x[0])
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch_dynamo\trace_rules.py", line 2795, in load_obj_from_str
return getattr(importlib.import_module(module), obj_name)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\nested_internal\nested_tensor.py", line 417, in
values=torch.randn(3, 3, device="meta"),
C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\torch\nested_internal\nested_tensor.py:417: UserWarning: Failed to initialize NumPy: _ARRAY_API not found (Triggered internally at ..\torch\csrc\utils\tensor_numpy.cpp:84.)
values=torch.randn(3, 3, device="meta"),
Traceback (most recent call last):
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1764, in get_module
return importlib.import_module("." + module_name, self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\importlib_init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in load_unlocked
File "", line 995, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\generation\utils.py", line 112, in
from accelerate.hooks import AlignDevicesHook, add_hook_to_module
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate_init.py", line 3, in
from .accelerator import Accelerator
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate\accelerator.py", line 35, in
from .checkpointing import load_accelerator_state, load_custom_state, save_accelerator_state, save_custom_state
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate\checkpointing.py", line 24, in
from .utils import (
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate\utils_init.py", line 16, in
from .dataclasses import (
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate\utils\dataclasses.py", line 34, in
from .environment import str_to_bool
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\accelerate\utils\environment.py", line 19, in
from distutils import spawn
ModuleNotFoundError: No module named 'distutils'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\OmniGen\OmniGen\app.py", line 6, in
from OmniGen import OmniGenPipeline
File "C:\OmniGen\OmniGen\OmniGen_init_.py", line 1, in
from .model import OmniGen
File "C:\OmniGen\OmniGen\OmniGen\model.py", line 14, in
from OmniGen.transformer import Phi3Config, Phi3Transformer
File "C:\OmniGen\OmniGen\OmniGen\transformer.py", line 17, in
from transformers.modeling_utils import PreTrainedModel
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\modeling_utils.py", line 46, in
from .generation import GenerationConfig, GenerationMixin
File "", line 1412, in _handle_fromlist
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1754, in getattr
module = self._get_module(self._class_to_module[name])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user-pc\AppData\Local\Programs\Python\Python312\Lib\site-packages\transformers\utils\import_utils.py", line 1766, in _get_module
raise RuntimeError(
RuntimeError: Failed to import transformers.generation.utils because of the following error (look up to see its traceback):
No module named 'distutils'
Any idea what the issue may be?
which python version are you using? try:
pip install distutils