Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.json missing #54

Open
TheStu opened this issue Oct 16, 2024 · 3 comments
Open

config.json missing #54

TheStu opened this issue Oct 16, 2024 · 3 comments

Comments

@TheStu
Copy link

TheStu commented Oct 16, 2024

I get this error when attempting to use the web form for training:

Training failed.
Error no file named config.json found in directory FLUX.1-dev/transformer.

form inputs:

{
  "steps": 1000,
  "lora_rank": 16,
  "optimizer": "adamw8bit",
  "batch_size": 1,
  "resolution": "512,768,1024",
  "autocaption": true,
  "input_images": "https://replicate.delivery/pbxt/Lo2g1RgMZIrlGveIVGRcmwP4sL5UFP3PaYARmh6CclftYuaq/flux.zip",
  "trigger_word": "TOK",
  "learning_rate": 0.0004,
  "wandb_project": "flux_train_replicate",
  "wandb_save_interval": 100,
  "caption_dropout_rate": 0.05,
  "cache_latents_to_disk": false,
  "wandb_sample_interval": 100
}

full log:

Starting train job
{
"type": "custom_sd_trainer",
"training_folder": "output",
"device": "cuda:0",
"trigger_word": "TOK",
"network": {
"type": "lora",
"linear": 16,
"linear_alpha": 16
},
"save": {
"dtype": "float16",
"save_every": 1001,
"max_step_saves_to_keep": 1
},
"datasets": [
{
"folder_path": "input_images",
"caption_ext": "txt",
"caption_dropout_rate": 0.05,
"shuffle_tokens": false,
"cache_latents_to_disk": false,
"cache_latents": true,
"resolution": [
512,
768,
1024
]
}
],
"train": {
"batch_size": 1,
"steps": 1000,
"gradient_accumulation_steps": 1,
"train_unet": true,
"train_text_encoder": false,
"content_or_style": "balanced",
"gradient_checkpointing": true,
"noise_scheduler": "flowmatch",
"optimizer": "adamw8bit",
"lr": 0.0004,
"ema_config": {
"use_ema": true,
"ema_decay": 0.99
},
"dtype": "bf16"
},
"model": {
"name_or_path": "FLUX.1-dev",
"is_flux": true,
"quantize": true
},
"sample": {
"sampler": "flowmatch",
"sample_every": 1001,
"width": 1024,
"height": 1024,
"prompts": [],
"neg": "",
"seed": 42,
"walk_seed": true,
"guidance_scale": 3.5,
"sample_steps": 28
}
}
Using EMA
#############################################
# Running job: flux_train_replicate
#############################################
Running  1 process
Loading Flux model
Loading transformer
Traceback (most recent call last):
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/cog/server/worker.py", line 352, in _predict
result = predict(**payload)
File "/src/train.py", line 355, in train
job.run()
File "/src/train.py", line 97, in run
process.run()
File "/src/ai-toolkit/jobs/process/BaseSDTrainProcess.py", line 1241, in run
self.sd.load_model()
File "/src/ai-toolkit/toolkit/stable_diffusion_model.py", line 488, in load_model
transformer = FluxTransformer2DModel.from_pretrained(
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/models/modeling_utils.py", line 612, in from_pretrained
config, unused_kwargs, commit_hash = cls.load_config(
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
return fn(*args, **kwargs)
File "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 373, in load_config
raise EnvironmentError(
OSError: Error no file named config.json found in directory FLUX.1-dev/transformer.
@billnye2
Copy link

Also getting this issue

@billnye2
Copy link

Looks like it's working now

@DomEscobar
Copy link

Still this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants