Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

How to test my model #91

Open
Revanthraja opened this issue Jul 9, 2023 · 9 comments
Open

How to test my model #91

Revanthraja opened this issue Jul 9, 2023 · 9 comments

Comments

@Revanthraja
Copy link

Hello sir after training the model then how to test my model giving text as input please help me in this issue

@bruefire
Copy link
Contributor

bruefire commented Jul 9, 2023

Hi @Revanthraja.
Please use the inference.py script.

python inference.py --model '/path/to/checkpoint/' --prompt 'apple' -n "orange"

The usage are written in the readme file.

@Revanthraja
Copy link
Author

Revanthraja commented Jul 10, 2023

Hello sir in which folder I will get this path '/path/to/checkpoint/' please help me sir

@bruefire
Copy link
Contributor

You should have executed a command like the following:

 python train.py --config configs/my_train_config.yaml

The "output_dir" in config.yaml used by your training, is where checkpoints are saved.
Please check that directory.

@Revanthraja
Copy link
Author

like I need use like this
!python inference.py
--model /content/Text-To-Video-Finetuning/models/model_scope_diffusers
--prompt "The two persons are playing the cricket"
--num-frames 30
--window-size 12
--width 1024
--height 576
--sdp

@Revanthraja
Copy link
Author

Hello sir then how to pass the video and text directory please help in this

@Revanthraja
Copy link
Author

%cd /content/Text-To-Video-Finetuning

while True:

model = "/content/outputs/train_2023-07-13T11-37-44" #@param {type:"string"}
prompt = "Cricket playing" #@param {type:"string"}
negative = "text, watermark, copyright, blurry, low resolution, blur, low quality" #@param {type:"string"}
prompt = f""{prompt}""
negative = f""{negative}""
num_steps = 25 #@param {type:"raw"}
guidance_scale = 23 #@param {type:"raw"}
fps = 24 #@param {type:"raw"}
num_frames = 10 #@param {type:"raw"}
!python inference.py -m {model} -p {prompt} -n {negative} -W 1024 -H 576 -o /content/video_outputs -d cuda -x -s {num_steps} -g {guidance_scale} -f {fps} -T {num_frames} when I excecuting this code
I am getting OSError: Error no file named scheduler_config.json found in directory
/content/outputs/train_2023-07-13T11-37-44. this error please any one help me in this

@bruefire
Copy link
Contributor

Is there a 'scheduler' directory in the 'train_2023-07-13T11-37-44' ?
That directory must contain 'scheduler_config.json', but it probably disappeared for any reason.

@Revanthraja
Copy link
Author

Hello sir can you tell me for which reason it is disappeared for trainig I used low_vram_config file

@Revanthraja
Copy link
Author

Steps: 0% 0/100 [00:00<?, ?it/s]2200 params have been unfrozen for training.
/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py:134: FutureWarning: Accessing config attribute num_train_timesteps directly via 'DDPMScheduler' object attribute is deprecated. Please access 'num_train_timesteps' over 'DDPMScheduler's config object instead, e.g. 'scheduler.config.num_train_timesteps'.
deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False)
/usr/local/lib/python3.10/dist-packages/diffusers/configuration_utils.py:134: FutureWarning: Accessing config attribute prediction_type directly via 'DDPMScheduler' object attribute is deprecated. Please access 'prediction_type' over 'DDPMScheduler's config object instead, e.g. 'scheduler.config.prediction_type'.
deprecate("direct config name access", "1.0.0", deprecation_message, standard_warn=False)
Steps: 100% 100/100 [01:12<00:00, 1.84it/s, lr=1e-6, step_loss=0.00567]Traceback (most recent call last):
File "/content/Text-To-Video-Finetuning/train.py", line 999, in
main(**OmegaConf.load(args.config))
File "/content/Text-To-Video-Finetuning/train.py", line 978, in main
save_pipe(
File "/content/Text-To-Video-Finetuning/train.py", line 488, in save_pipe
unet_out = copy.deepcopy(accelerator.unwrap_model(unet, keep_fp32_wrapper=False))
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 271, in _reconstruct
state = deepcopy(state, memo)
File "/usr/lib/python3.10/copy.py", line 146, in deepcopy
y = copier(x, memo)
File "/usr/lib/python3.10/copy.py", line 231, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 172, in deepcopy
y = _reconstruct(x, memo, *rv)
File "/usr/lib/python3.10/copy.py", line 297, in _reconstruct
value = deepcopy(value, memo)
File "/usr/lib/python3.10/copy.py", line 153, in deepcopy
y = copier(memo)
File "/usr/local/lib/python3.10/dist-packages/torch/nn/parameter.py", line 55, in deepcopy
result = type(self)(self.data.clone(memory_format=torch.preserve_format), self.requires_grad)
torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 20.00 MiB (GPU 0; 14.75 GiB total capacity; 13.22 GiB already allocated; 10.81 M iB free; 13.37 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation. See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb:
wandb: Run history:
wandb: train_loss ▂█▁▁▅▁▅▃▁▆▂▃▃▅█▄▄▂▁▇▁▂▃▂▅▁▃▄▂▅▁▇▄▄▂▁▁▁▃▁
wandb:
wandb: Run summary:
wandb: train_loss 0.00567
wandb:
wandb: 🚀 View run legendary-wood-38 at: https://wandb.ai/genrative/text2video-fine-tune/runs/uwo0ozwf
wandb: Synced 5 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: ./wandb/run-20230715_161213-uwo0ozwf/logs

I am getting this error in google colab plz anyone help me

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

No branches or pull requests

2 participants