Dain app ошибка памяти

@aKijia

Hello,

got this error while tried to interpolate 1 hour 24FPS 576p video into 48FPS closer to its end (83101 frame of 95203)

RuntimeError: CUDA out of memory. Tried to allocate 1.14 GiB (GPU 0; 24.00 GiB total capacity; 439.51 MiB already allocated; 21.30 GiB free; 632.00 MiB reserved in total by PyTorch)

After I restarted system and deleted last interpolated frames i got this

RuntimeError: CUDA out of memory. Tried to allocate 8.66 GiB (GPU 0; 24.00 GiB total capacity; 144.61 MiB already allocated; 13.53 GiB free; 8.39 GiB reserved in total by PyTorch)

Have no idea why all this free memory can’t be used here.

r7 5800x, 32GB@4000MHz, RTX3090

@bropines

I also got this error. Probably python can’t take more memory from the graphics card. Waiting for the fix

@Khipucamayoc

Hi! If you could share how you managed to make it run with the RTX 3090 I would be most grateful!
I am getting so many errors I don’t know where to start fixing them…

I am using:

Ubuntu 20.04
PyTorch 1.9 & Anaconda
env python=3.8
CUDA 11.1 RTX 3090

I changed the PyTorch as recommended to my env name in ./build.sh but still does not work…

I have even changed the compiler arguments (https://github.com/baowenbo/DAIN/files/7402642/compiler_args.txt) as recommended but nothing…

Thanks!

@bropines

Привет! Если бы вы могли поделиться, как вам удалось заставить его работать с RTX 3090, я был бы очень благодарен! У меня так много ошибок, что я не знаю, с чего начать их исправлять …

Я использую:

Ubuntu 20.04 PyTorch 1.9 и Anaconda env python = 3.8 CUDA 11.1 RTX 3090

Я изменил PyTorch, как рекомендовано для моего имени env в ./build.sh, но все еще не работает …

Я даже изменил аргументы компилятора ( https://github.com/baowenbo/DAIN/files/7402642/compiler_args.txt ), как рекомендовано, но ничего …

Спасибо!

Maybe use FlowFrames.This is a program with a built-in dain.

Гайд на основные Функции DAIN-APP V0.36 от 11.03.2020

Само приложение: https://grisk.itch.io/dain-app

ГАЙД ОТ ЛАМЕРА-ДЛЯ ЛАМЕРОВ! ГЛУБОКОГО ВНИКАНИЯ И РОСПИСИ ЗАТРАТ ПАМЯТИ ТУТ НЕТ!

Программа использует память видеокарты. Нужна Куда(загугли).

ОКНО ДИАЛОГА

юзер-фнедли интерфейс для настройки

DAIN-APP 0.36 #DAINAPP
(§) Input Video (s)	O Input PNG Sequence	O Resume Render
	Input File(s)		Input File(s) Path	
Export as Mp4				V
Output Folder			Selected Output Folder	
Frames Handling Mode:
In this mode:
Each frame will appear for the exatiy the same time in the output.
If the

1) 

1.1)Input Video- Процессировать видео

1.2)Input PNG Sequense- Процессировать выделенную последовательность изображении.

1.3)Resume render- Продолжить прерванный ранее рендер.

2)

2.1)Inpute file(s)- Выбрать нужный фаил.

2.2)Export as…- Экспортировать как Mp4, GIF, WebM, APNG.

2.3)Output Folder- Указать место, в котором программа создаст 3 папки: оригинальные кадры, интерполированные кадры, результат.

3)Mode.

3.1)Mode 1: all( frames treated the same)- Все, новые и старые, кадры будут использованы в конечном результате. Дефолтная настройка. Средняя ресурсоёмкость. Не меняет скорость результата.

3.2)Mode 2: Remove duplicate frames( may alter animation speed)- Не будут сгенерированы одинаковые кадры. Скорость анимации может изменится. Самая маленькая ресурсоёмкость.

3.3)Mode 3: Adaptive record timestamps them remove duplicate frames.- Каждый кадр будет на своём месте во времени(timespamp), а потом программа попробует угадать сколько кадров между ними нужно создать. Наименее полезен и стабилен. Высокая ресурсоёмкость. Не смотря на описание, скорость результата часто меняется.

3.4)Mode 4: Static record timestamps them remove duplicate frames.- Мод 3, но программа создаст только указанное количество кадров. Не всегда полезен. Средняя ресурсоёмкость. Не меняет скорость результата.

4) Depth Awareness Mode.

4.1)Real life or 3D- Для видео с четкой глубиной.

Сartoon or Anime- Для анимации и аниме без глубины, или её практическим отсутствием.

4.2)Alpha transparency- Будут ли сгенерированые кадры иметь полупрозрачные переходные части.

No alpha- функция отключена

Fast alpha- Менее ресурсоёмкий вариант, результат будет немного хуже.

Fast alpha- Более ресурсоёмкий вариант, наиболее качественный результат.

4.3) Interpolation Algorithm. 

Default- Стандартные х2, х4 и х8 функции интерполяции. Меньшие затраты памяти, медленнее более чистые результаты.

Experimental- Эксперементальные функции интерполяции. Быстрее, больший расход памяти, генерирует больше артефактов. Не доступна (4.2).

5)

5.1) Input FPS- Количество кадров в секунду орицинального файлафаилов.

5.2) Interpolate 2x/4x/8x- Увеличить изначальное кадры в такое количество раз. 

5.3) Output FPS- Расчетное количество кадров конечного результата, всегда округляется до целых после конца рендера.

6) Split frames into sections- Использовать, если не хватает памяти. При рендере программа будет разделять каждый кадр на части с указанными размерами(6.1) и (6.2). Снижает расход ресурсов, но сильно замедляет процесс.

6.1) Section size- Размер секции. Т.е. Если указать 500, то разделение будет идти на секции 500х500 пикселей, при этом создаст четыре версии в зависимости от (6.2).

6.2) Section Padding- Переменная, которая определяет четые вариации (6.1). Т.е, при указании (6.1)=500, и (6.2)=200, будут такие четыре варианта: 500х500, 200х500, 500х200, 200х200. Такими секциями программа будет обрабатывать кадры, начиная с максимального количества больших секции, и постепенно уменьшая их размер.

7) 

7.1) Downscale video- Уменьшает размер результата. Указывать в виде ХнаХ(500х500) пикселей.

7.2) Don’t interpolate scene changes- При обнаружении резкой смены изображения(перехода сцены), программа не будет интерполировать переход между ними.

8)

8.1) Clean interpolated folder before starting-  Программа очистит папку с интерполированными кадрами при старте следующего рендера с теми же (2.3). Я постоянно использую при работе на трудной гифкой, которую нужно переделывать не один раз.

8.2) Limit color palette to use only original colors- При рендере программа будет использовать только оригинальную палитру цветов файла. Анимации могу использовать (4.2) только с этой функцией. Я включаю всегда. 

8.3) Create a output with audio- Результат сохранит изначальное аудио. Работает нормально только с (3.1) и (3.4). Не стабильная эксперементальная функция.

8.4) Perfect loop animation- Анимация будет идеально закольцована. Использовать, если оригинал это подразумевает.

9) If FPS exceed this value. Create another version with this FPS.- Если ФПС перейдет это значение(9.1), создать версию с этим [ФПС](9.1).

9.1) [FPS]= — переменная, определяющая предел ФПС.

9.2) (If FPS exceeds [FPS]) Create a [FPS] version of movie- Если был превышен лимит (9.1), то сгенерировать дополнительную версию с указанным ФПС(9.1) в виде видео.

9.2) (If FPS exceeds [FPS]) Interpolate down to [FPS] [Conf 1: Smooth]-  Если был превышен лимит (9.1), то сгенерировать версию с указанным ФПС(9.1). Будет задействована первая конфигурация. Результат будет более плавным.

9.3) (If FPS exceeds [FPS]) Interpolate down to [FPS] [Conf 2: Sharp]- Если был превышен лимит (9.1), то сгенерировать версию с указанным ФПС(9.1). Будет задействована Вторая конфигурация. Результат будет более резким.

10)

10.1)Preform all steps: Render- полностью выполнит процесс рендера.

10.2)Step 1: Split source video into frames- Только разделит фаил на кадры, создаст папку (2.3), и поместит их туда.

10.3)Step 2: Feed sorce frames to DAIN- Начинает процесс интерполяции оригинальных кадров и генерацию новых.

10.4)Step 3: Convert DAIN frames to video- Сшивание сгенерированных кадров в (2.2).

ОКНО ПРОЦЕССА

Говорить тут особо неочем: подробности процесса, количество готовых кадров.

DAINAPP
I:/Users/Danila/Pictures
;lain Folder: C:/Users/Danila/Pictures/m_4528ddlc2a/
Zonf. Method: 1
Fhe testing model weight is: ./model_weights/best.pth Starting PNG frames extraction!
Finished PNG frames extraction!
Starting Interpolation! taking Frame 1 from 2: 50.0%
Ending

Ну, вот вроде и все. Учтите, что универсальных настроек не существует, и почти всегда надо будет шаманить для лучшего результата.

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

Update — vedroboev resolved this issue with two pieces of advice:

  • With my NVidia GTX 1660 Ti (with Max Q if that matters) card, I had to use the https://github.com/basujindal/stable-diffusion repo.

    • Remember to call the optimized python script python optimizedSD/optimized_txt2img.py instead of standard scripts/txt2img.

  • If you’re getting green squares, add —precision full to the command line.

This command rendered 5 good images on my machine with the NVidia GeForce 1660Ti card using the basujindal repo:

python optimizedSD/optimized_txt2img.py —prompt «a drawing of a cat on a log» —n_iter 5 —n_samples 1 —precision full

======

Original:

Getting the CUDA out of memory error.

(RuntimeError: CUDA out of memory. Tried to allocate 30.00 MiB (GPU 0; 6.00 GiB total capacity; 5.16 GiB already allocated; 0 bytes free; 5.30 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)

Things I’ve tried:

  • Used repo recommended in https://github.com/CompVis/stable-diffusion/issues/39 to use https://github.com/basujindal/stable-diffusion — same result.

  • Dialed the image —H and —W down to 128 and even 64 — same error.

Questions:

  1. I have two GPUs — a intel UHD and a GeForceTI 1660 with 6GB VRAM. The error here implies PyTorch has already reserved 5.3GB and is requesting 30 MB more, which there should be sufficient capacity for (6.0 — 5.3 = .7GB, 700 MB).

  2. Searched documentation for «See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF» but that seems to be for custom python scripts and I don’t see how to add that to txt2img command. I don’t see where to specify max_split_size_mb or PYTOURH_CUDA_ALLOC_CONF.

  3. I think this is using the GeForce but don’t see how to specify this in the txt2img command. Can/should I specify a GPU? Do I need to/How do I kill any programs that might be reserving GPU memory, though it implies that PyTorch is reserving most of it?

Just want the answer? In most cases, you can fix this error by setting a lower image resolution or fewer images per generation. Or, use an app like NightCafe that runs Stable Diffusion online in the cloud so you don’t need to deal with CUDA errors at all.


One of the best AI image generators currently available is Stable Diffusion online. It’s a text-to-image technology that enables individuals to produce beautiful works of art in a matter of seconds. If you take the time to study a Stable Diffusion prompt guide, you can quickly make quality images with your computer or on the cloud, and learn what to do if you get a CUDA out-of-memory error message.

If Stable Diffusion is used locally on a computer rather than via a website or application programming interface, the machine will need to have certain capabilities to handle the program. Your graphics card is the most critical component when using Stable Diffusion because it operates almost entirely on a graphics processing unit (GPU)—and usually on a CUDA-based Nvidia GPU.

The Nvidia CUDA parallel computing platform is the foundation for thousands of GPU-accelerated applications. It is the platform of choice for developing and implementing novel deep learning and parallel computing algorithms due to CUDA’s flexibility and programmability.

What Is CUDA?

NVIDIA developed the parallel computing platform and programming language called Compute Unified Device Architecture, or CUDA. Through GPU accelerators, CUDA has assisted developers in speeding up their apps with more than twenty million downloads.

In addition to speeding up applications for high-performance computing and research, CUDA has gained widespread use in consumer and commercial ecosystems, as well as open-source AI generators such as Stable Diffusion.

What Happens With a Memory Error in Stable Diffusion?

Running Stable Diffusion on your computer may occasionally cause memory problems and prevent the model from functioning correctly. This occurs when your GPU memory allocation is exhausted. It is important to note that running Stable Diffusion requires at least four gigabytes (GB) of video random access memory (VRAM). One recommendation is a 3xxx series NVIDIA GPU that starts with six GB of VRAM. Other components of your computer, such as your central processing unit (CPU), RAM, and storage devices, are less important.

To train an AI model on a GPU, you need to differentiate labels and predictions to be accurate. To produce reliable predictions, you need both the model and the input data to be allocated in CUDA memory. A memory error occurs when the project becomes too complex to be cached in the GPU’s memory.

Each project has a specific quantity of data that needs to be uploaded, either to the VRAM (the GPU’s memory when the CUDA or RTX GPU engine resides) or the RAM (when the CPU engine operates).

GPUs typically contain a significantly smaller amount of memory than a computer’s RAM. A project may occasionally be too big and fail because it is fully uploaded to the VRAM. The geometry’s intricacy, extent to which high-resolution textures are used, render settings, and other elements can all play a part.

One of the easiest ways to fix a memory error issue is by simply restarting the computer. If this doesn’t work, another potential remedy is to reduce the resolution. Reduce your image to 256 x 256 resolution by making an input of -W 256 -H 256 in the command line.

You can also try increasing the memory that the CUDA device has access to. You do this by modifying your system’s GPU settings. Changing the configuration file or using command-line options frequently resolves the issue.

Another option is to buy a new GPU. If you go this route, get a GPU with more memory to replace the existing GPU if VRAM is consistently causing runtime problems that other methods can’t solve. 

Divide the data into smaller batches. Processing smaller sets of data may be needed to avoid memory overload. This tactic reduces overall memory utilisation and the task can be completed without running out of memory.

You can also use a new framework. If you are using TensorFlow or PyTorch, you can switch to a more memory-efficient framework.

Finally, make your code more efficient to avoid memory issues. You can decrease the data size, use more effective methods, or try other speed enhancements.

In Conclusion

The best way to solve a memory problem in Stable Diffusion will depend on the specifics of your situation, including the volume of data being processed and the hardware and software employed.

You can further enhance your creations with Stable Diffusion samplers such as k_LMS, DDIM and k_euler_a. The incredible results happen without any pre- or post-processing.

Ready to take a deep dive into the Stable Diffusion universe? Sign up for a free account on NightCafe and let your creative ideas flow.

  • Daikin коды ошибок мигание
  • Daewoo nexia ошибка пропуски зажигания
  • Daikin коды ошибок как проверить
  • Daikin l5 ошибка что делать
  • Daikin ft35dvm коды ошибок