Giter Club home page Giter Club logo

Comments (15)

MarkYav avatar MarkYav commented on September 26, 2024 1

@l-bat Can you check, please?

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024 1

@l-bat Yes
image

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024 1

@l-bat

I tried to use another Machine type on Google Cloud: before I was using e2-highmem-8 but after I changed to n2-highmem-8 it all worked. Also, I used the last version of the tutorial Notebook.

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, Thanks for reporting the problem. Unfortunately, I'm not able reproduce provided error. Maybe there is something additional specific details?
which datasets, controlnet-aux, pytorch, transformers and diffusers version do you use?

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024

@l-bat Thank you for your prompt reply!

On Kaggle:

datasets                                 2.17.1
controlnet_aux                           0.0.7
pytorch-ignite                           0.4.13
pytorch-lightning                        2.1.3
transformers                             4.37.0
diffusers                                0.26.3

The full list could be found here: https://pastebin.com/WGGLrYT5

Also, it runs on Colab Enterprise with installed libs (see the list mentioned below). But the problem is that after quantization the generated image is bad (see photo).
image

It extracts the pose correctly, tho:
image

Installed libs Colab Enterprise: https://pastebin.com/U0GtqC4r

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, what inference device do you use? Looks like a problem with the calibration data or with device.

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024

@l-bat I use Colab Enterprise on Google Cloud. There are details:
image

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, do you use CPU here?
image

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, could you please try downloading the unet_calibration_data.pkl and loading it into notebook instead of preparing a calibration dataset? This will help me to understand if there is problem with data preparation.

import pickle
with open('unet_calibration_data.pkl', 'rb') as f:
    unet_calibration_data = pickle.load(f)

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024

@l-bat I tried to run the notebook using the code provided.

I changed:

%%skip not $to_quantize.value

CONTROLNET_INT8_OV_PATH = Path("controlnet-pose_int8.xml")
UNET_INT8_OV_PATH = Path("unet_controlnet_int8.xml")

# These are commented lines:
# if not (CONTROLNET_INT8_OV_PATH.exists() and UNET_INT8_OV_PATH.exists()):
    # unet_calibration_data = collect_calibration_data(ov_pipe, subset_size=subset_size)

# These are new inserted lines:
import pickle
with open('unet_calibration_data.pkl', 'rb') as f:
    unet_calibration_data = pickle.load(f)

And I got an error in the next cell:
image

I checked the code and the length of the downloaded unet_calibration_data is 20:
image

In this cell the prev_idx is initially set to 0, and in the loop goes from 0 to 19. But the problem is that later we set prev_idx += num_inference_steps and now prev_idx is 20 and will go from 20 to 39 -- here we have a list index out of range exception. See photos:
image
image

Thus, I assume there is a bug in the calibration dataset preparation OR usage.

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, I uploaded small subset of unet_calibration_data, which contains 20 samples.
I forgot to mention that you should also change size of subset_size to 20 (instead of 200) to align input_data with unet_calibration_data
image

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024

@l-bat I tried to run it but got the same output:
image

Right after that I generated a picture using the NOT quantized model and got this:
image

I was using ov_pipe(prompt, pose, 20, negative_prompt=negative_prompt). Also, I am surprised that the generated image is square.

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav, if you can provide cat /proc/cpuinfo maybe I can find a suitable configuration to reproduce the error

from openvino_notebooks.

l-bat avatar l-bat commented on September 26, 2024

@MarkYav could we close the issue?

from openvino_notebooks.

MarkYav avatar MarkYav commented on September 26, 2024

@l-bat Yes, please.

from openvino_notebooks.

Related Issues (20)

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.

  • 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.

  • 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.

  • D3 photo D3

    Data-Driven Documents codes.