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

Cannot use "Image Prompt" with Google Colab #1330

Closed
hoangnhan2ka3 opened this issue Dec 11, 2023 · 8 comments
Closed

Cannot use "Image Prompt" with Google Colab #1330

hoangnhan2ka3 opened this issue Dec 11, 2023 · 8 comments
Labels
bug Something isn't working question Further information is requested

Comments

@hoangnhan2ka3
Copy link

This is my console log in Google Colab (I opened it the second time):

!pip install pygit2==1.12.2
%cd /content
!git clone https://github.com/lllyasviel/Fooocus.git
%cd /content/Fooocus
!python entry_with_update.py --preset realistic --share

Requirement already satisfied: pygit2==1.12.2 in /usr/local/lib/python3.10/dist-packages (1.12.2)
Requirement already satisfied: cffi>=1.9.1 in /usr/local/lib/python3.10/dist-packages (from pygit2==1.12.2) (1.16.0)
Requirement already satisfied: pycparser in /usr/local/lib/python3.10/dist-packages (from cffi>=1.9.1->pygit2==1.12.2) (2.21)
/content
fatal: destination path 'Fooocus' already exists and is not an empty directory.
/content/Fooocus
Already up-to-date
Update succeeded.
[System ARGV] ['entry_with_update.py', '--preset', 'realistic', '--share']
Loaded preset: /content/Fooocus/presets/realistic.json
Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
Fooocus version: 2.1.824
Running on local URL: http://127.0.0.1:7865/
Total VRAM 15102 MB, total RAM 12983 MB
Running on public URL: https://2668bab9f609f5ba8e.gradio.live/

This share link expires in 72 hours. For free permanent hosting and GPU upgrades, run gradio deploy from Terminal to deploy to Spaces (https://huggingface.co/spaces)
2023-12-11 06:37:27.636154: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2023-12-11 06:37:27.636211: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2023-12-11 06:37:27.636258: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2023-12-11 06:37:29.569030: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Set vram state to: NORMAL_VRAM
Disabling smart memory management
Device: cuda:0 Tesla T4 : native
VAE dtype: torch.float32
Using pytorch cross attention
Refiner unloaded.
model_type EPS
adm 2816
Using pytorch attention in VAE
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
Using pytorch attention in VAE
extra keys {'cond_stage_model.clip_g.transformer.text_model.embeddings.position_ids', 'cond_stage_model.clip_l.text_projection', 'cond_stage_model.clip_l.logit_scale'}
Base model loaded: /content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors
Request to load LoRAs [['SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors', 0.25], ['None', 1.0], ['None', 1.0], ['None', 1.0], ['None', 1.0]] for model [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors].
Loaded LoRA [/content/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for UNet [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 788 keys at weight 0.25.
Loaded LoRA [/content/Fooocus/models/loras/SDXL_FILM_PHOTOGRAPHY_STYLE_BetaV0.4.safetensors] for CLIP [/content/Fooocus/models/checkpoints/realisticStockPhoto_v10.safetensors] with 264 keys at weight 0.25.
Fooocus V2 Expansion: Vocab with 642 words.
Fooocus Expansion engine loaded for cuda:0, use_fp16 = True.
Requested to load SDXLClipModel
Requested to load GPT2LMHeadModel
Loading 2 new models
[Fooocus Model Management] Moving model(s) has taken 1.13 seconds
App started successful. Use the app with http://127.0.0.1:7865/ or 127.0.0.1:7865 or https://2668bab9f609f5ba8e.gradio.live/
[Parameters] Adaptive CFG = 7
[Parameters] Sharpness = 2
[Parameters] ADM Scale = 1.5 : 0.8 : 0.3
[Parameters] CFG = 3.0
[Parameters] Seed = 5527127032835385811
[Fooocus] Downloading control models ...
[Fooocus] Loading control models ...
extra keys clip vision: ['vision_model.embeddings.position_ids']
[Parameters] Sampler = dpmpp_2m_sde_gpu - karras
[Parameters] Steps = 30 - 15
[Fooocus] Initializing ...
[Fooocus] Loading models ...
Refiner unloaded.
[Fooocus] Processing prompts ...
[Fooocus] Encoding positive #1 ...
[Fooocus Model Management] Moving model(s) has taken 0.23 seconds
[Fooocus] Encoding positive #2 ...
[Fooocus] Encoding negative #1 ...
[Fooocus] Encoding negative #2 ...
[Fooocus] Image processing ...
Requested to load CLIPVisionModelWithProjection
Loading 1 new model
^C

This is the error:

Screenshot 2023-12-11 133926

This is the error when I click Skip or Stop:

Screenshot 2023-12-11 133942

This the input image:

2

@monkrus
Copy link

monkrus commented Dec 11, 2023

I had a similar error after starting colab, and then not using it for some time.
Just tried and it worked fine for me.

@bit-wiz
Copy link

bit-wiz commented Dec 14, 2023

It does work , but it downloads .safetensor files (which I think are checkpoints) . after downloading it usually crashes and in next run it runs. but you can only prompt 1 image , 12gb ram of colab isn't enough

@ali104ml
Copy link

It does work , but it downloads .safetensor files (which I think are checkpoints) . after downloading it usually crashes and in next run it runs. but you can only prompt 1 image , 12gb ram of colab isn't enough

Does Upgrading to pro plan can solve this issue?

@bit-wiz
Copy link

bit-wiz commented Dec 16, 2023

It does work , but it downloads .safetensor files (which I think are checkpoints) . after downloading it usually crashes and in next run it runs. but you can only prompt 1 image , 12gb ram of colab isn't enough

Does Upgrading to pro plan can solve this issue?

It will , but if you want to upgrade you can use "https://www.paperspace.com/" they provide great systems as well

@mubarikadams
Copy link

It does work , but it downloads .safetensor files (which I think are checkpoints) . after downloading it usually crashes and in next run it runs. but you can only prompt 1 image , 12gb ram of colab isn't enough

Does Upgrading to pro plan can solve this issue?

I uploaded to Pro Plan and I'm still having this issue. Any luck?

@bit-wiz
Copy link

bit-wiz commented Dec 23, 2023

It does work , but it downloads .safetensor files (which I think are checkpoints) . after downloading it usually crashes and in next run it runs. but you can only prompt 1 image , 12gb ram of colab isn't enough

Does Upgrading to pro plan can solve this issue?

I uploaded to Pro Plan and I'm still having this issue. Any luck?

I think they provide control of ram initially it is default (12gigs) . you can increase ram to your workspace ig

@mashb1t
Copy link
Collaborator

mashb1t commented Dec 29, 2023

@mubarikadams After upgrading to the PRO plan you explicitly have to modify your instance to also make use of the increase in RAM. You can do so in the workspace (instance) settings.
Please check if this option is now available for you and if it fixes your issues.

@vanetreg
Copy link

I could use Fooocus on a payed Colab (Pay-as-you-go) with a T4 without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants