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

Instance images root doesn't exists. #3

Open
AFMSB opened this issue Oct 2, 2024 · 8 comments
Open

Instance images root doesn't exists. #3

AFMSB opened this issue Oct 2, 2024 · 8 comments

Comments

@AFMSB
Copy link

AFMSB commented Oct 2, 2024

I have tried to run your code, the problem is i am getting this error, i am using the same dataset i used with the ai-toolkit tool:

Starting 1 job(s)
Starting job train_lora_sdxl_24gb_1.0.yaml
Using device: cuda:0
Using TF32 for faster training on Ampere GPUs
Using matmul precision: high
Using cuDNN benchmark
Using seed: 42
Using variant: fp16
Using 4 workers for data loading
Walking seed
Loading noise scheduler
{'variance_type', 'clip_sample_range', 'thresholding', 'rescale_betas_zero_snr', 'dynamic_thresholding_ratio'} was not found in config. Values will be initialized to default values.
Using DDPMScheduler
Loading text encoder 1
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
Loading text encoder 2
You are using a model of type clip_text_model to instantiate a model of type . This is not supported for all configurations of models and can yield errors.
Loading VAE
{'latents_mean', 'use_quant_conv', 'use_post_quant_conv', 'mid_block_add_attention', 'shift_factor', 'latents_std'} was not found in config. Values will be initialized to default values.
Loading unet
{'dropout', 'attention_type', 'reverse_transformer_layers_per_block'} was not found in config. Values will be initialized to default values.
Adding LoRA adapters
Loading optimizer
Loading datasets
Job train_lora_sdxl_24gb_1.0.yaml failed with error: Instance images root doesn't exists.
Traceback (most recent call last):
File "/workspace/lorakit/.venv/lib/python3.10/site-packages/lorakit/cli/lorakit.py", line 31, in main
job.run()
File "/workspace/lorakit/.venv/lib/python3.10/site-packages/lorakit/train.py", line 762, in run
train_dataset = DreamBoothDataset(self._dataset_folder, self._instant_prompt, self._class_prompt, resolution=self._resolution)
File "/workspace/lorakit/.venv/lib/python3.10/site-packages/lorakit/datasets.py", line 41, in init
raise ValueError("Instance images root doesn't exists.")
ValueError: Instance images root doesn't exists.

@omidsakhi
Copy link
Owner

The condition that causes this error is very simple. It checks to see if folder exists or not. Maybe there is a typo in the path?

@AFMSB
Copy link
Author

AFMSB commented Oct 2, 2024

@omidsakhi i have already fixed it, but can you provide examples of what to put in these fields:

instant_prompt: "A highly detailed, photorealistic portrait of andre" # prompt to use for the instant prompt
class_prompt: "man" # prompt to use for the class prompt

prompts:
- "Create a photorealistic professional portrait of [trigger] wearing a sharp, dark business suit and tie. The background is a clean, solid color [trigger] is smiling confidently, with a direct gaze that conveys professionalism and authority. The lighting is soft and natural, highlighting their features. Perfect for a corporate headshot."

neg:
- "black and white, monochrome, grayscale, sepia, disfigured face, extra fingers, missing limbs, cartoonish, low quality, blurry, text, watermark"

@omidsakhi
Copy link
Owner

instant_prompt is the trigger word. lorakit does not follow the implementation of trigger word like ai-toolkit yet. In this case it follows the implementation of HuggingFace Auto-Train Advanced. So here you should write "SKS" or "TOK" or something unique. It can also be "Photo of SKS" or "Photo of TOK". Do not put anyhting such as high-quality and stuff because they will be assigned to you training images and usually they are not high-quality.

class_prompt is what the SKS or TOK is supposed to be. For example man or woman.

prompts: is an array of positive prompts for sampling during the training. So you can see how the training is progressing epoch to epoch.
neg: is an array of negative prompts that is supplied with positive prompts. The array sizes must match.

@AFMSB
Copy link
Author

AFMSB commented Oct 2, 2024

ok, but shall i place "TOK" in my prompts?, Do you have some examples for the negative ones?

@omidsakhi
Copy link
Owner

Yes. Sorry I forgot. Please put TOK in the prompts until we implement a mechanism similar to [trigger] later.

@AFMSB
Copy link
Author

AFMSB commented Oct 2, 2024

also did you manage to accomplish the realistic effect of flux, i have been trying everything but didnt reach it, maybe its my config, i always get plastic skin

@AFMSB
Copy link
Author

AFMSB commented Oct 3, 2024

@omidsakhi adter i changed my initial prompt like you said my loras dont even look like the person on the dataset

@omidsakhi
Copy link
Owner

Would you please share your config file?

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

2 participants