cocktailpeanut / fluxgym

Dead simple FLUX LoRA training UI with LOW VRAM support
772 stars 53 forks source link

ModuleNotFoundError: No module named 'train_network' #94

Closed keizured closed 5 days ago

keizured commented 6 days ago

When running python app.py after completing manual install steps this error shows. No clue how to resolve, any help would be appreciated

ModuleNotFoundError: No module named 'train_network'

scooper86 commented 6 days ago

Same issue for me, installed via git on windows

wuliang19869312 commented 6 days ago

Traceback (most recent call last): File "D:\fluxgym\app.py", line 17, in import train_network ModuleNotFoundError: No module named 'train_network' why???

one-pip commented 6 days ago

yes, i git pull today , then met this problem

deepfriedheroin commented 6 days ago

I'm sure there's better way to do this, but here.

sys.path.append(os.path.abspath('./sd-scripts'))
import train_network
vizuelvfx commented 6 days ago

Wow, thank you!!! that helped me, I didn't know what to do either.

one-pip commented 6 days ago

I'm sure there's better way to do this, but here.

sys.path.append(os.path.abspath('./sd-scripts'))
import train_network

thanks, i made it

chnisar515 commented 5 days ago

i am facing the same error

(env) E:\fluxgym>python app.py Traceback (most recent call last): File "E:\fluxgym\app.py", line 17, in import train_network ModuleNotFoundError: No module named 'train_network'

can someone tell me how i can fix this? i replaced these lines in my app.py file now my app.py files looks like below

import os import sys import subprocess import gradio as gr from PIL import Image import torch import uuid import shutil import json import yaml from slugify import slugify from transformers import AutoProcessor, AutoModelForCausalLM from gradio_logsview import LogsView, LogsViewRunner from huggingface_hub import hf_hub_download, HfApi from library import flux_train_utils, huggingface_util from argparse import Namespace import train_network import toml import re os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1" os.environ['GRADIO_ANALYTICS_ENABLED'] = '0' sys.path.insert(0, os.getcwd()) sys.path.append(os.path.abspath('./sd-scripts')) import train_network MAX_IMAGES = 150

keizured commented 5 days ago

Issue was resolved with latest commit, thank you for fix!